Class WatchedStationsTracker

java.lang.Object
org.ka2ddo.yaac.core.WatchedStationsTracker

public final class WatchedStationsTracker extends Object
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
  • Method Details

    • getInstance

      public static WatchedStationsTracker getInstance()
      Get the singleton instance of the WatchedStationsTracker.
      Returns:
      singleton
    • isDrawTrackStripe

      public final boolean isDrawTrackStripe(String callsign)
      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

      public boolean addSpecificTrackStripe(String identifier)
      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

      public static void checkpointWatchedStationChanges(WatchedStationsTracker.WatchedStation ws)
      Write the current tracking settings for this station/object to Java Preferences.
      Parameters:
      ws - WatchedStation to checkpoint
    • removeSpecificTrackStripe

      public boolean removeSpecificTrackStripe(String identifier)
      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

      public int getWatchedStationIndex(String identifier)
      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

      public WatchedStationsTracker.WatchedStation getWatchedStation(int index)
      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

      public WatchedStationsTracker.WatchedStation getWatchedStation(String identifier)
      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

      public WatchedStationsTracker.WatchedStation 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.
      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

      public boolean removeWatchedStation(String identifier)
      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

      public void addFireTableModel(FireTableModel ftm)
      Add a FireTableModel to listen for changes in the tracker.
      Parameters:
      ftm - FireTableModel instance to register for update notifications
    • removeFireTableModel

      public void removeFireTableModel(FireTableModel ftm)
      Remove a FireTableModel from listening for changes in the tracker.
      Parameters:
      ftm - FireTableModel instance to unregister for update notifications