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 classCoordinatesPaintlet.CoordinatesEnum for the coordinates.
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_XColorthe color to use for painting for the X axis.protected doublem_XOffsetthe Y-offset for the X-axis.protected booleanm_XVisiblewhether the X-axis is visible.protected Colorm_YColorthe color to use for painting for the Y axis.protected doublem_YOffsetthe X-offset for the Y-axis.protected booleanm_YVisiblewhether 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 voiddefineOptions()Adds options to the internal list of options.protected voiddoPerformPaint(Graphics g, PaintEvent.PaintMoment moment)The paint routine of the paintlet.PaintEvent.PaintMomentgetPaintMoment()Returns when this paintlet is to be executed.ColorgetXColor()Returns the color for the X axis.doublegetXOffset()Returns the offset for the X axis.ColorgetYColor()Returns the color for the Y axis.doublegetYOffset()Returns the offset for the Y axis.StringglobalInfo()Returns a string describing the object.booleanisXInvisible()Returns whether the X axis is visible or not.booleanisYInvisible()Returns whether the Y axis is visible or not.voidsetXColor(Color value)Sets the color for the X axis.voidsetXInvisible(boolean value)Sets the X axis visible or hides it.voidsetXOffset(double value)Sets the offset for the X axis.voidsetYColor(Color value)Sets the color for the Y axis.voidsetYInvisible(boolean value)Sets the Y axis visible or hides it.voidsetYOffset(double value)Sets the offset for the Y axis.StringXColorTipText()Returns the tip text for this property.StringXInvisibleTipText()Returns the tip text for this property.StringXOffsetTipText()Returns the tip text for this property.StringYColorTipText()Returns the tip text for this property.StringYInvisibleTipText()Returns the tip text for this property.StringYOffsetTipText()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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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:
getPaintMomentin interfacePaintlet- Specified by:
getPaintMomentin 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:
doPerformPaintin classAbstractStrokePaintlet- Parameters:
g- the graphics context to use for paintingmoment- whatPaintEvent.PaintMomentis currently being painted
-
-