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 intDEFAULT_POINT_WIDTHprivate java.awt.Graphics2Dgraphicsprivate java.awt.image.BufferedImageimageprivate intwidth-
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 voidaddPoint(Point point)Add a new point using the current width and color.voidaddPoint(Point point, int width)Set the current width and then add a new point.voidaddPoint(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.voidaddPoint(Point point, java.awt.Color color)Set the current color and then add a new point.voiddrawImpl(java.awt.Graphics2D g)intgetZLevel()voidsetColor(java.awt.Color color)Set the color of this overlay.voidsetWidth(int width)Set the width of this overlay for future addPoint().voidsetWidthAndColor(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:
getZLevelin classBasicDrawing.BasicOverlay- Returns:
- The Z level of this overlay (>= 1).
-
setColor
public void setColor(java.awt.Color color)
Description copied from interface:OverlaySet the color of this overlay.- Specified by:
setColorin interfaceOverlay- Overrides:
setColorin classBasicDrawing.BasicOverlay- Parameters:
color- New color for the overlay.
-
setWidth
public void setWidth(int width)
Description copied from interface:PointSetOverlaySet the width of this overlay for future addPoint().- Specified by:
setWidthin interfacePointSetOverlay- Parameters:
width- New default width for this overlay.
-
setWidthAndColor
public void setWidthAndColor(int width, java.awt.Color color)Description copied from interface:PointSetOverlaySet color and width for this overlay for future addPoint().- Specified by:
setWidthAndColorin 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:PointSetOverlayAdd a new point using the current width and color.- Specified by:
addPointin 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:PointSetOverlaySet the current width and then add a new point.- Specified by:
addPointin 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:PointSetOverlaySet the current color and then add a new point.- Specified by:
addPointin 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:PointSetOverlayAdd a new point at the given location, with the given color and width, and update the current width and color.- Specified by:
addPointin 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:
drawImplin classBasicDrawing.BasicOverlay
-
-