Changeset 8346 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2015-05-11T13:34:53+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NotificationManager.java
r8126 r8346 73 73 private static NotificationManager INSTANCE = null; 74 74 75 private final Color PANEL_SEMITRANSPARENT = new Color(224, 236, 249, 230);76 private final Color PANEL_OPAQUE = new Color(224, 236, 249);75 private static final Color PANEL_SEMITRANSPARENT = new Color(224, 236, 249, 230); 76 private static final Color PANEL_OPAQUE = new Color(224, 236, 249); 77 77 78 78 public static synchronized NotificationManager getInstance() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r8342 r8346 95 95 public static final BooleanProperty PROP_DYNAMIC_BUTTONS = new BooleanProperty("dialog.dynamic.buttons", false); 96 96 97 private final transient ParametrizedEnumProperty<ButtonHidingType> PROP_BUTTON_HIDING = new ParametrizedEnumProperty<ToggleDialog.ButtonHidingType>(98 ButtonHidingType.class, ButtonHidingType.DYNAMIC) {97 private final transient ParametrizedEnumProperty<ButtonHidingType> propButtonHiding = 98 new ParametrizedEnumProperty<ToggleDialog.ButtonHidingType>(ButtonHidingType.class, ButtonHidingType.DYNAMIC) { 99 99 @Override 100 100 protected String getKey(String... params) { … … 107 107 } catch (IllegalArgumentException e) { 108 108 // Legacy settings 109 return Boolean.parseBoolean(s) ?ButtonHidingType.DYNAMIC:ButtonHidingType.ALWAYS_SHOWN;109 return Boolean.parseBoolean(s) ? ButtonHidingType.DYNAMIC : ButtonHidingType.ALWAYS_SHOWN; 110 110 } 111 111 } … … 241 241 isDocked = Main.pref.getBoolean(preferencePrefix+".docked", true); 242 242 isCollapsed = Main.pref.getBoolean(preferencePrefix+".minimized", false); 243 buttonHiding = PROP_BUTTON_HIDING.get();243 buttonHiding = propButtonHiding.get(); 244 244 245 245 /** show the minimize button */ … … 490 490 /** the label which displays the dialog's title **/ 491 491 private final JLabel lblTitle; 492 private final JComponent lblTitle _weak;492 private final JComponent lblTitleWeak; 493 493 /** the button which shows whether buttons are dynamic or not */ 494 494 private final JButton buttonsHide; … … 512 512 513 513 // Cannot add the label directly since it would displace other elements on resize 514 lblTitle _weak = new JComponent() {514 lblTitleWeak = new JComponent() { 515 515 @Override 516 516 public void paintComponent(Graphics g) { … … 518 518 } 519 519 }; 520 lblTitle _weak.setPreferredSize(new Dimension(Integer.MAX_VALUE,20));521 lblTitle _weak.setMinimumSize(new Dimension(0,20));522 add(lblTitle _weak, GBC.std().fill(GBC.HORIZONTAL));520 lblTitleWeak.setPreferredSize(new Dimension(Integer.MAX_VALUE,20)); 521 lblTitleWeak.setMinimumSize(new Dimension(0,20)); 522 add(lblTitleWeak, GBC.std().fill(GBC.HORIZONTAL)); 523 523 524 524 buttonsHide = new JButton(ImageProvider.get("misc", buttonHiding != ButtonHidingType.ALWAYS_SHOWN … … 597 597 public void setTitle(String title) { 598 598 lblTitle.setText(title); 599 lblTitle _weak.repaint();599 lblTitleWeak.repaint(); 600 600 } 601 601 … … 767 767 protected void setIsButtonHiding(ButtonHidingType val) { 768 768 buttonHiding = val; 769 PROP_BUTTON_HIDING.put(val);769 propButtonHiding.put(val); 770 770 refreshHidingButtons(); 771 771 } -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r8345 r8346 33 33 * @since 2019 34 34 */ 35 public class HistoryBrowserDialogManager implements MapView.LayerChangeListener { 35 public final class HistoryBrowserDialogManager implements MapView.LayerChangeListener { 36 37 private static final String WINDOW_GEOMETRY_PREF = HistoryBrowserDialogManager.class.getName() + ".geometry"; 36 38 37 39 private static HistoryBrowserDialogManager instance; … … 89 91 return false; 90 92 } 91 92 private final String WINDOW_GEOMETRY_PREF = getClass().getName() + ".geometry";93 93 94 94 protected void placeOnScreen(HistoryBrowserDialog dialog) { -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java
r8308 r8346 30 30 private transient ActionListener filterAppliedListener; 31 31 32 private final String PREF_DATE_0;33 private final String PREF_DATE_MIN;34 private final String PREF_DATE_MAX;32 private final String prefDate0; 33 private final String prefDateMin; 34 private final String prefDateMax; 35 35 36 36 /** … … 41 41 public DateFilterPanel(GpxLayer layer, String preferencePrefix, boolean enabled) { 42 42 super(new GridBagLayout()); 43 PREF_DATE_0 = preferencePrefix+".showzerotimestamp";44 PREF_DATE_MIN= preferencePrefix+".mintime";45 PREF_DATE_MAX= preferencePrefix+".maxtime";43 prefDate0 = preferencePrefix+".showzerotimestamp"; 44 prefDateMin = preferencePrefix+".mintime"; 45 prefDateMax = preferencePrefix+".maxtime"; 46 46 this.layer = layer; 47 47 … … 101 101 */ 102 102 public void saveInPrefs() { 103 Main.pref.putLong( PREF_DATE_MIN, dateFrom.getDate().getTime());104 Main.pref.putLong( PREF_DATE_MAX, dateTo.getDate().getTime());105 Main.pref.put( PREF_DATE_0, noTimestampCb.isSelected());103 Main.pref.putLong(prefDateMin, dateFrom.getDate().getTime()); 104 Main.pref.putLong(prefDateMax, dateTo.getDate().getTime()); 105 Main.pref.put(prefDate0, noTimestampCb.isSelected()); 106 106 } 107 107 … … 111 111 */ 112 112 public void loadFromPrefs() { 113 long t1 =Main.pref.getLong( PREF_DATE_MIN, 0);113 long t1 =Main.pref.getLong(prefDateMin, 0); 114 114 if (t1!=0) dateFrom.setDate(new Date(t1)); 115 long t2 =Main.pref.getLong( PREF_DATE_MAX, 0);115 long t2 =Main.pref.getLong(prefDateMax, 0); 116 116 if (t2!=0) dateTo.setDate(new Date(t2)); 117 noTimestampCb.setSelected(Main.pref.getBoolean( PREF_DATE_0, false));117 noTimestampCb.setSelected(Main.pref.getBoolean(prefDate0, false)); 118 118 } 119 119 -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
r8087 r8346 23 23 public static final String[] REPEAT_IMAGE_KEYS = {REPEAT_IMAGE, REPEAT_IMAGE_WIDTH, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OPACITY, null, null}; 24 24 25 public float major _z_index;26 public float z _index;27 public float object _z_index;25 public float majorZIndex; 26 public float zIndex; 27 public float objectZIndex; 28 28 public boolean isModifier; // false, if style can serve as main style for the 29 29 // primitive; true, if it is a highlight or modifier 30 30 31 31 public ElemStyle(float major_z_index, float z_index, float object_z_index, boolean isModifier) { 32 this.major _z_index = major_z_index;33 this.z _index = z_index;34 this.object _z_index = object_z_index;32 this.majorZIndex = major_z_index; 33 this.zIndex = z_index; 34 this.objectZIndex = object_z_index; 35 35 this.isModifier = isModifier; 36 36 } 37 37 38 38 protected ElemStyle(Cascade c, float default_major_z_index) { 39 major _z_index = c.get(MAJOR_Z_INDEX, default_major_z_index, Float.class);40 z _index = c.get(Z_INDEX, 0f, Float.class);41 object _z_index = c.get(OBJECT_Z_INDEX, 0f, Float.class);39 majorZIndex = c.get(MAJOR_Z_INDEX, default_major_z_index, Float.class); 40 zIndex = c.get(Z_INDEX, 0f, Float.class); 41 objectZIndex = c.get(OBJECT_Z_INDEX, 0f, Float.class); 42 42 isModifier = c.get(MODIFIER, false, Boolean.class); 43 43 } … … 208 208 return false; 209 209 ElemStyle s = (ElemStyle) o; 210 return major _z_index == s.major_z_index &&211 z _index == s.z_index &&212 object _z_index == s.object_z_index &&210 return majorZIndex == s.majorZIndex && 211 zIndex == s.zIndex && 212 objectZIndex == s.objectZIndex && 213 213 isModifier == s.isModifier; 214 214 } … … 217 217 public int hashCode() { 218 218 int hash = 5; 219 hash = 41 * hash + Float.floatToIntBits(this.major _z_index);220 hash = 41 * hash + Float.floatToIntBits(this.z _index);221 hash = 41 * hash + Float.floatToIntBits(this.object _z_index);219 hash = 41 * hash + Float.floatToIntBits(this.majorZIndex); 220 hash = 41 * hash + Float.floatToIntBits(this.zIndex); 221 hash = 41 * hash + Float.floatToIntBits(this.objectZIndex); 222 222 hash = 41 * hash + (isModifier ? 1 : 0); 223 223 return hash; … … 226 226 @Override 227 227 public String toString() { 228 return String.format("z_idx=[%s/%s/%s] ", major _z_index, z_index, object_z_index) + (isModifier ? "modifier " : "");228 return String.format("z_idx=[%s/%s/%s] ", majorZIndex, zIndex, objectZIndex) + (isModifier ? "modifier " : ""); 229 229 } 230 230 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r8087 r8346 47 47 48 48 public final String prefix; 49 public final float default _major_z_index;49 public final float defaultMajorZIndex; 50 50 51 51 LineType(String prefix, float default_major_z_index) { 52 52 this.prefix = prefix; 53 this.default _major_z_index = default_major_z_index;53 this.defaultMajorZIndex = default_major_z_index; 54 54 } 55 55 } … … 258 258 } 259 259 260 return new LineElemStyle(c, type.default _major_z_index, line, color, dashesLine, dashesBackground, offset, realWidth);260 return new LineElemStyle(c, type.defaultMajorZIndex, line, color, dashesLine, dashesBackground, offset, realWidth); 261 261 } 262 262
Note:
See TracChangeset
for help on using the changeset viewer.