1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
14 * @author Toni Kalajainen
\r
16 package org.simantics.g2d.image;
\r
18 import org.simantics.utils.datastructures.cache.IFactory;
\r
22 * This class contains some built-in images.
\r
26 * Image x = DefaultImages.UNKNOWN.get();
\r
31 * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
\r
33 public class DefaultImages {
\r
35 public static final IFactory<Image> UNKNOWN2 = get("unknown.png");
\r
36 public static final IFactory<Image> SVG = get("svg.png");
\r
37 public static final IFactory<Image> ERROR_DECORATOR = get("error.svg");
\r
38 public static final IFactory<Image> WARNING_DECORATOR = get("warningDecorator.png");
\r
39 public static final IFactory<Image> COMPOSITION = get("composition.png");
\r
40 public static final IFactory<Image> UNKNOWN = get("unknownDocument.svg");
\r
41 public static final IFactory<Image> WHEEL = get("wheel2.svg");
\r
42 public static final IFactory<Image> GRAB = get("grab.png");
\r
43 public static final IFactory<Image> GRAB32 = get("grab32.png");
\r
44 public static final IFactory<Image> HAND = get("hand.png");
\r
45 public static final IFactory<Image> HAND32 = get("hand32.png");
\r
46 public static final IFactory<Image> HOURGLASS = get("hourglass.svg");
\r
48 private static IFactory<Image> get(String filename) {
\r
50 ProviderUtils.reference(
\r
51 ProviderUtils.cache(
\r
52 ProviderUtils.rasterize(
\r
54 DefaultImages.class.getResource(filename)
\r