public DCPopupBubble(final DCGlassPane glassPane, final String text, final int xOnScreen, final int yOnScreen, final String iconPath) { this(glassPane, text, xOnScreen, yOnScreen, ImageManager.get().getImageIcon(iconPath)); }
public DropTableDialog(final WindowContext windowContext, final UpdateableDatastore datastore, final Table table, final SchemaTree schemaTree) { super(windowContext, ImageManager.get().getImage("images/window/banner-tabledef.png")); _datastore = datastore; _table = table; _schemaTree = schemaTree; }
public HelpIcon(final String helpMessage) { this(helpMessage, imageManager.getImageIcon(IconUtils.ACTION_HELP)); }
@Override public Image getWindowIcon() { return imageManager.getImage(IconUtils.MODEL_RESULT); }
private static ImageIcon getCategoryIcon(final Class<?> cls, final boolean decorateWithFolder, final int newWidth) { final String bundledIconPath = getImagePathForClass(cls); if (!decorateWithFolder && bundledIconPath != null) { return _imageManager.getImageIcon(bundledIconPath, newWidth); } final Image decoration; final int decorationSize = newWidth * 3 / 4; if (bundledIconPath == null) { decoration = null; } else { final ClassLoader classLoader = cls.getClassLoader(); decoration = _imageManager.getImage(bundledIconPath, decorationSize, classLoader); } final Image folderIcon = _imageManager.getImage("images/component-types/category.png", newWidth); if (decoration == null) { return new ImageIcon(folderIcon); } final BufferedImage bufferedImage = new BufferedImage(newWidth, newWidth, BufferedImage.TYPE_INT_ARGB); bufferedImage.getGraphics().drawImage(folderIcon, 0, 0, null); bufferedImage.getGraphics().drawImage(decoration, newWidth - decorationSize, newWidth - decorationSize, null); return new ImageIcon(bufferedImage); }
private static ImageIcon getIconFromData(final ComponentDescriptor<?> componentDescriptor, final int width) { final String cacheKey = "remote: " + componentDescriptor.getDisplayName() + ",width=" + width; final Image image = _imageManager.getImageFromCache(cacheKey); ImageIcon imageIcon; if (image == null) { final HasIcon descriptorWithIcon = (HasIcon) componentDescriptor; if (descriptorWithIcon.getIconData() == null || descriptorWithIcon.getIconData().length == 0) { // If no data from server, use generic icon. (Then it will be possible to overlay it) final ClassLoader classLoader = componentDescriptor.getComponentClass().getClassLoader(); final String imagePath = getDescriptorImagePath(componentDescriptor, classLoader, true); if (imagePath == null) { return null; } imageIcon = _imageManager.getImageIcon(imagePath, width, classLoader); } else { imageIcon = new ImageIcon(descriptorWithIcon.getIconData()); } final BufferedImage bufferedImage = new BufferedImage(width, width, BufferedImage.TYPE_INT_ARGB); bufferedImage.getGraphics().drawImage(imageIcon.getImage(), 0, 0, width, width, null); imageIcon = new ImageIcon(bufferedImage); _imageManager.storeImageIntoCache(cacheKey, imageIcon.getImage()); } else { imageIcon = new ImageIcon(image); } return imageIcon; }
/** * Gets the singleton instance of ImageManager. * * @return * * @deprecated use {@link #get()} instead */ @Deprecated public static ImageManager getInstance() { return get(); }
public static Icon getColumnIcon(final Column column, final int iconSize) { if (column.isPrimaryKey()) { return _imageManager.getImageIcon(MODEL_COLUMN_KEY, iconSize); } return _imageManager.getImageIcon(MODEL_COLUMN, iconSize); }
@Override public Image getWindowIcon() { return imageManager.getImage(IconUtils.MENU_OPTIONS); }
public NeopostToolbarButton() { this(ImageManager.get().getImageIcon("images/powered-by-neopost-dark.png")); }
protected void setStatusValid() { _statusLabel.setText("Hadoop cluster ready"); _statusLabel.setIcon(imageManager.getImageIcon(IconUtils.STATUS_VALID, IconUtils.ICON_SIZE_SMALL)); } }
@Override public Image getWindowIcon() { return imageManager.getImage(IconUtils.MODEL_RESULT); }
private static Icon getButtonIcon(final String imagePath) { if (Strings.isNullOrEmpty(imagePath)) { return null; } return ImageManager.get().getImageIcon(imagePath, IconUtils.ICON_SIZE_BUTTON); }
protected void setStatusWarning(final String text) { _statusLabel.setText(text); _statusLabel.setIcon(imageManager.getImageIcon(IconUtils.STATUS_WARNING, IconUtils.ICON_SIZE_SMALL)); }
@Override public Image getWindowIcon() { return imageManager.getImage("images/model/reference-data.png"); }
public RemoveComponentMenuItem(final ComponentBuilder componentBuilder) { super("Remove component", ImageManager.get().getImageIcon(IconUtils.ACTION_REMOVE_DARK, IconUtils.ICON_SIZE_SMALL)); _componentBuilder = componentBuilder; addActionListener(this); }
private void setStatusError(final String text) { _statusLabel.setText(text); _statusLabel.setIcon(imageManager.getImageIcon(IconUtils.STATUS_ERROR, IconUtils.ICON_SIZE_SMALL)); _saveButton.setEnabled(false); }