private PopupButton createExistingDatastoresButton() { final PopupButton existingDatastoresButton = WidgetFactory.createDefaultPopupButton("Existing datastores", IconUtils.FILE_FOLDER); final JPopupMenu menu = existingDatastoresButton.getMenu(); final String[] datastoreNames = _datastoreCatalog.getDatastoreNames(); for (final String datastoreName : datastoreNames) { final Datastore datastore = _datastoreCatalog.getDatastore(datastoreName); final JMenuItem menuItem = WidgetFactory.createMenuItem(datastoreName, IconUtils.getDatastoreIcon(datastore, IconUtils.ICON_SIZE_MENU_ITEM)); menuItem.addActionListener(e -> _datastoreSelectedListener.datastoreSelected(datastore)); menu.add(menuItem); } return existingDatastoresButton; }
icon = IconUtils.getDatastoreIcon(datastore, IconUtils.ICON_SIZE_SMALL); result.setText(datastore.getName()); } else if (value instanceof InputColumn<?>) {
} else { _openJobButton.setEnabled(true); datastoreLabel.setIcon(IconUtils.getDatastoreIcon(datastore, IconUtils.ICON_SIZE_SMALL)); datastoreLabel.setToolTipText(null);
public void updateDatastores() { removeAll(); final String[] datastoreNames = _datastoreCatalog.getDatastoreNames(); for (int i = 0; i < datastoreNames.length; i++) { final Datastore datastore = _datastoreCatalog.getDatastore(datastoreNames[i]); final DetailedListItemPanel datastorePanel = new DetailedListItemPanel(IconUtils.getDatastoreIcon(datastore, IconUtils.ICON_SIZE_LARGE), "<html><b>" + datastore.getName() + "</b></html>", DatastorePanel.getDescription(datastore)); datastorePanel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(final MouseEvent e) { _datastoreSelectListener.datastoreSelected(datastore); } }); add(datastorePanel); } } }
.getTreeCellRendererComponent(tree, ((Datastore) value).getName(), selected, expanded, leaf, row, hasFocus); icon = IconUtils.getDatastoreIcon((Datastore) value, IconUtils.ICON_SIZE_MENU_ITEM); } else if (value instanceof Schema) { final Schema schema = ((Schema) value);
final Icon icon = IconUtils.getDatastoreIcon(datastore); final String description = getDescription(datastore);