org.jdesktop.swingx.painter
Class CapsulePainter

java.lang.Object
  extended by org.jdesktop.beans.AbstractBean
      extended by org.jdesktop.swingx.painter.AbstractPainter<T>
          extended by org.jdesktop.swingx.painter.AbstractLayoutPainter<T>
              extended by org.jdesktop.swingx.painter.AbstractAreaPainter<java.lang.Object>
                  extended by org.jdesktop.swingx.painter.CapsulePainter
All Implemented Interfaces:
Painter<java.lang.Object>

public class CapsulePainter
extends AbstractAreaPainter<java.lang.Object>

Draws a capsule. This is a rectangle capped by two semi circles. You can draw only a portion of a capsule using the portion property.

Author:
joshy

Nested Class Summary
static class CapsulePainter.Portion
           
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractAreaPainter
AbstractAreaPainter.Style
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractLayoutPainter
AbstractLayoutPainter.HorizontalAlignment, AbstractLayoutPainter.VerticalAlignment
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractPainter
AbstractPainter.Interpolation
 
Constructor Summary
CapsulePainter()
          Create a new CapsulePainter that draws a full capsule.
CapsulePainter(CapsulePainter.Portion portion)
          Create a new CapsulePainter that only draws the portion specified.
 
Method Summary
 CapsulePainter.Portion getPortion()
          Returns the current portion property.
 void setPortion(CapsulePainter.Portion portion)
          Sets the current portion property.
 
Methods inherited from class org.jdesktop.swingx.painter.AbstractAreaPainter
getAreaEffects, getBorderPaint, getBorderWidth, getFillPaint, getStyle, isPaintStretched, setAreaEffects, setBorderPaint, setBorderWidth, setFillPaint, setPaintStretched, setStyle
 
Methods inherited from class org.jdesktop.swingx.painter.AbstractLayoutPainter
getHorizontalAlignment, getInsets, getVerticalAlignment, isFillHorizontal, isFillVertical, setFillHorizontal, setFillVertical, setHorizontalAlignment, setInsets, setVerticalAlignment
 
Methods inherited from class org.jdesktop.swingx.painter.AbstractPainter
clearCache, getFilters, getInterpolation, isAntialiasing, isCacheable, isVisible, paint, setAntialiasing, setCacheable, setFilters, setInterpolation, setVisible
 
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapsulePainter

public CapsulePainter()
Create a new CapsulePainter that draws a full capsule.


CapsulePainter

public CapsulePainter(CapsulePainter.Portion portion)
Create a new CapsulePainter that only draws the portion specified.

Parameters:
portion - the portion to draw
Method Detail

getPortion

public CapsulePainter.Portion getPortion()
Returns the current portion property. This property determines which part of the capsule will be drawn.

Returns:
the current portion

setPortion

public void setPortion(CapsulePainter.Portion portion)
Sets the current portion property. This property determines which part of the capsule will be drawn.

Parameters:
portion - the new portion