Changeset 8398 in josm for trunk


Ignore:
Timestamp:
2015-05-19T22:19:22+02:00 (4 years ago)
Author:
Don-vip
Message:

add dynamic tooltip to SizeButton

File:
1 edited

Legend:

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

    r8308 r8398  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.bbox;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.Dimension;
     
    2729
    2830    public SizeButton(SlippyMapBBoxChooser slippyMapBBoxChooser){
    29         super();
    3031        this.slippyMapBBoxChooser = slippyMapBBoxChooser;
    3132        enlargeImage = ImageProvider.get("view-fullscreen");
     
    3334        setPreferredSize(new Dimension(enlargeImage.getIconWidth(), enlargeImage.getIconHeight()));
    3435        addMouseListener(mouseListener);
     36        setToolTipText(tr("Enlarge"));
    3537    }
    3638
     
    4446        }
    4547    };
    46 
    4748
    4849    @Override
     
    5960    public void toggle() {
    6061        isEnlarged = !isEnlarged;
     62        setToolTipText(isEnlarged ? tr("Shrink") : tr("Enlarge"));
    6163    }
    6264
Note: See TracChangeset for help on using the changeset viewer.