001: /*
002: * uDig - User Friendly Desktop Internet GIS client
003: * http://udig.refractions.net
004: * (C) 2004, Refractions Research Inc.
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: */
017: package net.refractions.udig.catalog.ui;
018:
019: import static net.refractions.udig.core.internal.Icons.OBJECT;
020: import static net.refractions.udig.core.internal.Icons.OVERLAY;
021:
022: import org.eclipse.jface.resource.ImageDescriptor;
023: import org.eclipse.swt.graphics.Image;
024:
025: /**
026: * A registry for common images which may be useful to other plug-ins.
027: * <p>
028: * This lists the <code>ImageDescriptor</code>s that are available via
029: * RegistryUI.getImageResource(). The fact that a constant is mentioned here, by convention, makes
030: * the associated Image part of the Plug-In api.
031: * </p>
032: * To use one of these images:
033: *
034: * <pre><code>
035: * ImageRegistry images = CatalogUIPlugin.getDefault().getImageRegistry();
036: * ImageDescriptor image = images.getDescriptor(ISharedImages.IMG_DATASTORE_OBJ);
037: * </code></pre>
038: *
039: * <p>
040: * This interface is not intended to be implemented by clients.
041: * </p>
042: */
043: public interface ISharedImages {
044: /**
045: * Graphic representing a all generated map graphics
046: */
047: public final static String MAP_GRAPHICS_OBJ = OBJECT
048: + "map_graphics_obj.gif"; //$NON-NLS-1$
049:
050: /**
051: * Graphic representing a generated graphic
052: */
053: public final static String GRAPHIC_OBJ = OBJECT + "graphic_obj.gif"; //$NON-NLS-1$
054:
055: /**
056: * Generic catalog glyph
057: */
058: public final static String CATALOG_OBJ = OBJECT
059: + "repository_obj.gif"; //$NON-NLS-1$
060: /**
061: * Shared Image representing a database.
062: */
063: public final static String DATABASE_OBJ = OBJECT
064: + "database_obj.gif"; //$NON-NLS-1$
065: /**
066: * Shared Image representing a Datastore (generic feature information).
067: */
068: public final static String DATASTORE_OBJ = OBJECT
069: + "datastore_obj.gif"; //$NON-NLS-1$
070: /**
071: * Represent a data source with an erro condition.
072: */
073: public final static String ERROR_OVR = OVERLAY + "error_ovr.gif"; //$NON-NLS-1$
074: /**
075: * Graphic representing a Feature File
076: */
077: public final static String FEATURE_FILE_OBJ = OBJECT
078: + "feature_file_obj.gif"; //$NON-NLS-1$
079: /**
080: * Graphic representing a Feature (default for an indivudal IGeoResource)
081: */
082: public final static String FEATURE_OBJ = OBJECT + "feature_obj.gif"; //$NON-NLS-1$
083: /**
084: * Generic storage glyph.
085: */
086: public final static String FILE_OBJ = OBJECT + "file_obj.gif"; //$NON-NLS-1$
087: /**
088: * Shared Image representing a Grid Coverage Exchange (generic raster information).
089: */
090: public final static String GCE_OBJ = OBJECT + "gce_obj.gif"; //$NON-NLS-1$
091:
092: /**
093: * Graphic representing a Grid based file format
094: */
095: public final static String GRID_FILE_OBJ = OBJECT
096: + "grid_file_obj.gif"; //$NON-NLS-1$
097:
098: /**
099: * Graphic representing a Grid (default for an indivudal IGeoResource)
100: */
101: public final static String GRID_OBJ = OBJECT + "grid_obj.gif"; //$NON-NLS-1$
102: public final static String GRID_MISSING = OBJECT
103: + "grid_missing_obj.gif"; //$NON-NLS-1$
104: /**
105: * Graphic representing a Grid (default for an indivudal IGeoResource)
106: */
107: public final static String PIXEL_OBJ = OBJECT + "pixel_obj.gif"; //$NON-NLS-1$
108:
109: /**
110: * Generic storage glyph.
111: */
112: public final static String MEMORY_OBJ = OBJECT + "memory_obj.gif"; //$NON-NLS-1$
113: /**
114: * Palette of map graphics (synthetic content)
115: */
116: public final static String PALETTE_OBJ = OBJECT + "palette_obj.gif"; //$NON-NLS-1$
117: /**
118: * Graphic representing a Grid (default for an indivudal IGeoResource)
119: */
120: public final static String RESOURCE_OBJ = OBJECT
121: + "resource_obj.gif"; //$NON-NLS-1$
122: /**
123: * Generic external provider of information.
124: */
125: public final static String SERVER_OBJ = OBJECT + "server_obj.gif"; //$NON-NLS-1$
126: /**
127: * Represent a data source waiting for status information.
128: */
129: public final static String WAIT_OVR = OVERLAY + "wait_ovr.gif"; //$NON-NLS-1$
130: /**
131: * Represents a data source with a warning codition.
132: * <p>
133: * A warning means that the system is making an assumption. The user should be able to edit the
134: * data source and fix the problem.
135: * </p>
136: * <p>
137: * The context menu could provide a list of suggested fixes, or if there is only one it should
138: * probably just do it. An example of this would be getting back a redirect for WFS url. The fix
139: * would be to remember the redirect (rather than the origional). This is the kind of thing that
140: * should just happen.
141: * </p>
142: */
143: public final static String WARNING_OVR = OVERLAY
144: + "warning_ovr.gif"; //$NON-NLS-1$
145: /**
146: * Web Feature Server is a standards based external source of feature information.
147: */
148: public final static String WFS_OBJ = OBJECT + "wfs_obj.gif"; //$NON-NLS-1$
149: /**
150: * Web Map Server is a standards based external source of raster information.
151: */
152: public final static String WMS_OBJ = OBJECT + "wms_obj.gif"; //$NON-NLS-1$
153:
154: /**
155: * Wen Registry Service registry (a OWS Catalog)
156: */
157: public final static String WRS_OBJ = OBJECT + "wrs_obj.gif"; //$NON-NLS-1$
158:
159: /**
160: * Returns shared image for the given image ID. Returns null if there is no such image.
161: *
162: * @param id Constant from ISharedImages
163: * @return Shared image for image ID, do plugin will manage disposal.
164: */
165: public Image get(String id);
166:
167: /**
168: * Returns the image descriptor for the given image ID. Returns null if there is no such image.
169: *
170: * @param id Constant from ISharedImages
171: * @return ImageDescriptor locating resource associated with id
172: */
173: public ImageDescriptor getImageDescriptor(String id);
174: }
|