Class ChooseTrackVisibilityAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.layer.gpx.ChooseTrackVisibilityAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class ChooseTrackVisibilityAction extends javax.swing.AbstractAction
allows the user to choose which of the downloaded tracks should be displayed. they can be chosen from the gpx layer context menu.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classChooseTrackVisibilityAction.GpxTrackTable
-
Field Summary
Fields Modifier and Type Field Description private DateFilterPaneldateFilterprivate GpxLayerlayerprivate booleannoUpdatesprivate javax.swing.JTabletable
-
Constructor Summary
Constructors Constructor Description ChooseTrackVisibilityAction(GpxLayer layer)Constructs a newChooseTrackVisibilityAction.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent ae)private static javax.swing.JTablebuildTable(java.lang.Object[]... content)Builds an editable table whose 5th column will open a browser when double clicked.private java.lang.Object[][]buildTableContents()Gathers all available data for the tracks and returns them as array of arrays in the expected column order.private voidlistenToSelectionChanges()listens to selection changes in the table and redraws the mapprivate voidselectVisibleTracksInTable()selects all rows (=tracks) in the table that are currently visible on the layerprivate voidshowColorDialog(java.util.List<IGpxTrack> tracks)private voidupdateVisibilityFromTable()-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
dateFilter
private DateFilterPanel dateFilter
-
table
private javax.swing.JTable table
-
noUpdates
private boolean noUpdates
-
-
Constructor Detail
-
ChooseTrackVisibilityAction
public ChooseTrackVisibilityAction(GpxLayer layer)
Constructs a newChooseTrackVisibilityAction.- Parameters:
layer- The associated GPX layer
-
-
Method Detail
-
buildTableContents
private java.lang.Object[][] buildTableContents()
Gathers all available data for the tracks and returns them as array of arrays in the expected column order.- Returns:
- table data
-
showColorDialog
private void showColorDialog(java.util.List<IGpxTrack> tracks)
-
buildTable
private static javax.swing.JTable buildTable(java.lang.Object[]... content)
Builds an editable table whose 5th column will open a browser when double clicked. The table will fill its parent.- Parameters:
content- table data- Returns:
- non-editable table
-
selectVisibleTracksInTable
private void selectVisibleTracksInTable()
selects all rows (=tracks) in the table that are currently visible on the layer
-
listenToSelectionChanges
private void listenToSelectionChanges()
listens to selection changes in the table and redraws the map
-
updateVisibilityFromTable
private void updateVisibilityFromTable()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ae)
-
-