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

    • HoverData

      public HoverData()
    • HoverData

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

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

    • getDataUnit

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

      public void setTransformShape(TransformShape shape2)
    • setAmbiguity

      public void setAmbiguity(int iSide)
    • setDataUnit

      public void setDataUnit(PamDataUnit pamDataUnit)
    • getDrawnShape

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

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

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

      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

      public void setCoordinate3D(Coordinate3d coordinate3d)
    • getAmbiguity

      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

      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

      public int getSubPlotNumber()
      Returns:
      the subPlotNumber
    • setSubPlotNumber

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