Class TrackChooserTView

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, OSPRuntime.Disposable
Direct Known Subclasses:
PlotTView, TableTView

public abstract class TrackChooserTView extends TView
This displays track views selected from a dropdown list. This is an abstract class and cannot be instantiated directly. Subclassed as PlotTView and TableTView
Author:
Douglas Brown
See Also:
  • Field Details

    • ignoreRefresh

      public static boolean ignoreRefresh
    • tracks

      protected Map<Object,TTrack> tracks
    • trackViews

      protected Map<TTrack,TrackView> trackViews
    • selectedTrack

      protected TTrack selectedTrack
    • refreshing

      protected boolean refreshing
  • Constructor Details

    • TrackChooserTView

      protected TrackChooserTView(TrackerPanel panel)
      Constructs a TrackChooserView for the specified tracker panel.
      Parameters:
      panel - the tracker panel
  • Method Details

    • getPanel

      protected TrackerPanel getPanel()
    • refresh

      public void refresh()
      Refreshes the dropdown list and track views.
      Specified by:
      refresh in class TView
    • refreshMenus

      protected abstract void refreshMenus()
      Refreshes the menus.
    • getMenuItems

      protected void getMenuItems()
    • isTrackViewDisplayed

      protected boolean isTrackViewDisplayed(TTrack track)
      Determines if the specified track is currently displayed.
      Parameters:
      track - the track
      Returns:
      true if this TView is displayed and the track is selected
    • init

      public void init()
      Initializes this view
      Specified by:
      init in class TView
    • cleanup

      public void cleanup()
      Cleans up this view
      Specified by:
      cleanup in class TView
    • dispose

      public void dispose()
      Disposes of the view
      Specified by:
      dispose in interface OSPRuntime.Disposable
      Overrides:
      dispose in class TView
    • getTrackerPanel

      public TrackerPanel getTrackerPanel()
      Gets the tracker panel containing the tracks
      Specified by:
      getTrackerPanel in class TView
      Returns:
      the tracker panel
    • getSelectedTrack

      public TTrack getSelectedTrack()
      Gets the selected track
      Returns:
      the track
    • setSelectedTrack

      public void setSelectedTrack(TTrack track)
      Sets the selected track
      Parameters:
      track - the track to be selected
    • getTrackView

      public TrackView getTrackView(TTrack track)
      Gets the track view for the specified track
      Parameters:
      track - the track to be viewed
      Returns:
      the track view
    • getViewName

      public abstract String getViewName()
      Gets the name of the view
      Specified by:
      getViewName in class TView
      Returns:
      the name of this view
    • getToolBarComponents

      public ArrayList<Component> getToolBarComponents()
      Gets the toolbar components
      Overrides:
      getToolBarComponents in class TView
      Returns:
      an ArrayList of components to be added to a toolbar at the top of the view. This includes View buttton
    • isCustomState

      public boolean isCustomState()
      Returns true if this view is in a custom state.
      Overrides:
      isCustomState in class TView
      Returns:
      true if in a custom state, false if in the default state
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Responds to property change events. This receives the following events: "track", "transform" from trackerPanel; "name", "color", footprint" and "data" from selected track.
      Parameters:
      e - the property change event
    • createTrackView

      protected abstract TrackView createTrackView(TTrack track)
      Creates a view for the specified track
      Parameters:
      track - the track to be viewed
      Returns:
      the track view
    • getTrack

      protected TTrack getTrack(String name)
      Gets a track with the specified name
      Parameters:
      name - the name of the track
      Returns:
      the track
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class JComponent
    • repaint

      public void repaint()
      Overrides:
      repaint in class Component
    • toString

      public String toString()
      Overrides:
      toString in class Component