Package org.ka2ddo.yaac.core
Class WatchedStationsTracker
java.lang.Object
org.ka2ddo.yaac.core.WatchedStationsTracker
This class records specific behavior for stations and objects that the user
specifically wants to monitor.
For updates to the tracked data, note that the column convention for table updates is:
- 0 - callsign
- 1 - draw track stripe on map
- 2 - auto-pan/zoom to keep this station on map
- 3 - draw double-sized icon to make this station easier to see
- 4 - make sounds only for stations with this flag set
- 5 - don't display station/object callsign or alias
- Author:
- Andrew Pavlin, KA2DDO
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This class specifies the types of operations to be performed for a specifically tracked station or object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a FireTableModel to listen for changes in the tracker.boolean
addSpecificTrackStripe
(String identifier) Add the identifier of a single station or object whose track stripe is to be plotted.addWatchedStationIfNeeded
(String identifier) Get the WatchedStation record for the station or object callsign stored in the individual track list, creating the record if it does not already exist.static void
Write the current tracking settings for this station/object to Java Preferences.boolean
Clear the plotting of all specific station/object track stripes.static WatchedStationsTracker
Get the singleton instance of the WatchedStationsTracker.int
Get the number of stations currently being tracked.getWatchedStation
(int index) Get the index of the station or object callsign stored in the individual track list.getWatchedStation
(String identifier) Get the WatchedStation record for the station or object callsign stored in the individual track list.int
getWatchedStationIndex
(String identifier) Get the index of the station or object callsign stored in the individual track list.final boolean
isDrawTrackStripe
(String callsign) Test whether the specific station or object should have a track stripe drawn after it.void
Remove a FireTableModel from listening for changes in the tracker.boolean
removeSpecificTrackStripe
(String identifier) Remove track-striping a single station or object.boolean
removeWatchedStation
(int index) Remove the entire record at the index for the station or object callsign stored in the individual track list.boolean
removeWatchedStation
(String identifier) Remove the entire record with the identifier for the station or object callsign stored in the individual track list.
-
Method Details
-
getInstance
Get the singleton instance of the WatchedStationsTracker.- Returns:
- singleton
-
isDrawTrackStripe
Test whether the specific station or object should have a track stripe drawn after it.- Parameters:
callsign
- String of station callsign-SSID or object name- Returns:
- boolean true if this identifier is supposed to be tracked
-
clearAllSpecificTrackStripes
public boolean clearAllSpecificTrackStripes()Clear the plotting of all specific station/object track stripes.- Returns:
- boolean true if any specific track stripes were turned off
-
addSpecificTrackStripe
Add the identifier of a single station or object whose track stripe is to be plotted.- Parameters:
identifier
- String station or object identifier- Returns:
- boolean true if a change happened
-
checkpointWatchedStationChanges
Write the current tracking settings for this station/object to Java Preferences.- Parameters:
ws
- WatchedStation to checkpoint
-
removeSpecificTrackStripe
Remove track-striping a single station or object.- Parameters:
identifier
- String station or object identifier- Returns:
- boolean true if track striping was turned off for a station/object
-
getWatchedStationIndex
Get the index of the station or object callsign stored in the individual track list.- Parameters:
identifier
- String callsign of station or object to search for- Returns:
- zero-based index of entry to obtain, or -1 if not in track list
-
getWatchedStation
Get the index of the station or object callsign stored in the individual track list.- Parameters:
index
- zero-based index of WatchedStation record in tracker- Returns:
- WatchedStation record, or null if index not in range
-
getWatchedStation
Get the WatchedStation record for the station or object callsign stored in the individual track list.- Parameters:
identifier
- String callsign of station or object to search for- Returns:
- WatchedStation record, or null if specified station not being tracked
-
getSpecificallyTrackedCount
public int getSpecificallyTrackedCount()Get the number of stations currently being tracked.- Returns:
- count of station callsigns listed for tracking
-
addWatchedStationIfNeeded
Get the WatchedStation record for the station or object callsign stored in the individual track list, creating the record if it does not already exist.- Parameters:
identifier
- String callsign of station or object to search for- Returns:
- WatchedStation record
-
removeWatchedStation
public boolean removeWatchedStation(int index) Remove the entire record at the index for the station or object callsign stored in the individual track list.- Parameters:
index
- zero-based index of WatchedStation record in tracker- Returns:
- boolean true if delete occurred, false otherwise
-
removeWatchedStation
Remove the entire record with the identifier for the station or object callsign stored in the individual track list.- Parameters:
identifier
- String callsign of station or object to search for- Returns:
- boolean true if delete occurred, false otherwise
-
addFireTableModel
Add a FireTableModel to listen for changes in the tracker.- Parameters:
ftm
- FireTableModel instance to register for update notifications
-
removeFireTableModel
Remove a FireTableModel from listening for changes in the tracker.- Parameters:
ftm
- FireTableModel instance to unregister for update notifications
-