Class Markers
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.gui.visualization.segmentation.layer.Markers
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Serializable
public class Markers extends CustomLoggingLevelObject
Manages markers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMarkers.ShapeEnum for the marker shape to plot around the marker points.
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_Colorthe color for the markers.protected intm_Extentthe maximum width/height of the shape to plot around the marker points.protected LayerManagerm_Ownerthe owner.protected List<Point>m_Pointsthe marker points to draw.protected Markers.Shapem_Shapethe marker shape.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Markers(LayerManager owner)Initializes the marker handling.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Point p)Adds the marker point.voidclear()Removes all marker points.voiddrawMarkers(Graphics2D g)Draws the markers.ColorgetColor()Returns the color in use for markers.intgetExtent()Returns the size of the markers.LayerManagergetOwner()Returns the owning layer manager.List<Point>getPoints()Returns the currently store points.Markers.ShapegetShape()Returns the shape in use for markers.voidsetColor(Color value)Sets the color to use for markers.voidsetExtent(int value)Sets the size of the markers.voidsetShape(Markers.Shape value)Sets the shape to use for markers.intsize()Returns the number of marker points.voidupdate()Triggers an update (if any markers).voidupdate(boolean force)Triggers an update.-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Owner
protected LayerManager m_Owner
the owner.
-
m_Shape
protected Markers.Shape m_Shape
the marker shape.
-
m_Color
protected Color m_Color
the color for the markers.
-
m_Extent
protected int m_Extent
the maximum width/height of the shape to plot around the marker points.
-
-
Constructor Detail
-
Markers
public Markers(LayerManager owner)
Initializes the marker handling.
-
-
Method Detail
-
getOwner
public LayerManager getOwner()
Returns the owning layer manager.- Returns:
- the owner
-
clear
public void clear()
Removes all marker points.
-
size
public int size()
Returns the number of marker points.- Returns:
- the number of points
-
add
public void add(Point p)
Adds the marker point.- Parameters:
p- the point to add
-
setShape
public void setShape(Markers.Shape value)
Sets the shape to use for markers.- Parameters:
value- the shape
-
getShape
public Markers.Shape getShape()
Returns the shape in use for markers.- Returns:
- the shape
-
setColor
public void setColor(Color value)
Sets the color to use for markers.- Parameters:
value- the color
-
getColor
public Color getColor()
Returns the color in use for markers.- Returns:
- the color
-
setExtent
public void setExtent(int value)
Sets the size of the markers.- Parameters:
value- the extent
-
getExtent
public int getExtent()
Returns the size of the markers.- Returns:
- the extent
-
drawMarkers
public void drawMarkers(Graphics2D g)
Draws the markers.- Parameters:
g- the graphics context
-
update
public void update()
Triggers an update (if any markers).
-
update
public void update(boolean force)
Triggers an update.
-
-