public abstract class AbstractAreaPainter<T> extends AbstractLayoutPainter<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractAreaPainter.Style
Different available fill styles.
|
AbstractLayoutPainter.HorizontalAlignment, AbstractLayoutPainter.VerticalAlignmentAbstractPainter.Interpolation| Constructor and Description |
|---|
AbstractAreaPainter()
Creates a new instance of AbstractAreaPainter
|
AbstractAreaPainter(Paint paint)
Creates a new instance of AbstractAreaPainter
|
| Modifier and Type | Method and Description |
|---|---|
AreaEffect[] |
getAreaEffects()
Gets the current set of path effects applied to this painter.
|
Paint |
getBorderPaint()
Gets the current Paint to use for stroking the shape (painting the outline).
|
float |
getBorderWidth()
Gets the current border width.
|
Paint |
getFillPaint()
Gets the current fill paint.
|
AbstractAreaPainter.Style |
getStyle()
Gets the current Style.
|
boolean |
isPaintStretched()
Indicates if the paint will be snapped.
|
protected abstract Shape |
provideShape(Graphics2D g,
T comp,
int width,
int height)
Returns the outline shape of this painter.
|
void |
setAreaEffects(AreaEffect... areaEffects)
Sets the path effects to be drawn on this painter.
|
void |
setBorderPaint(Paint p)
The Paint to use for stroking the shape (painting the outline).
|
void |
setBorderWidth(float s)
Sets the border width to use for painting.
|
void |
setFillPaint(Paint p)
Sets the Paint to use.
|
void |
setPaintStretched(boolean paintStretched)
Specifies whether this Painter should attempt to resize the Paint to fit the area being painted.
|
void |
setStyle(AbstractAreaPainter.Style s)
The shape can be filled or simply stroked (outlined), or both or none.
|
calculateLayout, getHorizontalAlignment, getInsets, getVerticalAlignment, isFillHorizontal, isFillVertical, setFillHorizontal, setFillVertical, setHorizontalAlignment, setInsets, setVerticalAlignmentclearCache, configureGraphics, doPaint, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validateaddPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerpublic AbstractAreaPainter()
public AbstractAreaPainter(Paint paint)
paint - the default paint to fill this area painter withpublic Paint getFillPaint()
public void setFillPaint(Paint p)
p - the Paint to usepublic boolean isPaintStretched()
public void setPaintStretched(boolean paintStretched)
paintStretched - true if the paint should be stretched, false otherwise.public void setBorderPaint(Paint p)
p - the Paint to use for stroking the shape. May be null.public Paint getBorderPaint()
public void setStyle(AbstractAreaPainter.Style s)
s - the Style to use. If null, Style.BOTH is usedpublic AbstractAreaPainter.Style getStyle()
public void setBorderWidth(float s)
s - the Stroke to fillPaint withpublic float getBorderWidth()
protected abstract Shape provideShape(Graphics2D g, T comp, int width, int height)
g - graphicscomp - The Object this painter will be painted on.width - the width to paintheight - the height to paintpublic void setAreaEffects(AreaEffect... areaEffects)
areaEffects - the effects to apply to this painterpublic AreaEffect[] getAreaEffects()
Copyright © 2017. All Rights Reserved.