public class CapsulePainter extends AbstractAreaPainter<java.lang.Object>
Modifier and Type | Class and Description |
---|---|
static class |
CapsulePainter.Portion |
AbstractAreaPainter.Style
AbstractLayoutPainter.HorizontalAlignment, AbstractLayoutPainter.VerticalAlignment
AbstractPainter.Interpolation
Constructor and 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 and Description |
---|---|
protected void |
doPaint(java.awt.Graphics2D g,
java.lang.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 java.awt.Shape |
provideShape(java.awt.Graphics2D g,
java.lang.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, setStyle
calculateLayout, getHorizontalAlignment, getInsets, getVerticalAlignment, isFillHorizontal, isFillVertical, setFillHorizontal, setFillVertical, setHorizontalAlignment, setInsets, setVerticalAlignment
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validate
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
public 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(java.awt.Graphics2D g, java.lang.Object component, int width, int height)
doPaint
in class AbstractPainter<java.lang.Object>
g
- The Graphics2D object in which to paintprotected java.awt.Shape provideShape(java.awt.Graphics2D g, java.lang.Object comp, int width, int height)
provideShape
in class AbstractAreaPainter<java.lang.Object>
g
- graphicscomp
- The Object this painter will be painted on.width
- the width to paintheight
- the height to paint