Changeset 6829 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2014-02-09T14:35:14+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r6752 r6829 88 88 DYNAMIC 89 89 } 90 90 91 91 /** 92 92 * Property to enable dyanmic buttons globally. … … 762 762 refreshHidingButtons(); 763 763 } 764 764 765 765 public int getPreferredHeight() { 766 766 return preferredHeight; … … 893 893 public void eventDispatched(AWTEvent event) { 894 894 if(isShowing() && !isCollapsed && isDocked && buttonHiding == ButtonHidingType.DYNAMIC) { 895 Rectangle b = this.getBounds(); 896 b.setLocation(getLocationOnScreen()); 897 if (b.contains(((MouseEvent)event).getLocationOnScreen())) { 898 if(!buttonsPanel.isVisible()) { 899 buttonsPanel.setVisible(true); 900 } 901 } else if (buttonsPanel.isVisible()) { 902 buttonsPanel.setVisible(false); 903 } 904 } 905 } 906 895 if (buttonsPanel != null) { 896 Rectangle b = this.getBounds(); 897 b.setLocation(getLocationOnScreen()); 898 if (b.contains(((MouseEvent)event).getLocationOnScreen())) { 899 if(!buttonsPanel.isVisible()) { 900 buttonsPanel.setVisible(true); 901 } 902 } else if (buttonsPanel.isVisible()) { 903 buttonsPanel.setVisible(false); 904 } 905 } 906 } 907 } 908 907 909 @Override 908 910 public void preferenceChanged(PreferenceChangeEvent e) { … … 911 913 } 912 914 } 913 915 914 916 private void dynamicButtonsPropertyChanged() { 915 917 boolean propEnabled = PROP_DYNAMIC_BUTTONS.get();
Note:
See TracChangeset
for help on using the changeset viewer.