Package PamView

Class HoverData

java.lang.Object
PamView.HoverData

public class HoverData extends Object
Holds hover data. Added to a list in a GeneralProjector every time a display is drawn. Was initially used to quickly obtain hover information on the map display but is now also being used to identify data units enclosed within marks made on the display with the OverlayMark system.
Author:
Jamie Macaulay
  • Constructor Details Link icon

    • HoverData Link icon

      public HoverData()
    • HoverData Link icon

      public HoverData(Shape drawnShape, PamDataUnit pamDataUnit, int iSide, int subPlotNumber)
    • HoverData Link icon

      public HoverData(Coordinate3d c, PamDataUnit pamDataUnit, int iSide, int subPlotNumber)
  • Method Details Link icon

    • getDataUnit Link icon

      public PamDataUnit getDataUnit()
      Get the data unit associated with the hover data.
      Returns:
      a pma data unit.
    • setTransformShape Link icon

      public void setTransformShape(TransformShape shape2)
    • setAmbiguity Link icon

      public void setAmbiguity(int iSide)
    • setDataUnit Link icon

      public void setDataUnit(PamDataUnit pamDataUnit)
    • getDrawnShape Link icon

      public Shape getDrawnShape()
      Get the drawn shape
      Returns:
      drawn shape
    • setDrawnShape Link icon

      public void setDrawnShape(Shape drawnShape)
      Set the drawn shape
      Parameters:
      drawnShape -
    • distFromCentre Link icon

      public double distFromCentre(double x, double y)
    • getShapeCentre Link icon

      public Point2D getShapeCentre()
      Get the centre of the drawn shape. This is actually the centre of the bounding rectangle, which may be different to any concept of a geometric centre for some shapes.
      Returns:
      shape centre.
    • setCoordinate3D Link icon

      public void setCoordinate3D(Coordinate3d coordinate3d)
    • getAmbiguity Link icon

      public int getAmbiguity()
      Get the ambiguity of the hover data i.e. one data unit may have multiple shapes/co-ordinates e.g. localisations on the map
      Returns:
      the ambiguity (previously refferred to as iSide)
    • getTransfromShape Link icon

      public TransformShape getTransfromShape()
      Get the shape in whihc hover text is located. May be null if CoOrdintate3d used instead.
      Returns:
      the hover shape. Hover text is allowed inside the shape boundary.
    • getSubPlotNumber Link icon

      public int getSubPlotNumber()
      Returns:
      the subPlotNumber
    • setSubPlotNumber Link icon

      public void setSubPlotNumber(int subPlotNumber)
      Parameters:
      subPlotNumber - the subPlotNumber to set