Node.PROP_LEAF.equals(nm)) { return; } else if (isDescriptionVisible() && ( Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) {
Node.PROP_LEAF.equals(nm)) { return; } else if (isDescriptionVisible() && ( Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) {
evt.getSource() + ". This should ony be fired to" + "NodeListeners, not general property change listeners"); //NOI18N } else if (isDescriptionVisible() && ( Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) {
evt.getSource() + ". This should ony be fired to" + "NodeListeners, not general property change listeners"); //NOI18N } else if (isDescriptionVisible() && ( Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) {
public void run() { //the following must run in EDT to avoid deadlocks, see #91371 if (isDescriptionVisible() && (Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) { //XXX SHOULD NOT BE FIRED TO NODELISTENERS Node n = (Node) evt.getSource(); if (currNode == n) { String description = (String) n.getValue("nodeDescription"); //NOI18N psheet.setDescription(n.getDisplayName(), (description == null) ? n.getShortDescription() : description); table.setBeanName(n.getDisplayName()); } } } };
public void actionPerformed (ActionEvent ae) { switch (id) { case SORT_NAMES : try { sheet.setSortingMode(SORTED_BY_NAMES); } catch (PropertyVetoException pve) { //can't happen } break; case UNSORT : try { sheet.setSortingMode(UNSORTED); } catch (PropertyVetoException pve) { //can't happen } break; case INVOKE_POPUP : sheet.showPopup (new Point (0,0)); break; case SHOW_DESCRIPTION : sheet.setDescriptionVisible(!sheet.isDescriptionVisible()); break; case SHOW_HELP : break; default : throw new IllegalArgumentException (Integer.toString(id)); } } public boolean isEnabled() {
public void actionPerformed (ActionEvent ae) { switch (id) { case SORT_NAMES : try { sheet.setSortingMode(SORTED_BY_NAMES); } catch (PropertyVetoException pve) { //can't happen } break; case UNSORT : try { sheet.setSortingMode(UNSORTED); } catch (PropertyVetoException pve) { //can't happen } break; case INVOKE_POPUP : sheet.showPopup (new Point (0,0)); break; case SHOW_DESCRIPTION : sheet.setDescriptionVisible(!sheet.isDescriptionVisible()); break; case SHOW_HELP : break; default : throw new IllegalArgumentException (Integer.toString(id)); } } public boolean isEnabled() {
/** * Set the visibility of the description area. * * @param val Whether or not it should be visible * @since 6.9 */ public final void setDescriptionAreaVisible (boolean val) { if (isDescriptionVisible() != val) { int state = psheet.getState(); if (!val) { int newState = ((state & PSheet.STATE_HAS_TABS) != 0) ? PSheet.STATE_HAS_TABS : 0; psheet.setState(newState); } else { int newState = ((state & PSheet.STATE_HAS_TABS) != 0) ? (PSheet.STATE_HAS_TABS | PSheet.STATE_HAS_DESCRIPTION) : PSheet.STATE_HAS_DESCRIPTION; psheet.setState(newState); } } }
final void showPopup (Point p) { JMenuItem helpItem=new JMenuItem(); JRadioButtonMenuItem sortNamesItem = new JRadioButtonMenuItem(); JRadioButtonMenuItem unsortedItem = new JRadioButtonMenuItem(); JCheckBoxMenuItem descriptionItem = new JCheckBoxMenuItem(); JPopupMenu popup = new JPopupMenu(); unsortedItem.setSelected(getSortingMode() == UNSORTED); sortNamesItem.setSelected(getSortingMode() == SORTED_BY_NAMES); helpAction.checkContext(); helpItem.setAction(helpAction); sortNamesItem.setAction (new MutableAction (MutableAction.SORT_NAMES, this)); unsortedItem.setAction (new MutableAction (MutableAction.UNSORT, this)); descriptionItem.setAction (new MutableAction (MutableAction.SHOW_DESCRIPTION, this)); descriptionItem.setSelected (isDescriptionVisible()); popup.add (unsortedItem); popup.add (sortNamesItem); popup.add (new JSeparator()); popup.add (descriptionItem); popup.add (new JSeparator()); popup.add (helpItem); popup.show(psheet, p.x, p.y); }
final void showPopup (Point p) { JMenuItem helpItem=new JMenuItem(); JRadioButtonMenuItem sortNamesItem = new JRadioButtonMenuItem(); JRadioButtonMenuItem unsortedItem = new JRadioButtonMenuItem(); JCheckBoxMenuItem descriptionItem = new JCheckBoxMenuItem(); JPopupMenu popup = new JPopupMenu(); unsortedItem.setSelected(getSortingMode() == UNSORTED); sortNamesItem.setSelected(getSortingMode() == SORTED_BY_NAMES); helpAction.checkContext(); helpItem.setAction(helpAction); sortNamesItem.setAction (new MutableAction (MutableAction.SORT_NAMES, this)); unsortedItem.setAction (new MutableAction (MutableAction.UNSORT, this)); descriptionItem.setAction (new MutableAction (MutableAction.SHOW_DESCRIPTION, this)); descriptionItem.setSelected (isDescriptionVisible()); popup.add (unsortedItem); popup.add (sortNamesItem); popup.add (new JSeparator()); popup.add (descriptionItem); popup.add (new JSeparator()); popup.add (helpItem); popup.show(psheet, p.x, p.y); }
sheet.setDescriptionVisible(!sheet.isDescriptionVisible());
unsortedItem.setAction(new MutableAction(MutableAction.UNSORT, this)); descriptionItem.setAction(new MutableAction(MutableAction.SHOW_DESCRIPTION, this)); descriptionItem.setSelected(isDescriptionVisible()); defaultValueItem.setAction(new MutableAction(MutableAction.RESTORE_DEFAULT, this));
/** Enable/disable display of the description area */ void setDescriptionVisible(boolean val) { if (isDescriptionVisible() != val) { int state = psheet.getState(); if (!val) { int newState = (state & PSheet.STATE_HAS_TABS) != 0 ? PSheet.STATE_HAS_TABS : 0; psheet.setState (newState); } else { int newState = (state & PSheet.STATE_HAS_TABS) != 0 ? PSheet.STATE_HAS_TABS | PSheet.STATE_HAS_DESCRIPTION : PSheet.STATE_HAS_DESCRIPTION; psheet.setState (newState); } PropUtils.saveShowDescription(val); } }
/** Enable/disable display of the description area */ void setDescriptionVisible(boolean val) { if (isDescriptionVisible() != val) { int state = psheet.getState(); if (!val) { int newState = (state & PSheet.STATE_HAS_TABS) != 0 ? PSheet.STATE_HAS_TABS : 0; psheet.setState (newState); } else { int newState = (state & PSheet.STATE_HAS_TABS) != 0 ? PSheet.STATE_HAS_TABS | PSheet.STATE_HAS_DESCRIPTION : PSheet.STATE_HAS_DESCRIPTION; psheet.setState (newState); } PropUtils.saveShowDescription(val); } }
if (isDescriptionVisible()) { helpAction.checkContext();
if (isDescriptionVisible()) { helpAction.checkContext();
if (isDescriptionVisible()) { helpAction.checkContext();