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 class
Markers.Shape
Enum for the marker shape to plot around the marker points.
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_Color
the color for the markers.protected int
m_Extent
the maximum width/height of the shape to plot around the marker points.protected LayerManager
m_Owner
the owner.protected List<Point>
m_Points
the marker points to draw.protected Markers.Shape
m_Shape
the 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 void
add(Point p)
Adds the marker point.void
clear()
Removes all marker points.void
drawMarkers(Graphics2D g)
Draws the markers.Color
getColor()
Returns the color in use for markers.int
getExtent()
Returns the size of the markers.LayerManager
getOwner()
Returns the owning layer manager.List<Point>
getPoints()
Returns the currently store points.Markers.Shape
getShape()
Returns the shape in use for markers.void
setColor(Color value)
Sets the color to use for markers.void
setExtent(int value)
Sets the size of the markers.void
setShape(Markers.Shape value)
Sets the shape to use for markers.int
size()
Returns the number of marker points.void
update()
Triggers an update (if any markers).void
update(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.
-
-