List of usage examples for javax.swing Action LARGE_ICON_KEY
String LARGE_ICON_KEY
To view the source code for javax.swing Action LARGE_ICON_KEY.
Click Source Link
Icon
. From source file:com.diversityarrays.kdxplore.curate.TrialDataEditor.java
private JSplitPane createStatsAndSamplesTable(JComponent top) { curationTableModel.addPropertyChangeListener(CurationTableModel.PROPERTY_TRAIT_INSTANCES, traitInstancesChanged);//from w w w.j av a2s . c o m onlyUneditedCheckbox.addActionListener(filtersActionListener); hideInactivePlots.addActionListener(filtersActionListener); if (onlyRowsWithScoresCheckbox != null) { onlyRowsWithScoresCheckbox.addActionListener(filtersActionListener); onlyRowsWithScoresCheckbox.setEnabled(curationTableModel.hasAnyTraitInstanceColumns()); } JComponent tagFilters = null; if (!curationData.getSortedTagLabels().isEmpty()) { tagFilters = tagLabelFiltersButton; } JComponent posFilters = null; if (curationData.hasAnySpecimens()) { updatePlotSpecimenIcon(); posFilters = plotOrSpecimenFilterButton; } plotOrSpecimenFilterAction.putValue(Action.LARGE_ICON_KEY, inactivePlotOrSpecimenFilterIcon); plotOrSpecimenFilterAction.putValue(Action.SHORT_DESCRIPTION, "Filter on Plot/Specimen"); tagLabelFiltersAction.putValue(Action.LARGE_ICON_KEY, inactiveTagFilterIcon); tagLabelFiltersAction.putValue(Action.SHORT_DESCRIPTION, "Filter on Tags"); curationTablePanel = new TitledTablePanelWithResizeControls(SAMPLES_TABLE_NAME, curationTable, smallFont, hideInactivePlots, onlyUneditedCheckbox, onlyRowsWithScoresCheckbox, tagFilters, posFilters, new JButton(curationHelpAction)); // curationTablePanel.scrollPane.setCorner(JScrollPane.UPPER_RIGHT_CORNER, // makeUndockButton()); Transformer<TraitInstance, Color> traitInstanceColorProvider = new Transformer<TraitInstance, Color>() { @Override public Color transform(TraitInstance ti) { ColorPair cp = colorProviderFactory.get().getTraitInstanceColor(ti); return cp.getBackground(); } }; markerPanelManager = new MarkerPanelManager(curationData.getTrial(), curationTableModel, curationTable, curationTablePanel, traitInstanceColorProvider, curationTableSelectionModel); // fieldViewIcon = KDClientUtils.getIcon(ImageId.FIELD_VIEW_24); samplesTableIcon = KDClientUtils.getIcon(ImageId.TABLE_24); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, top, curationTablePanel); splitPane.setResizeWeight(0.3); splitPane.setOneTouchExpandable(true); return splitPane; }
From source file:org.colombbus.tangara.commons.resinject.ActionInjecter.java
private void injectLargeIcon() { String largeIconKey = actionKey + LARGE_ICON_SUFFIX; if (classResource.containsKey(largeIconKey)) { Icon largeIconValue = classResource.getImageIcon(largeIconKey); action.putValue(Action.LARGE_ICON_KEY, largeIconValue); }//w w w.j av a 2 s . c om }
From source file:org.languagetool.gui.Main.java
private JMenuBar createMenuBar() { JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu(getLabel("guiMenuFile")); fileMenu.setMnemonic(getMnemonic("guiMenuFile")); JMenu editMenu = new JMenu(getLabel("guiMenuEdit")); editMenu.setMnemonic(getMnemonic("guiMenuEdit")); JMenu grammarMenu = new JMenu(getLabel("guiMenuGrammar")); grammarMenu.setMnemonic(getMnemonic("guiMenuGrammar")); JMenu helpMenu = new JMenu(getLabel("guiMenuHelp")); helpMenu.setMnemonic(getMnemonic("guiMenuHelp")); fileMenu.add(openAction);// ww w . j a va 2s. c o m fileMenu.add(saveAction); fileMenu.add(saveAsAction); recentFilesMenu = new JMenu(getLabel("guiMenuRecentFiles")); recentFilesMenu.setMnemonic(getMnemonic("guiMenuRecentFiles")); fileMenu.add(recentFilesMenu); updateRecentFilesMenu(); fileMenu.addSeparator(); fileMenu.add(new HideAction()); fileMenu.addSeparator(); fileMenu.add(new QuitAction()); grammarMenu.add(checkAction); JCheckBoxMenuItem item = new JCheckBoxMenuItem(autoCheckAction); grammarMenu.add(item); JCheckBoxMenuItem showResult = new JCheckBoxMenuItem(showResultAction); grammarMenu.add(showResult); grammarMenu.add(new CheckClipboardAction()); grammarMenu.add(new TagTextAction()); grammarMenu.add(new AddRulesAction()); grammarMenu.add(new OptionsAction()); grammarMenu.add(new SelectFontAction()); JMenu lafMenu = new JMenu(messages.getString("guiLookAndFeelMenu")); UIManager.LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels(); ButtonGroup buttonGroup = new ButtonGroup(); for (UIManager.LookAndFeelInfo laf : lafInfo) { if (!"Nimbus".equals(laf.getName())) { continue; } addLookAndFeelMenuItem(lafMenu, laf, buttonGroup); } for (UIManager.LookAndFeelInfo laf : lafInfo) { if ("Nimbus".equals(laf.getName())) { continue; } addLookAndFeelMenuItem(lafMenu, laf, buttonGroup); } grammarMenu.add(lafMenu); helpMenu.add(new AboutAction()); undoRedo.undoAction.putValue(Action.NAME, getLabel("guiMenuUndo")); undoRedo.undoAction.putValue(Action.MNEMONIC_KEY, getMnemonic("guiMenuUndo")); undoRedo.redoAction.putValue(Action.NAME, getLabel("guiMenuRedo")); undoRedo.redoAction.putValue(Action.MNEMONIC_KEY, getMnemonic("guiMenuRedo")); editMenu.add(undoRedo.undoAction); editMenu.add(undoRedo.redoAction); editMenu.addSeparator(); Action cutAction = new DefaultEditorKit.CutAction(); cutAction.putValue(Action.SMALL_ICON, getImageIcon("sc_cut.png")); cutAction.putValue(Action.LARGE_ICON_KEY, getImageIcon("lc_cut.png")); cutAction.putValue(Action.NAME, getLabel("guiMenuCut")); cutAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_T); editMenu.add(cutAction); Action copyAction = new DefaultEditorKit.CopyAction(); copyAction.putValue(Action.SMALL_ICON, getImageIcon("sc_copy.png")); copyAction.putValue(Action.LARGE_ICON_KEY, getImageIcon("lc_copy.png")); copyAction.putValue(Action.NAME, getLabel("guiMenuCopy")); copyAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_C); editMenu.add(copyAction); Action pasteAction = new DefaultEditorKit.PasteAction(); pasteAction.putValue(Action.SMALL_ICON, getImageIcon("sc_paste.png")); pasteAction.putValue(Action.LARGE_ICON_KEY, getImageIcon("lc_paste.png")); pasteAction.putValue(Action.NAME, getLabel("guiMenuPaste")); pasteAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_P); editMenu.add(pasteAction); editMenu.addSeparator(); editMenu.add(new SelectAllAction()); menuBar.add(fileMenu); menuBar.add(editMenu); menuBar.add(grammarMenu); menuBar.add(helpMenu); return menuBar; }