Package adams.gui.visualization.core
Class CoordinatesPaintlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.AbstractPaintlet
-
- adams.gui.visualization.core.AbstractStrokePaintlet
-
- adams.gui.visualization.core.CoordinatesPaintlet
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Paintlet>
,SizeOfHandler
,Paintlet
,Serializable
public class CoordinatesPaintlet extends AbstractStrokePaintlet
Paintlet for painting the coordinates.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-stroke-thickness <float> (property: strokeThickness) The thickness of the stroke. default: 1.0 minimum: 0.01
-color-x <java.awt.Color> (property: XColor) The color of the X axis. default: #808080
-color-y <java.awt.Color> (property: YColor) The color of the Y axis. default: #808080
-visible-x (property: XVisible) If set to true then X axis is visible.
-visible-y (property: YVisible) If set to true then Y axis is visible.
-offset-x <double> (property: XOffset) The offset of the X axis. default: 0.0
-offset-y <double> (property: YOffset) The offset of the Y axis. default: 0.0
- Version:
- $Revision$
- 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
CoordinatesPaintlet.Coordinates
Enum for the coordinates.
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_XColor
the color to use for painting for the X axis.protected double
m_XOffset
the Y-offset for the X-axis.protected boolean
m_XVisible
whether the X-axis is visible.protected Color
m_YColor
the color to use for painting for the Y axis.protected double
m_YOffset
the X-offset for the Y-axis.protected boolean
m_YVisible
whether the Y-axis is visible.-
Fields inherited from class adams.gui.visualization.core.AbstractStrokePaintlet
m_StrokeThickness
-
Fields inherited from class adams.gui.visualization.core.AbstractPaintlet
m_Enabled, m_Initializing, m_Panel, m_RepaintOnChange
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description CoordinatesPaintlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected void
doPerformPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.PaintEvent.PaintMoment
getPaintMoment()
Returns when this paintlet is to be executed.Color
getXColor()
Returns the color for the X axis.double
getXOffset()
Returns the offset for the X axis.Color
getYColor()
Returns the color for the Y axis.double
getYOffset()
Returns the offset for the Y axis.String
globalInfo()
Returns a string describing the object.boolean
isXInvisible()
Returns whether the X axis is visible or not.boolean
isYInvisible()
Returns whether the Y axis is visible or not.void
setXColor(Color value)
Sets the color for the X axis.void
setXInvisible(boolean value)
Sets the X axis visible or hides it.void
setXOffset(double value)
Sets the offset for the X axis.void
setYColor(Color value)
Sets the color for the Y axis.void
setYInvisible(boolean value)
Sets the Y axis visible or hides it.void
setYOffset(double value)
Sets the offset for the Y axis.String
XColorTipText()
Returns the tip text for this property.String
XInvisibleTipText()
Returns the tip text for this property.String
XOffsetTipText()
Returns the tip text for this property.String
YColorTipText()
Returns the tip text for this property.String
YInvisibleTipText()
Returns the tip text for this property.String
YOffsetTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.core.AbstractStrokePaintlet
applyStroke, getStrokeThickness, getStrokeWidth, performPaint, setStrokeThickness, strokeThicknessTipText
-
Methods inherited from class adams.gui.visualization.core.AbstractPaintlet
canPaint, finishInit, forCommandLine, forName, getPaintlets, getPanel, getPlot, getRepaintOnChange, hasPanel, initialize, isEnabled, isInitializing, memberChanged, memberChanged, paint, repaint, setEnabled, setPanel, setPanel, setRepaintOnChange, shallowCopy, shallowCopy, updatePanel
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
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, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_XColor
protected Color m_XColor
the color to use for painting for the X axis.
-
m_YColor
protected Color m_YColor
the color to use for painting for the Y axis.
-
m_XVisible
protected boolean m_XVisible
whether the X-axis is visible.
-
m_YVisible
protected boolean m_YVisible
whether the Y-axis is visible.
-
m_XOffset
protected double m_XOffset
the Y-offset for the X-axis.
-
m_YOffset
protected double m_YOffset
the X-offset for the Y-axis.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractStrokePaintlet
-
setXColor
public void setXColor(Color value)
Sets the color for the X axis.- Parameters:
value
- the new color
-
getXColor
public Color getXColor()
Returns the color for the X axis.- Returns:
- the color
-
XColorTipText
public String XColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setYColor
public void setYColor(Color value)
Sets the color for the Y axis.- Parameters:
value
- the new color
-
getYColor
public Color getYColor()
Returns the color for the Y axis.- Returns:
- the color
-
YColorTipText
public String YColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setXOffset
public void setXOffset(double value)
Sets the offset for the X axis.- Parameters:
value
- the new offset
-
getXOffset
public double getXOffset()
Returns the offset for the X axis.- Returns:
- the offset
-
XOffsetTipText
public String XOffsetTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setYOffset
public void setYOffset(double value)
Sets the offset for the Y axis.- Parameters:
value
- the new offset
-
getYOffset
public double getYOffset()
Returns the offset for the Y axis.- Returns:
- the offset
-
YOffsetTipText
public String YOffsetTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setXInvisible
public void setXInvisible(boolean value)
Sets the X axis visible or hides it.- Parameters:
value
- true to hide the axis, false to show it
-
isXInvisible
public boolean isXInvisible()
Returns whether the X axis is visible or not.- Returns:
- true if invisible
-
XInvisibleTipText
public String XInvisibleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setYInvisible
public void setYInvisible(boolean value)
Sets the Y axis visible or hides it.- Parameters:
value
- true to hide the axis, false to display it
-
isYInvisible
public boolean isYInvisible()
Returns whether the Y axis is visible or not.- Returns:
- true if invisible
-
YInvisibleTipText
public String YInvisibleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getPaintMoment
public PaintEvent.PaintMoment getPaintMoment()
Returns when this paintlet is to be executed.- Specified by:
getPaintMoment
in interfacePaintlet
- Specified by:
getPaintMoment
in classAbstractPaintlet
- Returns:
- when this paintlet is to be executed
-
doPerformPaint
protected void doPerformPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.- Specified by:
doPerformPaint
in classAbstractStrokePaintlet
- Parameters:
g
- the graphics context to use for paintingmoment
- whatPaintEvent.PaintMoment
is currently being painted
-
-