Changeset 6956 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2014-04-05T14:51:42+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r6938 r6956 159 159 protected JCheckBoxMenuItem windowMenuItem; 160 160 161 private final JRadioButtonMenuItem alwaysShown = new JRadioButtonMenuItem(new AbstractAction(tr("Always shown")) { 162 @Override 163 public void actionPerformed(ActionEvent e) { 164 setIsButtonHiding(ButtonHidingType.ALWAYS_SHOWN); 165 } 166 }); 167 168 private final JRadioButtonMenuItem dynamic = new JRadioButtonMenuItem(new AbstractAction(tr("Dynamic")) { 169 @Override 170 public void actionPerformed(ActionEvent e) { 171 setIsButtonHiding(ButtonHidingType.DYNAMIC); 172 } 173 }); 174 175 private final JRadioButtonMenuItem alwaysHidden = new JRadioButtonMenuItem(new AbstractAction(tr("Always hidden")) { 176 @Override 177 public void actionPerformed(ActionEvent e) { 178 setIsButtonHiding(ButtonHidingType.ALWAYS_HIDDEN); 179 } 180 }); 181 161 182 /** 162 183 * The linked preferences class (optional). If set, accessible from the title bar with a dedicated button … … 508 529 @Override 509 530 public void actionPerformed(ActionEvent e) { 510 JRadioButtonMenuItem item = (buttonHiding == ButtonHidingType.DYNAMIC) ? popupMenu.alwaysShown :popupMenu.dynamic;531 JRadioButtonMenuItem item = (buttonHiding == ButtonHidingType.DYNAMIC) ? alwaysShown : dynamic; 511 532 item.setSelected(true); 512 533 item.getAction().actionPerformed(null); … … 586 607 private final JMenu buttonHidingMenu = new JMenu(tr("Side buttons")); 587 608 588 public final JRadioButtonMenuItem alwaysShown = new JRadioButtonMenuItem(new AbstractAction(tr("Always shown")) {589 @Override public void actionPerformed(ActionEvent e) {590 setIsButtonHiding(ButtonHidingType.ALWAYS_SHOWN);591 }592 });593 594 public final JRadioButtonMenuItem dynamic = new JRadioButtonMenuItem(new AbstractAction(tr("Dynamic")) {595 @Override public void actionPerformed(ActionEvent e) {596 setIsButtonHiding(ButtonHidingType.DYNAMIC);597 }598 });599 600 public final JRadioButtonMenuItem alwaysHidden = new JRadioButtonMenuItem(new AbstractAction(tr("Always hidden")) {601 @Override public void actionPerformed(ActionEvent e) {602 setIsButtonHiding(ButtonHidingType.ALWAYS_HIDDEN);603 }604 });605 606 609 public DialogPopupMenu() { 607 610 alwaysShown.setSelected(buttonHiding == ButtonHidingType.ALWAYS_SHOWN); … … 714 717 715 718 /** 716 * Sets the dialogsPanel managing all toggle dialogs 719 * Sets the dialogsPanel managing all toggle dialogs. 720 * @param dialogsPanel The panel managing all toggle dialogs 717 721 */ 718 722 public void setDialogsPanel(DialogsPanel dialogsPanel) { … … 766 770 } 767 771 772 /** 773 * Returns the preferred height of this dialog. 774 * @return The preferred height if the toggle dialog is expanded 775 */ 768 776 public int getPreferredHeight() { 769 777 return preferredHeight; … … 783 791 784 792 /** 785 * Replies true if this dialog is showing either as docked or as detached dialog 793 * Determines if this dialog is showing either as docked or as detached dialog. 794 * @return {@code true} if this dialog is showing either as docked or as detached dialog 786 795 */ 787 796 public boolean isDialogShowing() { … … 790 799 791 800 /** 792 * Replies true if this dialog is docked and expanded 801 * Determines if this dialog is docked and expanded. 802 * @return {@code true} if this dialog is docked and expanded 793 803 */ 794 804 public boolean isDialogInDefaultView() { … … 797 807 798 808 /** 799 * Replies true if this dialog is docked and collapsed 809 * Determines if this dialog is docked and collapsed. 810 * @return {@code true} if this dialog is docked and collapsed 800 811 */ 801 812 public boolean isDialogInCollapsedView() {
Note:
See TracChangeset
for help on using the changeset viewer.