Class JxnAbstractPainter
- java.lang.Object
-
- JxnAbstractPainter
-
- All Implemented Interfaces:
KmgXYPainter
- Direct Known Subclasses:
JxnGraphicsPainter
,JxnPolygonPainter
,JxnRealArrayCurve
,JxnShape2DPainter
,JxnSymbolPainter
,JxnTextPainter
public abstract class JxnAbstractPainter extends Object implements KmgXYPainter
Defines common properties of graphical (painter) objects. See the subclasses for details.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JxnAbstractPainter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stroke
applyStroke(Graphics g)
To be called from thepaint
methods.protected Stroke
applyStroke(Graphics g, float fxy)
KmgDoubleBounds
getKmgDoubleBounds()
Returns the bounds of the graphical object (called internally).KmgXYPainter
lw(float lineWidth)
Shortcut ofsetLineWidth(float)
.static JxnBasicPlotFrame
plot(JxnAbstractPainter ap)
Creates a PlotFrame to displayap
.static JxnBasicPlotFrame
plot90(JxnAbstractPainter ap)
TODO: wozu?KmgXYPainter
setColor(Color color)
Sets the color for this object.KmgXYPainter
setIgnoreBounds()
Do not consider this graphical object for scaling.KmgXYPainter
setIgnoreBounds(boolean ignore)
Determines if to consider this graphical object for scaling.KmgXYPainter
setLineWidth(float lineWidth)
Sets the line width (if appropriate) for this object.static float
setLineWidthDefault(float lineWidth)
Sets the default line width.KmgXYPainter
setStroke(Stroke stroke)
Sets theStroke
(if appropriate) for this object.-
Methods inherited from interface KmgXYPainter
paint
-
-
-
-
Method Detail
-
plot
public static JxnBasicPlotFrame plot(JxnAbstractPainter ap)
Creates a PlotFrame to displayap
.
-
plot90
public static JxnBasicPlotFrame plot90(JxnAbstractPainter ap)
TODO: wozu? Creates a PlotFrame to displayap
.
-
setColor
public KmgXYPainter setColor(Color color)
Sets the color for this object.- Returns:
- this
-
setLineWidthDefault
public static float setLineWidthDefault(float lineWidth)
Sets the default line width.- Returns:
- the old default
-
setLineWidth
public KmgXYPainter setLineWidth(float lineWidth)
Sets the line width (if appropriate) for this object. Note: IfsetStroke(java.awt.Stroke)
is usedsetLineWidth
is ignored.- Returns:
- this
-
lw
public KmgXYPainter lw(float lineWidth)
- Returns:
- this
-
setStroke
public KmgXYPainter setStroke(Stroke stroke)
Sets theStroke
(if appropriate) for this object.- Returns:
- this
- See Also:
java.awt.BasicStroke
, → Java Tutorial
-
setIgnoreBounds
public KmgXYPainter setIgnoreBounds()
Do not consider this graphical object for scaling.- Returns:
- this
-
setIgnoreBounds
public KmgXYPainter setIgnoreBounds(boolean ignore)
Determines if to consider this graphical object for scaling.- Returns:
- this
-
getKmgDoubleBounds
public KmgDoubleBounds getKmgDoubleBounds()
Description copied from interface:KmgXYPainter
Returns the bounds of the graphical object (called internally).- Specified by:
getKmgDoubleBounds
in interfaceKmgXYPainter
-
-