Ignore:
Timestamp:
2011-03-24T12:22:27+01:00 (14 years ago)
Author:
zverik
Message:

button images (relcontext plugin)

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  
    2626    }
    2727   
    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"
    3034    };
    3135
     
    3943
    4044        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];
    4448        if( tag != null )
    4549            tag = tag.substring(0, 2) + "=" + rel.get(tag);
    4650
    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]);
    5055
    5156        StringBuilder sb = new StringBuilder();
  • applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java

    r25682 r25685  
    114114        topLine.add(chosenRelationComponent, GBC.std().fill().insets(5, 0, 5, 0));
    115115        final Action sortAndFixAction = new SortAndFixAction(chosenRelation);
    116         final JButton sortAndFixButton = new JButton(sortAndFixAction);
     116        final JButton sortAndFixButton = (JButton) sizeButton(new JButton(sortAndFixAction), 32, 24);
    117117        topLine.add(sortAndFixButton, GBC.std());
    118118        final Action downloadChosenRelationAction = new DownloadChosenRelationAction(chosenRelation);
    119         final JButton downloadButton = new JButton(downloadChosenRelationAction);
     119        final JButton downloadButton = (JButton) sizeButton(new JButton(downloadChosenRelationAction), 32, 24);
    120120        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));
    122122
    123123        chosenRelationPanel.add(topLine, BorderLayout.CENTER);
Note: See TracChangeset for help on using the changeset viewer.