1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.model;
|
11
|
|
12
|
import java.net.MalformedURLException;
|
13
|
import java.net.URI;
|
14
|
import java.net.URL;
|
15
|
|
16
|
import org.eclipse.core.runtime.FileLocator;
|
17
|
import org.eclipse.core.runtime.IPath;
|
18
|
import org.eclipse.core.runtime.Path;
|
19
|
import org.eclipse.jface.resource.DeviceResourceException;
|
20
|
import org.eclipse.jface.resource.ImageDescriptor;
|
21
|
import org.eclipse.jface.resource.ImageRegistry;
|
22
|
import org.eclipse.swt.graphics.Image;
|
23
|
|
24
|
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
|
25
|
|
26
|
/**
|
27
|
* <p>ImageResources class.</p>
|
28
|
*
|
29
|
* @author n.hoffmann
|
30
|
* @created 24.03.2009
|
31
|
* @version 1.0
|
32
|
*/
|
33
|
public class ImageResources {
|
34
|
|
35
|
private static ImageResources instance;
|
36
|
|
37
|
/**
|
38
|
* <p>Getter for the field <code>instance</code>.</p>
|
39
|
*
|
40
|
* @return a {@link eu.etaxonomy.taxeditor.model.ImageResources} object.
|
41
|
*/
|
42
|
public static ImageResources getInstance(){
|
43
|
if(instance == null){
|
44
|
instance = new ImageResources();
|
45
|
}
|
46
|
return instance;
|
47
|
}
|
48
|
|
49
|
|
50
|
/* ***************************************************************************************
|
51
|
ICONS
|
52
|
************************************************************************************** */
|
53
|
/** Constant <code>ADD_ICON="add_icon"</code> */
|
54
|
public static final String COPY_ICON = "copy_icon";
|
55
|
public static final String PASTE_ICON = "paste_icon";
|
56
|
public static final String ADD_ICON = "add_icon";
|
57
|
public static final String ADD_ICON_GREEN = "add_icon_green";
|
58
|
public static final String MIN_ICON = "min_icon";
|
59
|
public static final String ADD_EDIT = "add_edit";
|
60
|
/** Constant <code>TRASH_ICON="trash_icon"</code> */
|
61
|
public static final String TRASH_ICON = "trash_icon";
|
62
|
/** Constant <code>BROWSE_ICON="browse_icon"</code> */
|
63
|
public static final String BROWSE_ICON = "browse_icon";
|
64
|
/** Constant <code>EDIT_ICON="edit_icon"</code> */
|
65
|
public static final String EDIT_ICON = "edit_icon";
|
66
|
/** Constant <code>EDIT_LOGO_ICON="edit_logo_icon"</code> */
|
67
|
public static final String EDIT_LOGO_ICON = "edit_logo_icon";
|
68
|
/** Constant <code>WARNING_ICON="warning_icon"</code> */
|
69
|
public static final String WARNING_ICON = "warning_icon";
|
70
|
/** Constant <code>BLACK_SQUARE_ICON="black_square_icon"</code> */
|
71
|
public static final String BLACK_SQUARE_ICON = "black_square_icon";
|
72
|
/** Constant <code>HOMOTYPIC_SYN_ICON="homotypic_syn_icon"</code> */
|
73
|
public static final String HOMOTYPIC_SYN_ICON = "homotypic_syn_icon";
|
74
|
/** Constant <code>HOMOTYPIC_SYN_ORIGINAL_ICON="homotypic_syn_original_icon"</code> */
|
75
|
public static final String HOMOTYPIC_SYN_ORIGINAL_ICON = "homotypic_syn_original_icon";
|
76
|
/** Constant <code>HETEROTYPIC_SYN_ICON="heterotypic_syn_icon"</code> */
|
77
|
public static final String HETEROTYPIC_SYN_ICON = "heterotypic_syn_icon";
|
78
|
public static final String NOM_INVAL_NUD_SYN_ICON = "nom_inval_nud_syn_icon";
|
79
|
public static final String HOMOTYPIC_SYNONYM_IN_HETEROTYPIC_GROUP_ICON = "homotypic_synonym_in_heterotypic_group_icon";
|
80
|
/** Constant <code>HETEROTYPIC_SYN_ORIGINAL_ICON="heterotypic_syn_original_icon"</code> */
|
81
|
public static final String HETEROTYPIC_SYN_ORIGINAL_ICON = "heterotypic_syn_original_icon";
|
82
|
/** Constant <code>MISAPPLIED_NAME_ICON="misapplied_icon"</code> */
|
83
|
public static final String MISAPPLIED_NAME_ICON = "misapplied_icon";
|
84
|
/** Constant <code>PRO_PARTE_SYNONYM_ICON="pro_parte_synonym_icon"</code> */
|
85
|
public static final String PRO_PARTE_SYNONYM_ICON = "proparte_syn_icon";
|
86
|
/** Constant <code>PRO_PARTE_SYNONYM_ICON="pro_parte_synonym_icon"</code> */
|
87
|
public static final String PARTIAL_SYNONYM_ICON = "partial_syn_icon";
|
88
|
/** Constant <code>CONCEPT_ICON="concept_icon"</code> */
|
89
|
public static final String CONCEPT_ICON = "concept_icon";
|
90
|
/** Constant <code>AUTONYM_ICON="autonym_icon"</code> */
|
91
|
public static final String AUTONYM_ICON = "autonym_icon";
|
92
|
/** Constant <code>BASIONYM_ICON="basionym_icon"</code> */
|
93
|
public static final String BASIONYM_ICON = "basionym_icon";
|
94
|
/** Constant <code>ORTHOGRAPHIC_VARIANT_ICON="orthographic_variants_icon"</code> */
|
95
|
public static final String ORTHOGRAPHIC_VARIANT_ICON = "orthographic_variants_icon";
|
96
|
/** Constant <code>DB_ICON="db_icon"</code> */
|
97
|
public static final String DB_ICON = "db_icon";
|
98
|
/** Constant <code>MOVE_ICON="move_icon"</code> */
|
99
|
public static final String MOVE_ICON = "move_icon";
|
100
|
/** Constant <code>ACTIVE_DELETE_ICON="active_delete_icon"</code> */
|
101
|
public static final String ACTIVE_DELETE_ICON = "active_delete_icon";
|
102
|
/** Constant <code>SYNONYM_TO_TAXON_ICON="synoynm_to_taxon_icon"</code> */
|
103
|
public static final String SYNONYM_TO_TAXON_ICON = "synoynm_to_taxon_icon";
|
104
|
/** Constant <code>OPEN_TAXON_ICON="open_taxon_icon"</code> */
|
105
|
public static final String OPEN_TAXON_ICON = "open_taxon_icon";
|
106
|
/** Constant <code>ADD_CHILD_TAXON_ICON="add_taxon_icon"</code> */
|
107
|
public static final String ADD_CHILD_TAXON_ICON = "add_taxon_icon";
|
108
|
/** Constant <code>SWAP_SYNONYM_AND_TAXON_ICON="swap_syn_and_tax_icon"</code> */
|
109
|
public static final String SWAP_SYNONYM_AND_TAXON_ICON = "swap_syn_and_tax_icon";
|
110
|
/** Constant <code>QUICK_ADD_ICON="quick_add_icon"</code> */
|
111
|
public static final String QUICK_ADD_ICON = "quick_add_icon";
|
112
|
/** Constant <code>TAXON_TO_SYNONYM_ICON="tax_to_syn_icon"</code> */
|
113
|
public static final String TAXON_TO_SYNONYM_ICON = "tax_to_syn_icon";
|
114
|
/** Constant <code>ERROR_ANNOTATION_ICON="error_annotation_icon"</code> */
|
115
|
public static final String ERROR_ANNOTATION_ICON = "error_annotation_icon";
|
116
|
/** Constant <code>EDIT_BITMAP_ICON="edit_bitmap_icon"</code> */
|
117
|
public static final String EDIT_BITMAP_ICON = "edit_bitmap_icon";
|
118
|
/** Constant <code>IMG_DATASOURCE_CONNECTED="IMG_DATASOURCE_CONNECTED"</code> */
|
119
|
public static final String IMG_DATASOURCE_CONNECTED = "IMG_DATASOURCE_CONNECTED";
|
120
|
/** Constant <code>IMG_DATASOURCE_DISCONNECTED="IMG_DATASOURCE_DISCONNECTED"</code> */
|
121
|
public static final String IMG_DATASOURCE_DISCONNECTED = "IMG_DATASOURCE_DISCONNECTED";
|
122
|
/** Constant <code>IMG_NOT_FOUND="IMG_NOT_FOUND"</code> */
|
123
|
public static final String IMG_NOT_FOUND = "IMG_NOT_FOUND";
|
124
|
/** Constant <code>WARNING_ANNOTATION_ICON="warning"</code> */
|
125
|
public static final String WARNING_ANNOTATION_ICON = "warning";
|
126
|
|
127
|
/** Constant <code>LOCK_ICON="locked"</code> */
|
128
|
public static final String LOCK_ICON = "lock";
|
129
|
|
130
|
public static final String SYNCED = "synced";
|
131
|
public static final String REFRESH = "refresh";
|
132
|
|
133
|
/** Constant <code>LOCK_OPEN_ICON="lock_open"</code> */
|
134
|
public static final String LOCK_OPEN_ICON = "lock_open";
|
135
|
|
136
|
/** Constant <code>THREE_PRONGED_EQUAL="3_pronged_equal"</code> */
|
137
|
public static final String THREE_PRONGED_EQUAL = "3_pronged_equal";
|
138
|
/** Constant <code>TWO_PRONGED_EQUAL="2_pronged_equal"</code> */
|
139
|
public static final String TWO_PRONGED_EQUAL = "2_pronged_equal";
|
140
|
/** Constant <code>MISAPPLIED_NAME="misapplied_name"</code> */
|
141
|
public static final String MISAPPLIED_NAME = "misapplied_name";
|
142
|
/** Constant <code>ORPHANED_TAXON="orphaned_taxon"</code> */
|
143
|
public static final String ORPHANED_TAXON = "orphaned_taxon";
|
144
|
/** Constant <code>EXPAND_ALL="expand_all"</code> */
|
145
|
public static final String EXPAND_ALL = "expand_all";
|
146
|
public static final String EXPAND = "expand";
|
147
|
/** Constant <code>COLLAPSE_ALL="collapse_all"</code> */
|
148
|
public static final String COLLAPSE_ALL = "collapse_all";
|
149
|
|
150
|
public static final String SWITCH_VIEW_TYPE = "switch_view_type";
|
151
|
public static final String SETTINGS = "settings";
|
152
|
public static final String EXPORT = "export";
|
153
|
public static final String IMPORT = "import";
|
154
|
|
155
|
//derivative icons
|
156
|
public static final String TISSUE_SAMPLE_DERIVATE = "tissue_sample_derivate";
|
157
|
public static final String TISSUE_SAMPLE_DERIVATE_CHARACTER_DATA = "tissue_sample_derivate_character_data";
|
158
|
public static final String DNA_SAMPLE_DERIVATE = "dna_sample_derivate";
|
159
|
public static final String DNA_SAMPLE_DERIVATE_CHARACTER_DATA = "dna_sample_derivate_character_data";
|
160
|
public static final String FIELD_UNIT = "field_unit";
|
161
|
public static final String FIELD_UNIT_CHARACTER_DATA = "field_unit_character_data";
|
162
|
public static final String SPECIMEN_DERIVATE = "specimen_derivate";
|
163
|
public static final String SPECIMEN_DERIVATE_TYPE = "specimen_derivate_type";
|
164
|
public static final String SPECIMEN_DERIVATE_CHARACTER_DATA = "specimen_derivate_character_data";
|
165
|
public static final String ARTWORK_DERIVATE = "artwork_derivate";
|
166
|
public static final String ARTWORK_DERIVATE_CHARACTER_DATA = "artwork_derivate_character_data";
|
167
|
public static final String SPECIMEN_SCAN_DERIVATE = "specimen_scan_derivate";
|
168
|
public static final String SPECIMEN_SCAN_DERIVATE_CHARACTER_DATA = "specimen_scan_derivate_character_data";
|
169
|
public static final String LIVING_PLANT_PHOTO_DERIVATE = "living_plant_photo_derivate";
|
170
|
public static final String LIVING_PLANT_PHOTO_DERIVATE_CHARACTER_DATA = "living_plant_photo_derivate_character_data";
|
171
|
public static final String DETAIL_IMAGE_DERIVATE = "detail_image_derivate";
|
172
|
public static final String DETAIL_IMAGE_DERIVATE_CHARACTER_DATA = "detail_image_derivate_character_data";
|
173
|
public static final String SEQUENCE_DERIVATE = "sequence_derivate";
|
174
|
public static final String AMPLIFICATION_DERIVATE = "amplification_derivate";
|
175
|
public static final String SINGLE_READ_DERIVATE = "single_read_derivate";
|
176
|
public static final String SINGLE_READ_DERIVATE_MULTILINK = "single_read_derivate_multilink";
|
177
|
public static final String DEFAULT_DERIVATIVE = "default_derivate";
|
178
|
|
179
|
public static final String CHARACTER_DATA_DERIVATE = "character_data_derivate";
|
180
|
|
181
|
public static final String WEB = "web";
|
182
|
public static final String DATE = "dates";
|
183
|
|
184
|
public static final String FLAT = "flat";
|
185
|
public static final String HIERARCHICAL = "hierarchical";
|
186
|
|
187
|
public static final String LIGHT_BULB = "light_bulb";
|
188
|
public static final String HELP_TOPIC = "help_icon";
|
189
|
public static final String VALIDATE_ICON = "VALIDATE_ICON";
|
190
|
public static final String FUNNEL_ICON = "FUNNEL_ICON";
|
191
|
public static final String FUNNEL_ICON_EXCLAMATION = "FUNNEL_ICON_EXCLAMATION";
|
192
|
|
193
|
|
194
|
/***************************************************************************
|
195
|
* IMAGE REGISTRY
|
196
|
**************************************************************************/
|
197
|
private ImageRegistry imageRegistry;
|
198
|
|
199
|
/**
|
200
|
* <p>getImageDescriptor</p>
|
201
|
*
|
202
|
* @param key a {@link java.lang.String} object.
|
203
|
* @return a {@link org.eclipse.jface.resource.ImageDescriptor} object.
|
204
|
*/
|
205
|
public static ImageDescriptor getImageDescriptor(String key) {
|
206
|
return getInstance().getImageRegistry().getDescriptor(key);
|
207
|
}
|
208
|
|
209
|
/**
|
210
|
* <p>getImage</p>
|
211
|
*
|
212
|
* @param key a {@link java.lang.String} object.
|
213
|
* @return a {@link org.eclipse.swt.graphics.Image} object.
|
214
|
*/
|
215
|
public static Image getImage(String key) {
|
216
|
return getInstance().getImageRegistry().get(key);
|
217
|
}
|
218
|
|
219
|
/**
|
220
|
* Gets an image for the given URL. Adds the image to the registry as needed.
|
221
|
*
|
222
|
* @param uri a {@link java.net.URI} object.
|
223
|
* @return a {@link org.eclipse.swt.graphics.Image} object.
|
224
|
*/
|
225
|
public static Image getImage(URI uri) {
|
226
|
|
227
|
String key = uri.toString();
|
228
|
ImageRegistry registry = getInstance().getImageRegistry();
|
229
|
|
230
|
Image image = registry.get(key);
|
231
|
|
232
|
if (image == null) {
|
233
|
ImageDescriptor desc;
|
234
|
try {
|
235
|
desc = ImageDescriptor.createFromURL(new URL(key));
|
236
|
registry.put(key, desc);
|
237
|
image = registry.get(key);
|
238
|
} catch (DeviceResourceException e) {
|
239
|
return getImageNotFound();
|
240
|
} catch (MalformedURLException e) {
|
241
|
// should never happen
|
242
|
} catch (Exception e) {
|
243
|
MessagingUtils.error(ImageResources.class, e);
|
244
|
}
|
245
|
|
246
|
// logger.warn(ImageDescriptor.getMissingImageDescriptor().getClass());
|
247
|
// logger.warn(desc.getClass());
|
248
|
//
|
249
|
// if (ImageDescriptor.getMissingImageDescriptor().equals(desc)) {
|
250
|
// logger.warn("img not found");
|
251
|
// }
|
252
|
|
253
|
}
|
254
|
|
255
|
return image;
|
256
|
}
|
257
|
|
258
|
/**
|
259
|
* <p>getImageNotFound</p>
|
260
|
*
|
261
|
* @return a {@link org.eclipse.swt.graphics.Image} object.
|
262
|
*/
|
263
|
public static Image getImageNotFound() {
|
264
|
return getImage(ImageResources.IMG_NOT_FOUND);
|
265
|
}
|
266
|
|
267
|
/**
|
268
|
* <p>Getter for the field <code>imageRegistry</code>.</p>
|
269
|
*
|
270
|
* @return a {@link org.eclipse.jface.resource.ImageRegistry} object.
|
271
|
*/
|
272
|
public ImageRegistry getImageRegistry() {
|
273
|
if (imageRegistry == null) {
|
274
|
imageRegistry = TaxeditorStorePlugin.getDefault().createImageRegistry();
|
275
|
initializeImageRegistry(imageRegistry);
|
276
|
}
|
277
|
return imageRegistry;
|
278
|
}
|
279
|
|
280
|
/**
|
281
|
* <p>initializeImageRegistry</p>
|
282
|
*
|
283
|
* @param registry a {@link org.eclipse.jface.resource.ImageRegistry} object.
|
284
|
*/
|
285
|
protected void initializeImageRegistry(ImageRegistry registry) {
|
286
|
registerImage(registry, COPY_ICON,
|
287
|
"copy_edit.png");
|
288
|
registerImage(registry, PASTE_ICON,
|
289
|
"paste_edit.png");
|
290
|
registerImage(registry, ADD_ICON,
|
291
|
"add_no_bg.gif");
|
292
|
registerImage(registry, ADD_ICON_GREEN,
|
293
|
"add.gif");
|
294
|
registerImage(registry, MIN_ICON,
|
295
|
"min.gif");
|
296
|
registerImage(registry, ADD_EDIT,
|
297
|
"add_edit.gif");
|
298
|
registerImage(registry, TRASH_ICON,
|
299
|
"trash.gif");
|
300
|
registerImage(registry, EDIT_ICON,
|
301
|
"text.gif");
|
302
|
registerImage(registry, EDIT_LOGO_ICON,
|
303
|
"edit_16x16.ico");
|
304
|
registerImage(registry, WARNING_ICON,
|
305
|
"warn_tsk.gif");
|
306
|
registerImage(registry, BLACK_SQUARE_ICON,
|
307
|
"accepted_small.gif");
|
308
|
registerImage(registry, HOMOTYPIC_SYN_ICON,
|
309
|
"homosyn_no_bg.gif");
|
310
|
registerImage(registry, HOMOTYPIC_SYN_ORIGINAL_ICON,
|
311
|
"homosyn_original_no_bg.gif");
|
312
|
registerImage(registry, HETEROTYPIC_SYN_ICON,
|
313
|
"heterosyn_no_bg.gif");
|
314
|
registerImage(registry, NOM_INVAL_NUD_SYN_ICON,
|
315
|
"nominval_nud_no_bg.gif");
|
316
|
registerImage(registry, HETEROTYPIC_SYN_ORIGINAL_ICON,
|
317
|
"heterosyn_original_no_bg.gif");
|
318
|
registerImage(registry, HOMOTYPIC_SYNONYM_IN_HETEROTYPIC_GROUP_ICON,
|
319
|
"homotypic_syn_hetero_group.gif");
|
320
|
registerImage(registry, MISAPPLIED_NAME_ICON,
|
321
|
"misapplied_no_bg.gif");
|
322
|
registerImage(registry, PRO_PARTE_SYNONYM_ICON,
|
323
|
"proparte-bright.gif");
|
324
|
registerImage(registry, PARTIAL_SYNONYM_ICON,
|
325
|
"proparte-dark.gif");
|
326
|
registerImage(registry, CONCEPT_ICON,
|
327
|
"concept_no_bg.gif");
|
328
|
registerImage(registry, AUTONYM_ICON,
|
329
|
"autonym_no_bg.gif");
|
330
|
registerImage(registry, BASIONYM_ICON,
|
331
|
"basionym_no_bg.gif");
|
332
|
registerImage(registry, ORTHOGRAPHIC_VARIANT_ICON,
|
333
|
"orthovariant_no_bg.gif");
|
334
|
registerImage(registry, DB_ICON,
|
335
|
"db.gif");
|
336
|
registerImage(registry, MOVE_ICON,
|
337
|
"correction_change.gif");
|
338
|
registerImage(registry, ACTIVE_DELETE_ICON,
|
339
|
"delete_edit.gif");
|
340
|
registerImage(registry, SYNONYM_TO_TAXON_ICON,
|
341
|
"change.gif");
|
342
|
registerImage(registry, OPEN_TAXON_ICON,
|
343
|
"open.gif");
|
344
|
registerImage(registry, ADD_CHILD_TAXON_ICON,
|
345
|
"new_child.gif");
|
346
|
registerImage(registry,
|
347
|
SWAP_SYNONYM_AND_TAXON_ICON, "swap2.gif");
|
348
|
registerImage(registry, QUICK_ADD_ICON,
|
349
|
"quick_add.gif");
|
350
|
registerImage(registry, TAXON_TO_SYNONYM_ICON,
|
351
|
"tax_to_syn.gif");
|
352
|
registerImage(registry, ERROR_ANNOTATION_ICON,
|
353
|
"error_co.gif");
|
354
|
registerImage(registry, EDIT_BITMAP_ICON,
|
355
|
"256color_16x16.bmp");
|
356
|
registerImage(registry, IMG_DATASOURCE_CONNECTED,
|
357
|
"prj_obj.gif");
|
358
|
registerImage(registry, IMG_DATASOURCE_DISCONNECTED,
|
359
|
"cprj_obj.gif");
|
360
|
registerImage(registry, IMG_NOT_FOUND,
|
361
|
"pic_not_found.PNG");
|
362
|
registerImage(registry, WARNING_ANNOTATION_ICON,
|
363
|
"warning_co.gif");
|
364
|
registerImage(registry, THREE_PRONGED_EQUAL,
|
365
|
"3_pronged_equal_small.GIF");
|
366
|
registerImage(registry, TWO_PRONGED_EQUAL,
|
367
|
"2_pronged_equal_small.GIF");
|
368
|
registerImage(registry, MISAPPLIED_NAME,
|
369
|
"ma_12x12.gif");
|
370
|
registerImage(registry, ORPHANED_TAXON,
|
371
|
"orphaned.gif");
|
372
|
registerImage(registry, EXPAND_ALL,
|
373
|
"expandAll.jpg");
|
374
|
registerImage(registry, EXPAND,
|
375
|
"expand.gif");
|
376
|
registerImage(registry, COLLAPSE_ALL,
|
377
|
"collapseall.gif");
|
378
|
registerImage(registry, BROWSE_ICON,
|
379
|
"prj_obj.gif");
|
380
|
registerImage(registry, LOCK_ICON,
|
381
|
"lock.png");
|
382
|
registerImage(registry, SYNCED,
|
383
|
"synced.gif");
|
384
|
registerImage(registry, REFRESH,
|
385
|
"refresh.gif");
|
386
|
registerImage(registry, LOCK_OPEN_ICON,
|
387
|
"lock_open.png");
|
388
|
registerImage(registry, SWITCH_VIEW_TYPE,
|
389
|
"switch_view_type-16x16-32.png");
|
390
|
registerImage(registry, SETTINGS,
|
391
|
"settings.gif");
|
392
|
registerImage(registry, DNA_SAMPLE_DERIVATE,
|
393
|
"dna_derivate-16x16-32.png");
|
394
|
registerImage(registry, DNA_SAMPLE_DERIVATE_CHARACTER_DATA,
|
395
|
"dna_derivate_data-16x16-32.png");
|
396
|
registerImage(registry, FIELD_UNIT,
|
397
|
"fieldunit-16x16-32.png");
|
398
|
registerImage(registry, FIELD_UNIT_CHARACTER_DATA,
|
399
|
"fieldunit_data-16x16-32.png");
|
400
|
registerImage(registry, SPECIMEN_DERIVATE,
|
401
|
"specimen_derivate-16x16-32.png");
|
402
|
registerImage(registry, SPECIMEN_DERIVATE_TYPE,
|
403
|
"specimen_derivate_type-16x16-32.png");
|
404
|
registerImage(registry, SPECIMEN_DERIVATE_CHARACTER_DATA,
|
405
|
"specimen_derivate_data-16x16-32.png");
|
406
|
registerImage(registry, ARTWORK_DERIVATE,
|
407
|
"artwork_derivate-16x16-32.png");
|
408
|
registerImage(registry, ARTWORK_DERIVATE_CHARACTER_DATA,
|
409
|
"artwork_derivate_data-16x16-32.png");
|
410
|
registerImage(registry, SPECIMEN_SCAN_DERIVATE,
|
411
|
"specimen_scan_derivate-16x16-32.png");
|
412
|
registerImage(registry, SPECIMEN_SCAN_DERIVATE_CHARACTER_DATA,
|
413
|
"specimen_scan_derivate_data-16x16-32.png");
|
414
|
registerImage(registry, LIVING_PLANT_PHOTO_DERIVATE,
|
415
|
"living_plant_photo_derivate-16x16-32.png");
|
416
|
registerImage(registry, LIVING_PLANT_PHOTO_DERIVATE_CHARACTER_DATA,
|
417
|
"living_plant_photo_derivate_data-16x16-32.png");
|
418
|
registerImage(registry, DETAIL_IMAGE_DERIVATE,
|
419
|
"detail_image_derivate-16x16-32.png");
|
420
|
registerImage(registry, DETAIL_IMAGE_DERIVATE_CHARACTER_DATA,
|
421
|
"detail_image_derivate_data-16x16-32.png");
|
422
|
registerImage(registry, TISSUE_SAMPLE_DERIVATE,
|
423
|
"tissue_sample-16x16-32.png");
|
424
|
registerImage(registry, TISSUE_SAMPLE_DERIVATE_CHARACTER_DATA,
|
425
|
"tissue_sample_data-16x16-32.png");
|
426
|
registerImage(registry, SEQUENCE_DERIVATE,
|
427
|
"sequence_derivate-16x16-32.png");
|
428
|
registerImage(registry, AMPLIFICATION_DERIVATE,
|
429
|
"amplification_derivate-16x16-32.png");
|
430
|
registerImage(registry, SINGLE_READ_DERIVATE,
|
431
|
"single_read_derivate-16x16-32.png");
|
432
|
registerImage(registry, SINGLE_READ_DERIVATE_MULTILINK,
|
433
|
"single_read_derivate_multilink-16x16-32.png");
|
434
|
registerImage(registry, CHARACTER_DATA_DERIVATE,
|
435
|
"character_data_derivate-16x16-32.png");
|
436
|
registerImage(registry, DEFAULT_DERIVATIVE,
|
437
|
"default_derivate-16x16-32.png");
|
438
|
registerImage(registry, EXPORT,
|
439
|
"export.gif");
|
440
|
registerImage(registry, IMPORT,
|
441
|
"import_wiz.gif");
|
442
|
|
443
|
registerImage(registry, WEB,
|
444
|
"web.gif");
|
445
|
registerImage(registry, DATE,
|
446
|
"dates.gif");
|
447
|
|
448
|
registerImage(registry, FLAT,
|
449
|
"flat.gif");
|
450
|
registerImage(registry, HIERARCHICAL,
|
451
|
"hierarchical.gif");
|
452
|
registerImage(registry, LIGHT_BULB,
|
453
|
"smartmode_co.gif");
|
454
|
registerImage(registry, HELP_TOPIC,
|
455
|
"help_topic.gif");
|
456
|
registerImage(registry, VALIDATE_ICON,
|
457
|
"validate.gif");
|
458
|
registerImage(registry, FUNNEL_ICON,
|
459
|
"funnel-icon.png");
|
460
|
registerImage(registry, FUNNEL_ICON_EXCLAMATION,
|
461
|
"funnel-exclamation-icon.png");
|
462
|
|
463
|
}
|
464
|
|
465
|
private void registerImage(ImageRegistry registry, String key,
|
466
|
String fileName) {
|
467
|
try {
|
468
|
IPath path = new Path("icons/" + fileName); //$NON-NLS-1$
|
469
|
URL url = FileLocator.find(TaxeditorStorePlugin.getDefault().getBundle(), path, null);
|
470
|
if (url != null) {
|
471
|
ImageDescriptor desc = ImageDescriptor.createFromURL(url);
|
472
|
registry.put(key, desc);
|
473
|
}
|
474
|
} catch (Exception e) {
|
475
|
}
|
476
|
}
|
477
|
}
|