Class BasicDrawing.BasicPointSetOverlay
- java.lang.Object
-
- org.insa.graphs.gui.drawing.components.BasicDrawing.BasicOverlay
-
- org.insa.graphs.gui.drawing.components.BasicDrawing.BasicPointSetOverlay
-
- All Implemented Interfaces:
Overlay
,PointSetOverlay
- Enclosing class:
- BasicDrawing
private class BasicDrawing.BasicPointSetOverlay extends BasicDrawing.BasicOverlay implements PointSetOverlay
-
-
Field Summary
Fields Modifier and Type Field Description private static int
DEFAULT_POINT_WIDTH
private java.awt.Graphics2D
graphics
private java.awt.image.BufferedImage
image
private int
width
-
Fields inherited from class org.insa.graphs.gui.drawing.components.BasicDrawing.BasicOverlay
color, visible
-
-
Constructor Summary
Constructors Constructor Description BasicPointSetOverlay()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPoint(Point point)
Add a new point using the current width and color.void
addPoint(Point point, int width)
Set the current width and then add a new point.void
addPoint(Point point, int width, java.awt.Color color)
Add a new point at the given location, with the given color and width, and update the current width and color.void
addPoint(Point point, java.awt.Color color)
Set the current color and then add a new point.void
drawImpl(java.awt.Graphics2D g)
int
getZLevel()
void
setColor(java.awt.Color color)
Set the color of this overlay.void
setWidth(int width)
Set the width of this overlay for future addPoint().void
setWidthAndColor(int width, java.awt.Color color)
Set color and width for this overlay for future addPoint().-
Methods inherited from class org.insa.graphs.gui.drawing.components.BasicDrawing.BasicOverlay
delete, draw, getColor, isVisible, redraw, setVisible
-
-
-
-
Field Detail
-
DEFAULT_POINT_WIDTH
private static final int DEFAULT_POINT_WIDTH
- See Also:
- Constant Field Values
-
image
private final java.awt.image.BufferedImage image
-
graphics
private final java.awt.Graphics2D graphics
-
width
private int width
-
-
Method Detail
-
getZLevel
public int getZLevel()
- Specified by:
getZLevel
in classBasicDrawing.BasicOverlay
- Returns:
- The Z level of this overlay (>= 1).
-
setColor
public void setColor(java.awt.Color color)
Description copied from interface:Overlay
Set the color of this overlay.- Specified by:
setColor
in interfaceOverlay
- Overrides:
setColor
in classBasicDrawing.BasicOverlay
- Parameters:
color
- New color for the overlay.
-
setWidth
public void setWidth(int width)
Description copied from interface:PointSetOverlay
Set the width of this overlay for future addPoint().- Specified by:
setWidth
in interfacePointSetOverlay
- Parameters:
width
- New default width for this overlay.
-
setWidthAndColor
public void setWidthAndColor(int width, java.awt.Color color)
Description copied from interface:PointSetOverlay
Set color and width for this overlay for future addPoint().- Specified by:
setWidthAndColor
in interfacePointSetOverlay
- Parameters:
width
- New default width for this overlay.color
- New default color for this overlay.
-
addPoint
public void addPoint(Point point)
Description copied from interface:PointSetOverlay
Add a new point using the current width and color.- Specified by:
addPoint
in interfacePointSetOverlay
- Parameters:
point
- Position of the point to add.- See Also:
PointSetOverlay.setWidth(int)
,Overlay.setColor(Color)
-
addPoint
public void addPoint(Point point, int width)
Description copied from interface:PointSetOverlay
Set the current width and then add a new point.- Specified by:
addPoint
in interfacePointSetOverlay
- Parameters:
point
- Position of the point to add.width
- New default width for this overlay.- See Also:
PointSetOverlay.setWidth(int)
,PointSetOverlay.addPoint(Point)
-
addPoint
public void addPoint(Point point, java.awt.Color color)
Description copied from interface:PointSetOverlay
Set the current color and then add a new point.- Specified by:
addPoint
in interfacePointSetOverlay
- Parameters:
point
- Position of the point to add.color
- New default color for this overlay.- See Also:
Overlay.setColor(Color)
,PointSetOverlay.addPoint(Point)
-
addPoint
public void addPoint(Point point, int width, java.awt.Color color)
Description copied from interface:PointSetOverlay
Add a new point at the given location, with the given color and width, and update the current width and color.- Specified by:
addPoint
in interfacePointSetOverlay
- Parameters:
point
- Position of the point to add.width
- New default width for this overlay.color
- New default color for this overlay.- See Also:
PointSetOverlay.setWidth(int)
,Overlay.setColor(Color)
,PointSetOverlay.addPoint(Point)
-
drawImpl
public void drawImpl(java.awt.Graphics2D g)
- Specified by:
drawImpl
in classBasicDrawing.BasicOverlay
-
-