Changeset 25685 in osm for applications
- Timestamp:
- 2011-03-24T12:22:27+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/relcontext
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/relcontext/src/relcontext/ChosenRelationComponent.java
r25682 r25685 26 26 } 27 27 28 private final static String[] typeKeys = new String[] { 29 "natural", "landuse", "place", "waterway", "leisure", "amenity" 28 private final static String[] TYPE_KEYS = new String[] { 29 "natural", "landuse", "place", "waterway", "leisure", "amenity", "restriction", "public_transport" 30 }; 31 32 private final static String[] NAMING_TAGS = new String[] { 33 "name", "place_name", "ref", "note" 30 34 }; 31 35 … … 39 43 40 44 String tag = null; 41 for( int i = 0; i < typeKeys.length && tag == null; i++ )42 if( rel.hasKey( typeKeys[i]))43 tag = typeKeys[i];45 for( int i = 0; i < TYPE_KEYS.length && tag == null; i++ ) 46 if( rel.hasKey(TYPE_KEYS[i])) 47 tag = TYPE_KEYS[i]; 44 48 if( tag != null ) 45 49 tag = tag.substring(0, 2) + "=" + rel.get(tag); 46 50 47 String name = rel.get("name"); 48 if( name == null && rel.hasKey("place_name") ) 49 name = rel.get("place_name"); 51 String name = null; 52 for( int i = 0; i < NAMING_TAGS.length && name == null; i++ ) 53 if( rel.hasKey(NAMING_TAGS[i]) ) 54 name = rel.get(NAMING_TAGS[i]); 50 55 51 56 StringBuilder sb = new StringBuilder(); -
applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java
r25682 r25685 114 114 topLine.add(chosenRelationComponent, GBC.std().fill().insets(5, 0, 5, 0)); 115 115 final Action sortAndFixAction = new SortAndFixAction(chosenRelation); 116 final JButton sortAndFixButton = new JButton(sortAndFixAction);116 final JButton sortAndFixButton = (JButton) sizeButton(new JButton(sortAndFixAction), 32, 24); 117 117 topLine.add(sortAndFixButton, GBC.std()); 118 118 final Action downloadChosenRelationAction = new DownloadChosenRelationAction(chosenRelation); 119 final JButton downloadButton = new JButton(downloadChosenRelationAction);119 final JButton downloadButton = (JButton) sizeButton(new JButton(downloadChosenRelationAction), 32, 24); 120 120 topLine.add(downloadButton, GBC.std()); 121 topLine.add(new JButton(new EditChosenRelationAction(chosenRelation)), GBC.eol() );121 topLine.add(new JButton(new EditChosenRelationAction(chosenRelation)), GBC.eol().fill(GBC.VERTICAL)); 122 122 123 123 chosenRelationPanel.add(topLine, BorderLayout.CENTER);
Note:
See TracChangeset
for help on using the changeset viewer.