/** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == menuItemWatch) { watchToggle.setSelected(menuItemWatch.getState()); } else { menuItemWatch.setState(watchToggle.isSelected()); } }
private void doTdiff() { doTdiff = !doTdiff; ((JCheckBoxMenuItem) tDiff).setState(doTdiff); // Only allow 2 active treebanks if(doTdiff) { List<FileTreeNode> activeTreebanks = FilePanel.getInstance().getActiveTreebanks(); for(int i = 2; i < activeTreebanks.size(); i++) activeTreebanks.get(i).setActive(false); } }
private void toggleDeobfuscation() { boolean deobfOn = !settings.isDeobfuscationOn(); settings.setDeobfuscationOn(deobfOn); settings.sync(); deobfToggleBtn.setSelected(deobfOn); deobfMenuItem.setState(deobfOn); reOpenFile(); }
private void setFlattenPackage(boolean value) { isFlattenPackage = value; settings.setFlattenPackage(isFlattenPackage); flatPkgButton.setSelected(isFlattenPackage); flatPkgMenuItem.setState(isFlattenPackage); Object root = treeModel.getRoot(); if (root instanceof JRoot) { JRoot treeRoot = (JRoot) root; treeRoot.setFlatPackages(isFlattenPackage); reloadTree(); } }
private void updateMenuItemState(InternalFrameEvent e) { getToolBar(e).getZoomComboBox().setSelectedItem( (int) (getSelectedGCDocument(e).getModelChart().getScaleFactor() * 1000.0) + "%"); GCPreferences preferences = getSelectedGCDocument(e).getPreferences(); for (Entry<String, JCheckBoxMenuItem> menuEntry : getMenuBar(e).getViewMenuItems().entrySet()) { JCheckBoxMenuItem item = menuEntry.getValue(); item.setState(preferences.getGcLineProperty(menuEntry.getKey())); } }
for (Entry<String, JCheckBoxMenuItem> menuEntry : ((GCViewerGuiMenuBar)gui.getJMenuBar()).getViewMenuItems().entrySet()) { JCheckBoxMenuItem item = menuEntry.getValue(); item.setState(preferences.getGcLineProperty(menuEntry.getKey()));
/** * Convenience method for obtaining the pre-generated main toolbar */ public JToolBar getToolBarMain(boolean isShowing) { if (jToolBarMain != null) { jcbmiViewToolbarMain.setState(isShowing); return jToolBarMain; } return (JToolBar) null; }
/** * Convenience method for obtaining the pre-generated toolbar */ public JToolBar getToolBar(boolean isShowing) { if (jToolBar != null) { jcbmiViewToolbar.setState(isShowing); return jToolBar; } return (JToolBar) null; }
/** * Convenience method for obtaining the pre-generated main toolbar */ public JToolBar getToolBarStyles(boolean isShowing) { if (jToolBarStyles != null) { jcbmiViewToolbarStyles.setState(isShowing); return jToolBarStyles; } return (JToolBar) null; }
private void cycleDisplayMode() { if(modeItems == null) return; modeItems[drawModePosition].setState(false); drawModePosition++; DrawingMode[] drawModes = mainTrack.getValidDrawingModes(); if (drawModePosition >= drawModes.length) drawModePosition = 0; modeItems[drawModePosition].setState(true); mainTrack.setDrawingMode(drawModes[drawModePosition]); }
@Override public JMenuItem getPopupPresenter() { if(item == null) { item = new JCheckBoxMenuItem(this); Boolean b = getAutoRefresh(); if(b != null) { item.setState(b); } } return item; } }
private JCheckBoxMenuItem recordCallingClassMenuItem() { JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(); menuItem.setState(false); menuItem.setAction(new AbstractAction("record calling class") { @Override public void actionPerformed(ActionEvent e) { recorder.setRecordCallingClass(menuItem.getState()); updateFilter(); } }); return menuItem; }
public JCheckBoxMenuItem createCheckedMenuItem(final String name, final JMenu parent, boolean state) { final JCheckBoxMenuItem item = new JCheckBoxMenuItem(name); item.setHorizontalTextPosition(JMenuItem.RIGHT); item.addActionListener(this); item.setState(state); parent.add(item); return item; }
public void showPopup(final MouseEvent e) { content = univ.getPicker().getPickedContent(e.getX(), e.getY()); if (content == null) return; univ.select(content); shaded.setState(content.isShaded()); saturated.setState(content.isSaturatedVolumeRendering()); if (popup.isPopupTrigger(e)) popup.show(e.getComponent(), e.getX(), e .getY()); }
private void doTdiff() { doTdiff = !doTdiff; ((JCheckBoxMenuItem) tDiff).setState(doTdiff); // Only allow 2 active treebanks if(doTdiff) { List<FileTreeNode> activeTreebanks = FilePanel.getInstance().getActiveTreebanks(); for(int i = 2; i < activeTreebanks.size(); i++) activeTreebanks.get(i).setActive(false); } }
protected void onDialogHidden() { menu.getOptionsShowRankingCheckBoxMenuItem().setState(false); timerTask.stop(); windowManager.removeBattleListener(battleObserver); dispose(); }
@Override public void actionPerformed(ActionEvent e) { if (((BAMTrack)mainTrack).toggleMappingQualityEnabled()) { baseQualityItem.setState(false); } graphPane.setRenderForced(); graphPane.repaint(); } });
public final void displayBookmarksPanel() { MiscUtils.setFrameVisibility("Bookmarks", true, auxDockingManager); auxDockingManager.toggleAutohideState("Bookmarks"); bookmarksItem.setState(true); auxDockingManager.setActive(false); MiscUtils.setFrameVisibility("Variation", true, auxDockingManager); auxDockingManager.toggleAutohideState("Variation"); auxDockingManager.setActive(false); }