- Timestamp:
- 2010-06-23T18:47:12+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r3083 r3338 207 207 208 208 for(int i=0; i < bTexts.length; i++) { 209 final int final_i = i; 209 210 Action action = new AbstractAction(bTexts[i]) { 210 211 public void actionPerformed(ActionEvent evt) { 211 buttonAction( evt);212 buttonAction(final_i, evt); 212 213 } 213 214 }; … … 282 283 * @param evt the button event 283 284 */ 284 protected void buttonAction( ActionEvent evt) {285 protected void buttonAction(int i, ActionEvent evt) { 285 286 String a = evt.getActionCommand(); 286 for(int i=0; i < bTexts.length; i++) 287 if(bTexts[i].equals(a)) { 288 result = i+1; 289 break; 290 } 291 287 result = i+1; 292 288 setVisible(false); 293 289 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r3327 r3338 148 148 } 149 149 150 // hook for roadsigns plugin to display a small 151 // button in the upper right corner of this dialog 152 public static JPanel pluginHook = new JPanel(); 153 150 154 private final Map<String, Map<String, Integer>> valueCount = new TreeMap<String, Map<String, Integer>>(); 151 155 … … 322 326 if(!key.equals(newkey)) { 323 327 for(int i=0; i < propertyTable.getRowCount(); i++) 324 if(propertyData.getValueAt(i, 0).toString() == newkey) {328 if(propertyData.getValueAt(i, 0).toString().equals(newkey)) { 325 329 row=i; 326 330 break; … … 648 652 bothTables.setLayout(new GridBagLayout()); 649 653 if(top) { 650 bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2)); 654 bothTables.add(presets, GBC.std().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2).anchor(GBC.NORTHWEST)); 655 double epsilon = Double.MIN_VALUE; // need to set a weight or else anchor value is ignored 656 bothTables.add(pluginHook, GBC.eol().insets(0,1,1,1).anchor(GBC.NORTHEAST).weight(epsilon, epsilon)); 651 657 } 652 658 bothTables.add(selectSth, GBC.eol().fill().insets(10, 10, 10, 10)); … … 918 924 propertyTable.getTableHeader().setVisible(hasTags); 919 925 selectSth.setVisible(!hasSelection); 926 pluginHook.setVisible(hasSelection); 920 927 921 928 int selectedIndex; -
trunk/src/org/openstreetmap/josm/tools/GBC.java
r3057 r3338 102 102 * @return This constraint for chaining. 103 103 */ 104 public GBC weight( int weightx, intweighty) {104 public GBC weight(double weightx, double weighty) { 105 105 this.weightx = weightx; 106 106 this.weighty = weighty;
Note:
See TracChangeset
for help on using the changeset viewer.