Changeset 8285 in josm for trunk/src/org/openstreetmap/josm/gui/layer/gpx
- Timestamp:
- 2015-04-28T00:49:49+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/layer/gpx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r7937 r8285 49 49 private final GpxLayer layer; 50 50 51 DateFilterPanel dateFilter;52 JTable table;51 private DateFilterPanel dateFilter; 52 private JTable table; 53 53 54 54 /** … … 181 181 } 182 182 183 boolean noUpdates=false;183 private boolean noUpdates=false; 184 184 185 185 /** selects all rows (=tracks) in the table that are currently visible on the layer*/ -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java
r7937 r8285 29 29 30 30 public class CustomizeDrawingAction extends AbstractAction implements LayerAction, MultiLayerAction { 31 List<Layer> layers;31 private List<Layer> layers; 32 32 33 33 public CustomizeDrawingAction(List<Layer> l) { -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java
r7937 r8285 23 23 24 24 public class DateFilterPanel extends JPanel { 25 DateEditorWithSlider dateFrom = new DateEditorWithSlider(tr("From"));26 DateEditorWithSlider dateTo = new DateEditorWithSlider(tr("To"));27 JCheckBox noTimestampCb = new JCheckBox(tr("No timestamp"));28 GpxLayer layer;29 30 ActionListener filterAppliedListener;31 32 final String PREF_DATE_0;33 final String PREF_DATE_MIN;34 final String PREF_DATE_MAX;25 private DateEditorWithSlider dateFrom = new DateEditorWithSlider(tr("From")); 26 private DateEditorWithSlider dateTo = new DateEditorWithSlider(tr("To")); 27 private JCheckBox noTimestampCb = new JCheckBox(tr("No timestamp")); 28 private GpxLayer layer; 29 30 private ActionListener filterAppliedListener; 31 32 private final String PREF_DATE_0; 33 private final String PREF_DATE_MIN; 34 private final String PREF_DATE_MAX; 35 35 36 36 /** … … 45 45 PREF_DATE_MAX = preferencePrefix+".maxtime"; 46 46 this.layer = layer; 47 47 48 48 final Date startTime, endTime; 49 49 Date[] bounds = layer.data.getMinMaxTimeForAllTracks(); 50 50 startTime = (bounds==null) ? new GregorianCalendar(2000, 1, 1).getTime():bounds[0]; 51 51 endTime = (bounds==null) ? new Date() : bounds[1]; 52 53 dateFrom.setDate(startTime); 52 53 dateFrom.setDate(startTime); 54 54 dateTo.setDate(endTime); 55 dateFrom.setRange(startTime, endTime); 56 dateTo.setRange(startTime, endTime); 57 55 dateFrom.setRange(startTime, endTime); 56 dateTo.setRange(startTime, endTime); 57 58 58 add(noTimestampCb, GBC.std().grid(1,1).insets(0, 0, 5, 0)); 59 59 add(dateFrom, GBC.std().grid(2,1).fill(GBC.HORIZONTAL)); 60 60 add(dateTo, GBC.eol().grid(3,1).fill(GBC.HORIZONTAL)); 61 61 62 62 setEnabled(enabled); 63 63 64 64 dateFrom.addDateListener(changeListener); 65 65 dateTo.addDateListener(changeListener); 66 66 noTimestampCb.addChangeListener(changeListener); 67 67 } 68 68 69 69 private ChangeListener changeListener = new ChangeListener() { 70 70 @Override public void stateChanged(ChangeEvent e) { … … 72 72 } 73 73 }; 74 74 75 75 private Timer t = new Timer(200 , new ActionListener() { 76 76 @Override public void actionPerformed(ActionEvent e) { … … 78 78 } 79 79 }); 80 80 81 81 /** 82 82 * Do filtering but little bit later (to reduce cpu load) … … 89 89 } 90 90 } 91 91 92 92 public void applyFilter() { 93 93 t.stop(); … … 96 96 filterAppliedListener.actionPerformed(null); 97 97 } 98 98 99 99 /** 100 100 * Called by other components when it is correct time to save date filtering parameters … … 121 121 this.filterAppliedListener = filterAppliedListener; 122 122 } 123 123 124 124 private void filterTracksByDate() { 125 125 Date from = dateFrom.getDate(); … … 130 130 @Override 131 131 public final void setEnabled(boolean enabled) { 132 super.setEnabled(enabled); 132 super.setEnabled(enabled); 133 133 for (Component c: getComponents()) { 134 134 c.setEnabled(enabled); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java
r7937 r8285 26 26 public class DownloadAlongTrackAction extends DownloadAlongAction { 27 27 28 static final int NEAR_TRACK = 0;29 static final int NEAR_WAYPOINTS = 1;30 static final int NEAR_BOTH = 2;28 private static final int NEAR_TRACK = 0; 29 private static final int NEAR_WAYPOINTS = 1; 30 private static final int NEAR_BOTH = 2; 31 31 32 32 private static final String PREF_DOWNLOAD_ALONG_TRACK_OSM = "downloadAlongTrack.download.osm"; -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r7937 r8285 70 70 71 71 // default access is used to allow changing from plugins 72 ColorScale velocityScale;72 private ColorScale velocityScale; 73 73 /** Colors (without custom alpha channel, if given) for HDOP painting. **/ 74 ColorScale hdopScale;75 ColorScale dateScale;76 ColorScale directionScale;74 private ColorScale hdopScale; 75 private ColorScale dateScale; 76 private ColorScale directionScale; 77 77 78 78 /** Opacity for hdop points **/
Note:
See TracChangeset
for help on using the changeset viewer.