Class ZoomTView

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

public class ZoomTView extends TView
This is a TView of a tracker panel in a zoomable scrollpane.
Author:
Douglas Brown
See Also:
  • Field Details

  • Constructor Details

    • ZoomTView

      public ZoomTView(TrackerPanel panel)
      Constructs a main view of a tracker panel.
      Parameters:
      panel - the tracker panel
  • Method Details

    • doKeyPressed

      protected void doKeyPressed(KeyEvent e)
    • doKeyRelease

      protected void doKeyRelease(KeyEvent e)
    • doMousePressed

      protected void doMousePressed(MouseEvent e)
    • doMouseReleased

      protected void doMouseReleased(MouseEvent e)
    • doMouseDragged

      protected void doMouseDragged(MouseEvent e)
    • doMouseWheel

      protected void doMouseWheel(MouseWheelEvent e)
    • doResized

      protected boolean doResized()
    • setZoomCenter

      public void setZoomCenter(int x, int y)
      Sets the position of the zoom center point in image coordinates.
      Parameters:
      x -
      y -
    • scrollToZoomCenter

      public void scrollToZoomCenter(Dimension size, Dimension prevSize, Point panelLoc)
      Scrolls to the zoom center after changing the magnification.
      Parameters:
      size - the current size of the TrackerPanel
      prevSize - the previous size of the TrackerPanel
      panelLoc - the current location of the TrackerPanel relative to the scrollPane viewport.
    • refreshZoomButton

      protected void refreshZoomButton()
    • refresh

      public void refresh()
      Refreshes this view.
      Specified by:
      refresh in class TView
    • 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 TrackerPanel containing the track data
      Specified by:
      getTrackerPanel in class TView
      Returns:
      the tracker panel containing the data to be viewed
    • getViewName

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

      public Icon getViewIcon()
      Gets the icon for this view
      Specified by:
      getViewIcon in class TView
      Returns:
      the icon for the view
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Responds to property change events.
      Parameters:
      e - the property change event
    • zoomIn

      public void zoomIn(boolean step)
      Zooms in.
      Parameters:
      step - true to zoom by a step
    • zoomOut

      public void zoomOut(boolean step)
      Zooms out.
      Parameters:
      step - true to zoom by a step
    • getViewType

      public int getViewType()
      Description copied from class: TView
      Gets the type of view
      Specified by:
      getViewType in class TView
      Returns:
      one of the defined types