|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.painter.AbstractPainter<E> com.alee.extended.painter.BorderPainter<E>
E
- component typepublic class BorderPainter<E extends javax.swing.JComponent>
Simple border painter. This painter might be used instead of LineBorder in any component that supports painters.
AbstractPainter
,
Painter
Field Summary | |
---|---|
protected java.awt.Color |
color
Border color. |
protected int |
round
Border round. |
protected java.awt.Stroke |
stroke
Border stroke. |
protected int |
width
Border width. |
Fields inherited from class com.alee.extended.painter.AbstractPainter |
---|
listeners, margin, opaque, preferredSize |
Constructor Summary | |
---|---|
BorderPainter()
Constructs default border painter. |
|
BorderPainter(java.awt.Color color)
Constructs border painter with a specified color. |
|
BorderPainter(int width)
Constructs border painter with a specified width. |
|
BorderPainter(int width,
java.awt.Color color)
Constructs border painter with a specified width and color. |
Method Summary | |
---|---|
protected java.awt.geom.RectangularShape |
getBorderShape(java.awt.Rectangle bounds)
Returns border shape for the specified limiting bounds. |
java.awt.Color |
getColor()
Returns border color. |
java.awt.Insets |
getMargin(E c)
Returns margin required for visual data provided by this painter. |
java.awt.Dimension |
getPreferredSize(E c)
Returns preferred size required for proper painting of visual data provided by this painter. |
int |
getRound()
Returns border round. |
java.awt.Stroke |
getStroke()
Returns border stroke. |
int |
getWidth()
Returns border width. |
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c)
Paints visual data onto the component graphics. |
void |
setColor(java.awt.Color color)
Sets border color. |
void |
setRound(int round)
Sets border round. |
void |
setStroke(java.awt.Stroke stroke)
Sets border stroke. |
void |
setWidth(int width)
Sets border width. |
protected void |
updateStroke()
Updates border stroke depending on painter settings. |
Methods inherited from class com.alee.extended.painter.AbstractPainter |
---|
addPainterListener, install, isOpaque, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int width
protected int round
protected java.awt.Color color
protected java.awt.Stroke stroke
Constructor Detail |
---|
public BorderPainter()
public BorderPainter(int width)
width
- border widthpublic BorderPainter(java.awt.Color color)
color
- border colorpublic BorderPainter(int width, java.awt.Color color)
width
- border widthcolor
- border colorMethod Detail |
---|
public int getWidth()
public void setWidth(int width)
width
- new border widthpublic int getRound()
public void setRound(int round)
round
- new border roundpublic java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- new border colorpublic java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
stroke
- new border strokesetWidth(int)
,
setRound(int)
protected void updateStroke()
public java.awt.Dimension getPreferredSize(E c)
getPreferredSize
in interface Painter<E extends javax.swing.JComponent>
getPreferredSize
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to process
public java.awt.Insets getMargin(E c)
getMargin
in interface Painter<E extends javax.swing.JComponent>
getMargin
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to process
public void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c)
g2d
- component graphicsbounds
- bounds for painter visual datac
- component to processprotected java.awt.geom.RectangularShape getBorderShape(java.awt.Rectangle bounds)
bounds
- limiting bounds
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |