public static class ShapeDebugFrame.Point2DShapeInfo extends ShapeDebugFrame.ShapeInfo
name
Constructor and Description |
---|
Point2DShapeInfo(Point2D point,
java.lang.String name,
java.awt.Color colour,
boolean square)
Construct a new Point2DShapeInfo object.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Point2D |
getBoundsPoint()
Get the point representing this shape.
|
java.awt.Shape |
getBoundsShape()
Get the bounding shape of this shape.
|
java.awt.Shape |
paint(java.awt.Graphics2D g,
ScreenTransform transform)
Paint this ShapeInfo on a Graphics2D object.
|
void |
paintLegend(java.awt.Graphics2D g,
int width,
int height)
Paint this ShapeInfo on a the legend.
|
getName, getObject
public Point2DShapeInfo(Point2D point, java.lang.String name, java.awt.Color colour, boolean square)
point
- The point to display.name
- The name of the point.colour
- The colour of the point.square
- Whether to draw as a square or a cross. If false then a cross will be drawn.public java.awt.Shape paint(java.awt.Graphics2D g, ScreenTransform transform)
ShapeDebugFrame.ShapeInfo
paint
in class ShapeDebugFrame.ShapeInfo
g
- The Graphics2D to draw on.transform
- The current screen transform.public void paintLegend(java.awt.Graphics2D g, int width, int height)
ShapeDebugFrame.ShapeInfo
paintLegend
in class ShapeDebugFrame.ShapeInfo
g
- The Graphics2D to draw on.width
- The available width.height
- The available height.public java.awt.Shape getBoundsShape()
ShapeDebugFrame.ShapeInfo
getBoundsShape
in class ShapeDebugFrame.ShapeInfo
public java.awt.geom.Point2D getBoundsPoint()
ShapeDebugFrame.ShapeInfo
getBoundsPoint
in class ShapeDebugFrame.ShapeInfo