Changeset 562 in josm for trunk/src/org


Ignore:
Timestamp:
2008-02-25T12:41:43+01:00 (17 years ago)
Author:
david
Message:

Show/hide text -> show/hide text/icon, and implement as such

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

Legend:

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

    r478 r562  
    103103
    104104                public ShowHideMarkerText(Layer layer) {
    105                         super(tr("Show/Hide Text"), ImageProvider.get("dialogs", "showhide"));
    106                         putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the marker text."));
     105                        super(tr("Show/Hide Text/Icons"), ImageProvider.get("dialogs", "showhide"));
     106                        putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the marker text and icons."));
    107107                        putValue("help", "Dialog/LayerList/ShowHideMarkerText");
    108108                        this.layer = layer;
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java

    r553 r562  
    2525
    2626        private Rectangle buttonRectangle;
    27         protected Graphics graphicsContext = null;
    2827       
    2928        public ButtonMarker(LatLon ll, String buttonImage, MarkerLayer parentLayer, double time, double offset) {
     
    4443       
    4544        @Override public void paint(Graphics g, MapView mv, boolean mousePressed, String show) {
    46                 graphicsContext = g;
     45                if (! show.equalsIgnoreCase("show")) {
     46                        super.paint(g, mv, mousePressed, show);
     47                        return;
     48                }
    4749                Point screen = mv.getPoint(eastNorth);
    4850                buttonRectangle.setLocation(screen.x+4, screen.y+2);
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r553 r562  
    169169        public void paint(Graphics g, MapView mv, boolean mousePressed, String show) {
    170170                Point screen = mv.getPoint(eastNorth);
    171                 if (symbol != null) {
     171                if (symbol != null && show.equalsIgnoreCase("show")) {
    172172                        symbol.paintIcon(mv, g, screen.x-symbol.getIconWidth()/2, screen.y-symbol.getIconHeight()/2);
    173173                } else {
Note: See TracChangeset for help on using the changeset viewer.