Class OverlayMark

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

public class OverlayMark extends Object
  • Constructor Details Link icon

  • Method Details Link icon

    • size Link icon

      public int size()
    • getCoordinate Link icon

      public PamCoordinate getCoordinate(int index)
    • getLastCoordinate Link icon

      public PamCoordinate getLastCoordinate()
    • addCoordinate Link icon

      public void addCoordinate(PamCoordinate pamCoordinate)
    • getMarkType Link icon

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

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

      public void setCurrentMouseCoordinate(PamCoordinate currentMouse)
    • getCurrentMouseCoordinate Link icon

      public PamCoordinate getCurrentMouseCoordinate()
    • getParameterTypes Link icon

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

      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 Link icon

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

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

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

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

      public PamCoordinate getCurrentMouse()
      Returns:
      the currentMouse
    • getMarkShape Link icon

      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 Link icon

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

      public Object getMarkSource()
      Returns:
      the markSource
    • setMarkSource Link icon

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

      public int getMarkChannels()
      Returns:
      the markChannels
    • setMarkChannels Link icon

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

      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 Link icon

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

      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 Link icon

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