/** * Returns the descriptor associated with the given key in this registry, * or <code>null</code> if none. * * @param key the key * @return the descriptor, or <code>null</code> if none * @since 1.0 */ public ImageDescriptor getDescriptor(String key) { Entry entry = getEntry(key); if (entry == null) { return null; } return entry.descriptor; }
/** * Returns the descriptor associated with the given key in this registry, * or <code>null</code> if none. * * @param key the key * @return the descriptor, or <code>null</code> if none * @since 2.1 */ public ImageDescriptor getDescriptor(String key) { Entry entry = getEntry(key); if (entry == null) { return null; } return entry.descriptor; }
/** * Returns the descriptor associated with the given key in this registry, * or <code>null</code> if none. * * @param key the key * @return the descriptor, or <code>null</code> if none * @since 2.1 */ public ImageDescriptor getDescriptor(String key) { Entry entry = getEntry(key); if (entry == null) { return null; } return entry.descriptor; }
/** * Adds (or replaces) an image descriptor to this registry. The first time * this new entry is retrieved, the image descriptor's image will be computed * (via </code>ImageDescriptor.createImage</code>) and remembered. * This method replaces an existing image descriptor associated with the * given key, but fails if there is a real image associated with it. * * @param key the key * @param descriptor the ImageDescriptor * @exception IllegalArgumentException if the key already exists */ public void put(String key, ImageDescriptor descriptor) { Entry entry = getEntry(key); if (entry == null) { entry = new Entry(); getTable().put(key, entry); } if (entry.image != null) { throw new IllegalArgumentException( "ImageRegistry key already in use: " + key); //$NON-NLS-1$ } entry.descriptor = descriptor; }
/** * Adds (or replaces) an image descriptor to this registry. The first time * this new entry is retrieved, the image descriptor's image will be computed * (via </code>ImageDescriptor.createImage</code>) and remembered. * This method replaces an existing image descriptor associated with the * given key, but fails if there is a real image associated with it. * * @param key the key * @param descriptor the ImageDescriptor * @exception IllegalArgumentException if the key already exists */ public void put(String key, ImageDescriptor descriptor) { Entry entry = getEntry(key); if (entry == null) { entry = new Entry(); getTable().put(key, entry); } if (entry.image != null) { throw new IllegalArgumentException( "ImageRegistry key already in use: " + key); //$NON-NLS-1$ } entry.descriptor = descriptor; }
/** * Adds (or replaces) an image descriptor to this registry. The first time * this new entry is retrieved, the image descriptor's image will be computed * (via </code>ImageDescriptor.createImage</code>) and remembered. * This method replaces an existing image descriptor associated with the * given key, but fails if there is a real image associated with it. * * @param key the key * @param descriptor the ImageDescriptor * @exception IllegalArgumentException if the key already exists */ public void put(String key, ImageDescriptor descriptor) { Entry entry = getEntry(key); if (entry == null) { entry = new Entry(); getTable().put(key, entry); } if (entry.image != null) { throw new IllegalArgumentException( "ImageRegistry key already in use: " + key); //$NON-NLS-1$ } entry.descriptor = descriptor; }
Entry entry = getEntry(key); if (entry == null) { return null;
Entry entry = getEntry(key); if (entry == null) { return null;
Entry entry = getEntry(key); if (entry == null) { return null;
Entry entry = getEntry(key);
Entry entry = getEntry(key);
Entry entry = getEntry(key);