Changeset 1246 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2009-01-11T16:41:49+01:00 (16 years ago)
Author:
stoecker
Message:

bring texts back in side view buttons

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r1227 r1246  
    2121    }
    2222
    23     private static ImageIcon smallIcon(String imagename) {
     23    public static ImageIcon makeIcon(String imagename) {
    2424        Image im = ImageProvider.get("dialogs", imagename).getImage();
    2525        return new ImageIcon(im.getScaledInstance(20 , 20, Image.SCALE_SMOOTH));
     
    2828    public SideButton(String imagename, String property, String tooltip, ActionListener actionListener)
    2929    {
    30         super(smallIcon(imagename));
     30        super(makeIcon(imagename));
    3131        doStyle();
    3232        setActionCommand(imagename);
     
    3636    public SideButton(String name, String imagename, String property, String tooltip, Shortcut shortcut, ActionListener actionListener)
    3737    {
    38         super(smallIcon(imagename));
     38        super(tr(name), makeIcon(imagename));
    3939        if(shortcut != null)
    40                 {
     40        {
    4141            shortcut.setMnemonic(this);
    42                         if(tooltip != null)
     42            if(tooltip != null)
    4343                tooltip = Main.platform.makeTooltip(tooltip, shortcut);
    44                 }
     44        }
    4545        setup(name, property, tooltip, actionListener);
    4646    }
    4747    public SideButton(String name, String imagename, String property, String tooltip, ActionListener actionListener)
    4848    {
    49         super(smallIcon(imagename));
     49        super(tr(name), makeIcon(imagename));
    5050        setup(name, property, tooltip, actionListener);
    5151    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r1228 r1246  
    6262
    6363        public DeleteLayerAction(Layer layer) {
    64             super(tr("Delete"), ImageProvider.get("dialogs", "delete"));
     64            super(tr("Delete"), SideButton.makeIcon("delete"));
    6565            putValue(SHORT_DESCRIPTION, tr("Delete the selected layer."));
    6666            putValue("help", "Action/LayerDelete");
     
    9898
    9999        public ShowHideLayerAction(Layer layer) {
    100             super(tr("Show/Hide"), ImageProvider.get("dialogs", "showhide"));
     100            super(tr("Show/Hide"), SideButton.makeIcon("showhide"));
    101101            putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the selected layer."));
    102102            putValue("help", "Action/LayerShowHide");
     
    254254        buttonPanel.add(new SideButton(deleteAction));
    255255
    256         mergeButton = new SideButton("Merge", "mergedown", "LayerList", tr("Merge the layer directly below into the selected layer."),
     256        mergeButton = new SideButton("mergedown", "LayerList", tr("Merge the layer directly below into the selected layer."),
    257257        new ActionListener(){
    258258            public void actionPerformed(ActionEvent e) {
     
    265265            }
    266266        });
    267         mergeButton.setText(null);
    268267        buttonPanel.add(mergeButton);
    269268
     
    286285        downButton.setEnabled(sel >= 0 && sel < model.getSize()-1);
    287286        deleteAction.setEnabled(!model.isEmpty());
    288        
     287
    289288        if(model.getSize() != 0) {
    290289            setTitle(tr("Layers: {0}", model.getSize()), true);
Note: See TracChangeset for help on using the changeset viewer.