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