T
- needed for generic comparablepublic abstract class APointPainter<T extends IPointPainterConfigurableUI<T>> extends Object implements IPointPainterConfigurableUI<T>
IPointPainter
as "no operation".
Constructor and Description |
---|
APointPainter()
Default constructor (sets the consumed by paint flag to false).
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(T arg0) |
void |
endPaintIteration(Graphics g2d)
Invoked to inform implementations that a paint iteration ends for the
corresponding
ITrace2D . |
boolean |
equals(Object obj) |
Color |
getColor()
Returns the color to paint with or
null if no special color is desired. |
Color |
getColorFill()
Returns the color to paint fillings with or
null if no special color is desired. |
Stroke |
getStroke()
Returns the stroke to paint with.
|
int |
getTransparency()
Returns the transparency to use for painting.
|
int |
getTransparencyFill()
Returns the transparency to use for fill painting.
|
int |
hashCode() |
protected Color |
installColor(Graphics g)
Installs the color to the graphics context if and only if a color has been
set.
|
protected Color |
installColorFill(Graphics g)
Installs the fill color to the graphics context if and only if a fill color
has been set.
|
protected Stroke |
installStroke(Graphics g)
Installs the stroke to the graphics context if and only if a stroke has
been set.
|
Color |
setColor(Color color)
Sets the color to paint with or
null if no special color is
desired. |
Color |
setColorFill(Color fillColor)
Sets the color to paint fillings with or
null if no special
fill color is desired. |
Stroke |
setStroke(Stroke stroke)
Sets the stroke to paint with or
null if no special color is
desired. |
int |
setTransparency(int transparency0to255)
Sets the transparency to use for painting.
|
int |
setTransparencyFill(int transparency0to255)
Sets the transparency to use for fill painting.
|
void |
startPaintIteration(Graphics g2d)
Invoked to inform implementations that a paint iteration starts for the
corresponding
ITrace2D . |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
calculateMaxX, calculateMaxY, calculateMinX, calculateMinY, isAdditionalSpaceRequiredX, isAdditionalSpaceRequiredY, isPixelTransformationNeededX, isPixelTransformationNeededY, paintPoint
public APointPainter()
public final int compareTo(T arg0)
compareTo
in interface Comparable<T extends IPointPainterConfigurableUI<T>>
Comparable.compareTo(java.lang.Object)
public void endPaintIteration(Graphics g2d)
IPointPainter
ITrace2D
.
endPaintIteration
in interface IPointPainter<T extends IPointPainterConfigurableUI<T>>
g2d
- provided in case pending paint operations have to be performed.IPointPainter.endPaintIteration(java.awt.Graphics)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public Color getColor()
IPointPainterConfigurableUI
null if no special color is desired.
getColor
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
null if no special color is
desired.
IPointPainterConfigurableUI.getColor()
public Color getColorFill()
IPointPainterConfigurableUI
null if no special color is desired.
getColorFill
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
null if no special
color is desired.
IPointPainterConfigurableUI.getColorFill()
public Stroke getStroke()
IPointPainterConfigurableUI
getStroke
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
IPointPainterConfigurableUI.getStroke()
public int getTransparency()
IPointPainterConfigurableUI
This value will be computed from the color used. If that color is not
configured (null) a value of 0.0 is returned even if the color from the
used for painting has a different setting!
Graphics
getTransparency
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
IPointPainterConfigurableUI.getTransparency()
public int getTransparencyFill()
IPointPainterConfigurableUI
This value will be computed from the color used. If that color is not
configured (null) a value of 0.0 is returned even if the color from the
used for painting has a different setting!
Graphics
getTransparencyFill
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
IPointPainterConfigurableUI.getTransparencyFill()
public int hashCode()
hashCode
in class Object
Object.hashCode()
protected Color installColor(Graphics g)
g
- the graphics context to use.null
if
no action was taken.setColor(Color)
protected Color installColorFill(Graphics g)
g
- the graphics context to use.null
if
no action was taken.setColorFill(Color)
protected Stroke installStroke(Graphics g)
g
- the graphics context to use.null
if
no action was taken.setStroke(Stroke)
public Color setColor(Color color)
IPointPainterConfigurableUI
null
if no special color is
desired.
In the latter case the color of the
provided
for paint operations will be used.
Graphics
setColor
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
color
- the color to paint with or null
if no special color
is desired.null if no special color is
desired.
IPointPainterConfigurableUI.setColor(java.awt.Color)
public Color setColorFill(Color fillColor)
IPointPainterConfigurableUI
null
if no special
fill color is desired.
In the latter case the color of the
provided
for paint fill operations will be used.
Graphics
setColorFill
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
fillColor
- the color to paint fillings with or null
if no
special color is desired.null if no special color is
desired.
IPointPainterConfigurableUI.setColorFill(java.awt.Color)
public Stroke setStroke(Stroke stroke)
IPointPainterConfigurableUI
null
if no special color is
desired.
In the latter case the stroke of the
provided
for paint operations will be used.
Graphics
setStroke
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
stroke
- the stroke to paint with.null
if none was used
before.IPointPainterConfigurableUI.setStroke(java.awt.Stroke)
public int setTransparency(int transparency0to255)
IPointPainterConfigurableUI
This value will be fold into color. If color has not been configured before it will not have any effect.
Caution: When using a value greater 0 may cost a multiple cpu load!
setTransparency
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
transparency0to255
- a transparency value between 0 and 255.IPointPainterConfigurableUI.setTransparency(int)
public int setTransparencyFill(int transparency0to255)
IPointPainterConfigurableUI
This value will be fold into fill color. If fill color has not been configured before it will not have any effect.
Caution: When using a value greater 0 may cost a multiple cpu load!
setTransparencyFill
in interface IPointPainterConfigurableUI<T extends IPointPainterConfigurableUI<T>>
transparency0to255
- a transparency value between 0 and 255.IPointPainterConfigurableUI.setTransparencyFill(int)
public void startPaintIteration(Graphics g2d)
IPointPainter
ITrace2D
.
startPaintIteration
in interface IPointPainter<T extends IPointPainterConfigurableUI<T>>
g2d
- provided in case pending paint operations have to be performed.IPointPainter.startPaintIteration(java.awt.Graphics)
Copyright © 2017. All rights reserved.