Class ZoomControl

All Implemented Interfaces:
com.bbn.openmap.gui.MapPanelChild, ImageObserver, MenuContainer, Serializable, Accessible

public class ZoomControl extends JPanel implements com.bbn.openmap.gui.MapPanelChild
This panel of widgets is a replacement for the default zoom controls provided with OpenMap. It is specific to YAAC because it taps into the GPSDistributor and BeaconData.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • ZoomControl

      public ZoomControl(com.bbn.openmap.MapBean mapBean, boolean showMem, boolean showFreezeThaw)
      Create a ZoomControl widget for the MapBean's toolbar.
      Parameters:
      mapBean - MapBean to attach the widget to
      showMem - boolean true if heap consumption widget should be displayed on the toolbar
      showFreezeThaw - boolean true if freeze and thaw toggle buttons should be added to toolbar
      See Also:
  • Method Details

    • home

      public void home()
      Pan the map so the local station is at the center.
    • zoomIn

      public void zoomIn(float zoomFactor)
      Reduce the map scale by the specified zoom factor.
      Parameters:
      zoomFactor - ratio to divide the current map scale by
    • zoomOut

      public void zoomOut(float zoomFactor)
      Enlarge the map scale by the specified zoom factor.
      Parameters:
      zoomFactor - ratio to multiply the current map scale by
    • getPreferredLocation

      public String getPreferredLocation()
      Get where on the map bean this control widget wants to be added.
      Specified by:
      getPreferredLocation in interface com.bbn.openmap.gui.MapPanelChild
      Returns:
      always on the North side
    • setPreferredLocation

      public void setPreferredLocation(String string)
      No-op, because this widget is hard-wired to want to be at the top edge of the map.
      Specified by:
      setPreferredLocation in interface com.bbn.openmap.gui.MapPanelChild
      Parameters:
      string - ignored name of relative position on MapBean to place this widget
    • getParentName

      public String getParentName()
      Get the name of the widget containing this ZoomControl object.
      Specified by:
      getParentName in interface com.bbn.openmap.gui.MapPanelChild
      Returns:
      String name of containing widget
    • getScale

      public float getScale()
      Get the current value of the map scale display on this widget.
      Returns:
      float length of map scale
    • getBlinkenLightsPanel

      public JPanel getBlinkenLightsPanel()
      Get the small panel in the north toolbar for displaying blinkenlights (small status lights).
      Returns:
      blinkenlights JPanel
    • setMemoryGCPanelVisible

      public void setMemoryGCPanelVisible(boolean visible)
      Change the visibility of the memory usage status monitor.
      Parameters:
      visible - boolean true if memory status monitor should be visible
    • isMemoryGCPanelVisible

      public boolean isMemoryGCPanelVisible()
      Report the current visibility of the MemoryGCPanel.
      Returns:
      boolean true if panel is visible