|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.beans.AbstractBean
org.jdesktop.swingx.painter.AbstractPainter<T>
org.jdesktop.swingx.painter.AbstractLayoutPainter<T>
org.jdesktop.swingx.painter.AbstractAreaPainter<T>
org.jdesktop.swingx.painter.RectanglePainter<T>
public class RectanglePainter<T>
A painter which paints square and rounded rectangles
Nested Class Summary |
---|
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 | |
---|---|
RectanglePainter()
Creates a new instance of RectanglePainter |
|
RectanglePainter(Color fillPaint,
Color borderPaint)
|
|
RectanglePainter(Insets insets,
int width,
int height,
int roundWidth,
int roundHeight,
boolean rounded,
Paint fillPaint,
float strokeWidth,
Paint borderPaint)
|
|
RectanglePainter(int top,
int left,
int bottom,
int right)
|
|
RectanglePainter(int top,
int left,
int bottom,
int right,
int roundWidth,
int roundHeight)
|
|
RectanglePainter(int top,
int left,
int bottom,
int right,
int roundWidth,
int roundHeight,
boolean rounded,
Paint fillPaint,
float strokeWidth,
Paint borderPaint)
|
|
RectanglePainter(int width,
int height,
int cornerRadius,
Paint fillPaint)
|
|
RectanglePainter(Paint fillPaint,
Paint borderPaint,
float borderWidth,
AbstractAreaPainter.Style style)
|
Method Summary | |
---|---|
protected RectangularShape |
calculateShape(int width,
int height)
|
protected void |
doPaint(Graphics2D g,
T component,
int width,
int height)
Subclasses must implement this method and perform custom painting operations here. |
int |
getRoundHeight()
gets the round height of the rectangle |
int |
getRoundWidth()
gets the round width of the rectangle |
boolean |
isRounded()
Indicates if the rectangle is rounded |
Shape |
provideShape(Graphics2D g,
T comp,
int width,
int height)
Returns the outline shape of this painter. |
void |
setRounded(boolean rounded)
sets if the rectangle should be rounded |
void |
setRoundHeight(int roundHeight)
sets the round height of the rectangle |
void |
setRoundWidth(int roundWidth)
sets the round width of the rectangle |
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 |
---|
calculateLayout, getHorizontalAlignment, getInsets, getVerticalAlignment, isFillHorizontal, isFillVertical, setFillHorizontal, setFillVertical, setHorizontalAlignment, setInsets, setVerticalAlignment |
Methods inherited from class org.jdesktop.swingx.painter.AbstractPainter |
---|
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RectanglePainter()
public RectanglePainter(Color fillPaint, Color borderPaint)
public RectanglePainter(Paint fillPaint, Paint borderPaint, float borderWidth, AbstractAreaPainter.Style style)
public RectanglePainter(int top, int left, int bottom, int right)
public RectanglePainter(int top, int left, int bottom, int right, int roundWidth, int roundHeight)
public RectanglePainter(int width, int height, int cornerRadius, Paint fillPaint)
public RectanglePainter(Insets insets, int width, int height, int roundWidth, int roundHeight, boolean rounded, Paint fillPaint, float strokeWidth, Paint borderPaint)
public RectanglePainter(int top, int left, int bottom, int right, int roundWidth, int roundHeight, boolean rounded, Paint fillPaint, float strokeWidth, Paint borderPaint)
Method Detail |
---|
public boolean isRounded()
public void setRounded(boolean rounded)
rounded
- if the rectangle should be roundedpublic int getRoundWidth()
public void setRoundWidth(int roundWidth)
roundWidth
- a new round widthpublic int getRoundHeight()
public void setRoundHeight(int roundHeight)
roundHeight
- a new round heightprotected RectangularShape calculateShape(int width, int height)
protected void doPaint(Graphics2D g, T component, int width, int height)
AbstractPainter
doPaint
in class AbstractPainter<T>
g
- The Graphics2D object in which to paintpublic Shape provideShape(Graphics2D g, T comp, int width, int height)
AbstractAreaPainter
provideShape
in class AbstractAreaPainter<T>
g
- graphicscomp
- The Object this painter will be painted on.width
- the width to paintheight
- the height to paint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |