Class Zoomer

java.lang.Object
PamView.zoomer.Zoomer

public class Zoomer extends Object
Class for handling multiple zoom and marked areas on a display.

The zoomer will generally handle both dragged rectangular zoom boxes and also more complicated polygons created by double clicking at a start point and then repeatedly single clicking until back at the start point

Author:
Doug Gillespie
  • Constructor Details

  • Method Details

    • paintShape

      public Rectangle paintShape(Graphics g, Component c, boolean beforeOther)
      Paint the top most shape in the zoom sequence

      This should be called twice from the paint function of the component hosting the zoom feature, once before other drawing and once after.

      Parameters:
      g - graphics
      c - component to draw on
      beforeOther - called before other drawing
      Returns:
      outer rectangle of drawing.
    • isInMark

      public boolean isInMark(Component c, Point pt)
      Parameters:
      pt - Point on display in pixels.
      Returns:
      true if there is no mark or if the click is within the marked region
    • clearLatestShape

      public void clearLatestShape()
    • getTopMostShape

      public ZoomShape getTopMostShape()
      Returns:
      the topMostShape
    • appendZoomMenuItems

      public int appendZoomMenuItems(Container menu)
      Add menu items associated with zooming into a pre-existing menu.
      Parameters:
      menu - menu
      Returns:
      number of items added.
    • getZoomerMouse

      public PamView.zoomer.Zoomer.ZoomerMouse getZoomerMouse()
      Returns:
      the zoomerMouse
    • findLastZoom

      public ZoomShape findLastZoom(int coodinateType)