Painter<T>public class CapsulePainter extends AbstractAreaPainter<Object>
| Modifier and Type | Class | Description |
|---|---|---|
static class |
CapsulePainter.Portion |
AbstractAreaPainter.StyleAbstractLayoutPainter.HorizontalAlignment, AbstractLayoutPainter.VerticalAlignmentAbstractPainter.Interpolation| Constructor | Description |
|---|---|
CapsulePainter() |
Create a new CapsulePainter that draws a full capsule.
|
CapsulePainter(CapsulePainter.Portion portion) |
Create a new CapsulePainter that only draws the portion specified.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doPaint(Graphics2D g,
Object component,
int width,
int height) |
Subclasses must implement this method and perform custom painting operations
here.
|
CapsulePainter.Portion |
getPortion() |
Returns the current portion property.
|
protected Shape |
provideShape(Graphics2D g,
Object comp,
int width,
int height) |
Returns the outline shape of this painter.
|
void |
setPortion(CapsulePainter.Portion portion) |
Sets the current portion property.
|
getAreaEffects, getBorderPaint, getBorderWidth, getFillPaint, getStyle, isPaintStretched, setAreaEffects, setBorderPaint, setBorderWidth, setFillPaint, setPaintStretched, setStyleaddPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenercalculateLayout, getHorizontalAlignment, getInsets, getVerticalAlignment, isFillHorizontal, isFillVertical, setFillHorizontal, setFillVertical, setHorizontalAlignment, setInsets, setVerticalAlignmentclearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validatepublic CapsulePainter()
public CapsulePainter(CapsulePainter.Portion portion)
portion - the portion to drawpublic CapsulePainter.Portion getPortion()
public void setPortion(CapsulePainter.Portion portion)
portion - the new portionprotected void doPaint(Graphics2D g, Object component, int width, int height)
doPaint in class AbstractPainter<Object>g - The Graphics2D object in which to paintprotected Shape provideShape(Graphics2D g, Object comp, int width, int height)
provideShape in class AbstractAreaPainter<Object>g - graphicscomp - The Object this painter will be painted on.width - the width to paintheight - the height to paintCopyright © 2018. All rights reserved.