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 protectedJxnAbstractPainter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StrokeapplyStroke(Graphics g)To be called from thepaintmethods.protected StrokeapplyStroke(Graphics g, float fxy)KmgDoubleBoundsgetKmgDoubleBounds()Returns the bounds of the graphical object (called internally).KmgXYPainterlw(float lineWidth)Shortcut ofsetLineWidth(float).static JxnBasicPlotFrameplot(JxnAbstractPainter ap)Creates a PlotFrame to displayap.static JxnBasicPlotFrameplot90(JxnAbstractPainter ap)TODO: wozu?KmgXYPaintersetColor(Color color)Sets the color for this object.KmgXYPaintersetIgnoreBounds()Do not consider this graphical object for scaling.KmgXYPaintersetIgnoreBounds(boolean ignore)Determines if to consider this graphical object for scaling.KmgXYPaintersetLineWidth(float lineWidth)Sets the line width (if appropriate) for this object.static floatsetLineWidthDefault(float lineWidth)Sets the default line width.KmgXYPaintersetStroke(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 usedsetLineWidthis 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:KmgXYPainterReturns the bounds of the graphical object (called internally).- Specified by:
getKmgDoubleBoundsin interfaceKmgXYPainter
-
-