Class OverlayMark

java.lang.Object
PamView.paneloverlay.overlaymark.OverlayMark
Direct Known Subclasses:
ClipDisplayMark

public class OverlayMark extends Object
  • Constructor Details

  • Method Details

    • size

      public int size()
    • getCoordinate

      public PamCoordinate getCoordinate(int index)
    • getLastCoordinate

      public PamCoordinate getLastCoordinate()
    • addCoordinate

      public void addCoordinate(PamCoordinate pamCoordinate)
    • getMarkType

      public OverlayMark.OverlayMarkType getMarkType()
      Returns:
      the markType
    • setMarkType

      public void setMarkType(OverlayMark.OverlayMarkType markType)
      Parameters:
      markType - the markType to set
    • setCurrentMouseCoordinate

      public void setCurrentMouseCoordinate(PamCoordinate currentMouse)
    • getCurrentMouseCoordinate

      public PamCoordinate getCurrentMouseCoordinate()
    • getParameterTypes

      public GeneralProjector.ParameterType[] getParameterTypes()
      Returns:
      the parameterTypes
    • findParameterIndex

      public int findParameterIndex(GeneralProjector.ParameterType parameterType)
      Find the index of a given parameter type,
      Parameters:
      parameterType -
      Returns:
      index of the parameter, or -1 if it can't be found.
    • getParameterUnits

      public GeneralProjector.ParameterUnits[] getParameterUnits()
      Returns:
      the parameterUnits
    • getCoordinates

      public ArrayList<PamCoordinate> getCoordinates()
      Returns:
      the coordinates
    • getCentre

      public PamCoordinate getCentre()
      Returns:
      the central or mean position of all the mark points.
    • getLimits

      public double[] getLimits()
      The limits of the overlay mark. The limits are x and y extremities.
      Returns:
      the limits (minX, maxX, minY, maxY)
    • getCurrentMouse

      public PamCoordinate getCurrentMouse()
      Returns:
      the currentMouse
    • getMarkShape

      public Shape getMarkShape(GeneralProjector projector)
      Calculate the shape of the mark in screen coordinates.
      Parameters:
      projector - projector onto screen coordinates.
      Returns:
      shape (Rectangle or Region)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMarkSource

      public Object getMarkSource()
      Returns:
      the markSource
    • setMarkSource

      public void setMarkSource(Object markSource)
      Parameters:
      markSource - the markSource to set
    • getMarkChannels

      public int getMarkChannels()
      Returns:
      the markChannels
    • setMarkChannels

      public void setMarkChannels(int markChannels)
      Parameters:
      markChannels - the markChannels to set
    • getSwingComponentMousePos

      public static Point getSwingComponentMousePos(Component component, javafx.scene.input.MouseEvent mouseEvent)
      Get the coordinate of the mouse in this mark in the coordinate frame of the given component. Used primarily for positioning popup menus.
      Parameters:
      component - Swing component.
      mouseEvent -
      Returns:
      mouse coordinate within the given component.
    • repaintOwner

      public void repaintOwner()
      Repaint whatever drew this mark.
    • setHidden

      public void setHidden(boolean hidden)
      Set flag to hide the mark. This can be useful if the mark observer is dragging something and wants to stop the mark rectangle appearing on the screen.
      Parameters:
      hidden - hide flag
    • isHidden

      public boolean isHidden()
      Returns:
      Flag to say the mark should not be drawn.