Changeset 3098 in osm for applications


Ignore:
Timestamp:
2007-06-04T13:51:49+02:00 (18 years ago)
Author:
christofd
Message:

add autoclosing dialog for waypoints to set addtional info

Location:
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action
Files:
2 added
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java

    r2974 r3098  
    2020
    2121import at.dallermassl.josm.plugin.surveyor.GpsActionEvent;
     22import at.dallermassl.josm.plugin.surveyor.SurveyorPlugin;
     23import at.dallermassl.josm.plugin.surveyor.action.gui.WaypointDialog;
    2224
    2325/**
     
    3133    private MarkerLayer markerLayer;
    3234    public static final String MARKER_LAYER_NAME = "surveyorwaypointlayer";
     35    private WaypointDialog dialog;
    3336   
    3437    /**
     
    5760        }
    5861       
     62        if(dialog == null) {
     63            dialog = new WaypointDialog();
     64        }
     65       
     66        String markerText = markerTitle;
     67        String inputText = dialog.openDialog(SurveyorPlugin.getSurveyorFrame(), "Waypoint Description");
     68        if(inputText != null && inputText.length() > 0) {
     69            markerText = markerText + " " + inputText;
     70        }
     71       
    5972        String iconName = getParameters().size() > 1 ? getParameters().get(1) : null;
    6073        synchronized(LiveGpsLock.class) {
    61             layer.data.add(new Marker(event.getCoordinates(), markerTitle, iconName));
     74            layer.data.add(new Marker(event.getCoordinates(), markerText, iconName));
    6275        }
    6376        Main.map.repaint();
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/DialogClosingThread.java

    r3082 r3098  
    22 *
    33 */
    4 package test;
     4package at.dallermassl.josm.plugin.surveyor.action.gui;
    55
    66import java.awt.Component;
Note: See TracChangeset for help on using the changeset viewer.