@Override public Icon getSmallIcon() { if (smallIconPath != null && smallIcon == null) { smallIcon = UIUtils.loadImageIcon(smallIconPath, toolViewClass); } return smallIcon; }
@Override public Icon getLargeIcon() { if (largeIconPath != null && largeIcon == null) { largeIcon = UIUtils.loadImageIcon(largeIconPath, toolViewClass); } return largeIcon; }
private RemoveAliasAction() { super("Remove alias", UIUtils.loadImageIcon("icons/Minus16.gif")); } @Override
/** * Gets the image icon loaded from the given resource path. * <p>Note that this method only works for images found in the classpath of the class loader which loaded this {@link UIUtils} class. * If you are not sure, you should better use {@link #getImageURL(String, Class)}.</p> * * @param resourcePath the resource path * * @return an image icon loaded from the given resource path or <code>null</code> if it could not be found */ public static ImageIcon loadImageIcon(String resourcePath) { return loadImageIcon(resourcePath, UIUtils.class); }
public static JComponent createToolBarSeparator() { if (_separatorIcon == null) { _separatorIcon = UIUtils.loadImageIcon("icons/Separator24.gif"); } return new JLabel(_separatorIcon); }
private ImageIcon loadIcon(String iconPath) { final ImageIcon icon; URL resource = MaskManagerForm.class.getResource(iconPath); if (resource != null) { icon = new ImageIcon(resource); } else { icon = UIUtils.loadImageIcon(iconPath); } return icon; }
public static void addCellRenderer(final JTree jTree) { final ImageIcon dapIcon = UIUtils.loadImageIcon("/org/esa/beam/opendap/images/icons/DRsProduct16.png", CatalogTree.class); final ImageIcon fileIcon = UIUtils.loadImageIcon("/org/esa/beam/opendap/images/icons/FRsProduct16.png", CatalogTree.class); final ImageIcon errorIcon = UIUtils.loadImageIcon("/org/esa/beam/opendap/images/icons/NoAccess16.png", CatalogTree.class); jTree.setToolTipText(null); jTree.setCellRenderer(new TreeCellRenderer(dapIcon, fileIcon, errorIcon)); }
MoveLayerUpAction(AppContext appContext) { super("Move Layer Up", UIUtils.loadImageIcon("icons/Up24.gif")); this.appContext = appContext; putValue(Action.ACTION_COMMAND_KEY, getClass().getName()); }
MoveLayerLeftAction(AppContext appContext) { super("Move Layer Left", UIUtils.loadImageIcon("icons/Left24.gif")); this.appContext = appContext; putValue(Action.ACTION_COMMAND_KEY, getClass().getName()); }
RemoveLayerAction(AppContext appContext) { super("Remove Layer", UIUtils.loadImageIcon("icons/Minus24.gif")); this.appContext = appContext; putValue(Action.ACTION_COMMAND_KEY, RemoveLayerAction.class.getName()); }
ZoomToLayerAction(AppContext appContext) { super("Zoom to Layer", UIUtils.loadImageIcon("icons/ZoomTo24.gif")); this.appContext = appContext; putValue(Action.ACTION_COMMAND_KEY, getClass().getName()); }
MoveLayerRightAction(AppContext appContext) { super("Move Layer Right", UIUtils.loadImageIcon("icons/Right24.gif")); this.appContext = appContext; putValue(Action.ACTION_COMMAND_KEY, getClass().getName()); }
MoveLayerDownAction(AppContext appContext) { super("Move Layer Down", UIUtils.loadImageIcon("icons/Down24.gif")); this.appContext = appContext; putValue(Action.ACTION_COMMAND_KEY, getClass().getName()); }
public RangeFinderInteractor() { modelPointList = new ArrayList<>(); currentModelPoint = new ModelPoint(); ImageIcon cursorIcon = UIUtils.loadImageIcon("cursors/RangeFinder.gif"); cursor = createRangeFinderCursor(cursorIcon); }
public LoadInsituAction(AbstractTimeSeries currentTimeSeries) { putValue(SHORT_DESCRIPTION, "Import in-situ source file"); putValue(LARGE_ICON_KEY, UIUtils.loadImageIcon("icons/Import24.gif")); this.currentTimeSeries = currentTimeSeries; }
private AbstractButton createRemoveInputButton() { final AbstractButton removeButton = ToolButtonFactory.createButton(UIUtils.loadImageIcon("icons/Minus24.gif"), false); removeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { listModel.removeElementsAt(inputPathsList.getSelectedIndices()); } }); return removeButton; }
private static AbstractButton createButton(final String path, String name) { final AbstractButton button = ToolButtonFactory.createButton(UIUtils.loadImageIcon(path), false); button.setName(name); return button; }
protected Icon getResourceIcon(ResourceBundle resourceBundle, String commandPropertyName) { String value = getResourceString(resourceBundle, commandPropertyName); if (value != null) { try { return UIUtils.loadImageIcon(value); } catch (RuntimeException e) { String message = String.format("failed to load icon for resource entry '%s=%s'", createResourceKey(commandPropertyName), value); Debug.trace(message); } } return null; }
VisibilityHR() { ImageIcon icon = UIUtils.loadImageIcon("icons/EyeIcon10.gif"); this.setBorder(UIManager.getBorder("TableHeader.cellBorder")); this.setText(null); this.setIcon(icon); this.setHorizontalAlignment(SwingConstants.CENTER); this.setPreferredSize(this.getPreferredSize()); }
protected AbstractButton getHelpButton() { if (helpId != null) { final AbstractButton helpButton = ToolButtonFactory.createButton(UIUtils.loadImageIcon("icons/Help22.png"), false); helpButton.setToolTipText("Help."); helpButton.setName("helpButton"); HelpSys.enableHelpOnButton(helpButton, helpId); HelpSys.enableHelpKey(getParentDialogContentPane(), helpId); return helpButton; } return null; }