Package PamView
Class HoverData
java.lang.Object
PamView.HoverData
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 Summary
ConstructorDescriptionHoverData
(Shape drawnShape, PamDataUnit pamDataUnit, int iSide, int subPlotNumber) HoverData
(Coordinate3d c, PamDataUnit pamDataUnit, int iSide, int subPlotNumber) -
Method Summary
Modifier and TypeMethodDescriptiondouble
distFromCentre
(double x, double y) int
Get the ambiguity of the hover data i.e.Get the data unit associated with the hover data.Get the drawn shapeGet the centre of the drawn shape.int
Get the shape in whihc hover text is located.void
setAmbiguity
(int iSide) void
setCoordinate3D
(Coordinate3d coordinate3d) void
setDataUnit
(PamDataUnit pamDataUnit) void
setDrawnShape
(Shape drawnShape) Set the drawn shapevoid
setSubPlotNumber
(int subPlotNumber) void
setTransformShape
(TransformShape shape2)
-
Constructor Details
-
HoverData
public HoverData() -
HoverData
-
HoverData
-
-
Method Details
-
getDataUnit
Get the data unit associated with the hover data.- Returns:
- a pma data unit.
-
setTransformShape
-
setAmbiguity
public void setAmbiguity(int iSide) -
setDataUnit
-
getDrawnShape
Get the drawn shape- Returns:
- drawn shape
-
setDrawnShape
Set the drawn shape- Parameters:
drawnShape
-
-
distFromCentre
public double distFromCentre(double x, double y) -
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
-
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
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
-