|
||||||||||
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.managers.style.skin.web.WebDecorationPainter<E>
public class WebDecorationPainter<E extends javax.swing.JComponent>
Web-style background painter for any component. Commonly used as a base class for various Swing components like JPanel, JButton and others.
Field Summary | |
---|---|
protected boolean |
actualPaintLeft
|
protected boolean |
actualPaintRight
|
protected static java.lang.String |
BACKGROUND_SHAPE
|
protected static java.lang.String |
BORDER_SHAPE
Shape cache keys. |
protected java.awt.Color |
borderColor
|
protected java.awt.Stroke |
borderStroke
|
protected java.awt.Color |
disabledBorderColor
|
protected boolean |
focused
|
protected FocusTracker |
focusTracker
Runtime variables. |
protected int |
h
|
protected boolean |
ltr
Painting variables. |
protected boolean |
paintBackground
|
protected boolean |
paintBottom
|
protected boolean |
paintBottomLine
|
protected boolean |
paintFocus
|
protected boolean |
paintLeft
|
protected boolean |
paintLeftLine
|
protected boolean |
paintRight
|
protected boolean |
paintRightLine
|
protected boolean |
paintTop
|
protected boolean |
paintTopLine
|
protected int |
round
|
protected float |
shadeTransparency
|
protected int |
shadeWidth
|
protected boolean |
undecorated
Style settings. |
protected int |
w
|
protected boolean |
webColoredBackground
|
Fields inherited from class com.alee.extended.painter.AbstractPainter |
---|
listeners, margin, opaque, preferredSize |
Constructor Summary | |
---|---|
WebDecorationPainter()
|
Method Summary | |
---|---|
protected java.awt.Shape |
createShape(E c,
boolean background)
Returns decoration border shape. |
java.awt.Color |
getBorderColor()
Returns decoration border color. |
java.awt.Stroke |
getBorderStroke()
Returns decoration border stroke. |
protected java.lang.Object[] |
getCachedShapeSettings(E c)
Returns an array of shape settings cached along with the shape. |
java.awt.Color |
getDisabledBorderColor()
Returns decoration disabled border color. |
java.awt.Insets |
getMargin(E scrollbar)
Returns margin required for visual data provided by this painter. |
int |
getRound()
Returns decoration corners rounding. |
float |
getShadeTransparency()
Returns decoration shade transparency. |
int |
getShadeWidth()
Returns decoration shade width. |
protected java.awt.Shape |
getShape(E c,
boolean background)
Returns decoration border shape. |
void |
install(E c)
Called when painter is intalled into some component. |
java.lang.Boolean |
isOpaque(E c)
Returns whether visual data provided by this painter is opaque or not. |
boolean |
isPaintBackground()
Returns whether should paint decoration background or not. |
boolean |
isPaintBottom()
Returns whether should paint bottom side or not. |
boolean |
isPaintBottomLine()
Returns whether should paint bottom side line or not. |
boolean |
isPaintFocus()
Returns whether focus should be painted or not. |
boolean |
isPaintLeft()
Returns whether should paint left side or not. |
boolean |
isPaintLeftLine()
Returns whether should paint left side line or not. |
boolean |
isPaintRight()
Returns whether should paint right side or not. |
boolean |
isPaintRightLine()
Returns whether should paint right side line or not. |
boolean |
isPaintTop()
Returns whether should paint top side or not. |
boolean |
isPaintTopLine()
Returns whether should paint top side line or not. |
boolean |
isUndecorated()
Returns whether decoration should be painted or not. |
boolean |
isWebColoredBackground()
Sets whether should paint web-styled background or not. |
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c)
Paints visual data onto the component graphics. |
protected void |
paintBackground(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
java.awt.Shape backgroundShape)
Paints decoration background. |
protected void |
paintBorder(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
java.awt.Shape borderShape)
Paints decoration border. |
protected void |
paintShade(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
java.awt.Shape borderShape)
Paints outer decoration shade. |
java.awt.Shape |
provideShape(E component,
java.awt.Rectangle bounds)
Returns painted component shape. |
void |
setBorderColor(java.awt.Color color)
Sets decoration border color. |
void |
setBorderStroke(java.awt.Stroke stroke)
Sets decoration border stroke. |
void |
setDisabledBorderColor(java.awt.Color color)
Sets decoration disabled border color. |
void |
setPaintBackground(boolean paint)
Sets whether should paint decoration background or not. |
void |
setPaintBottom(boolean bottom)
Sets whether should paint bottom side or not. |
void |
setPaintBottomLine(boolean bottom)
Sets whether should paint bottom side line or not. |
void |
setPaintFocus(boolean paint)
Sets whether focus should be painted or not. |
void |
setPaintLeft(boolean left)
Sets whether should paint left side or not. |
void |
setPaintLeftLine(boolean left)
Sets whether should paint left side line or not. |
void |
setPaintRight(boolean right)
Sets whether should paint right side or not. |
void |
setPaintRightLine(boolean right)
Sets whether should paint right side line or not. |
void |
setPaintSideLines(boolean top,
boolean left,
boolean bottom,
boolean right)
Sets whether should paint specific side lines or not. |
void |
setPaintSides(boolean top,
boolean left,
boolean bottom,
boolean right)
Sets whether should paint specific sides or not. |
void |
setPaintTop(boolean top)
Sets whether should paint top side or not. |
void |
setPaintTopLine(boolean top)
Sets whether should paint top side line or not. |
void |
setRound(int round)
Sets decoration corners rounding. |
void |
setShadeTransparency(float transparency)
Sets decoration shade transparency. |
void |
setShadeWidth(int width)
Sets decoration shade width. |
void |
setUndecorated(boolean undecorated)
Sets whether decoration should be painted or not. |
void |
setWebColoredBackground(boolean webColored)
Sets whether should paint web-styled background or not. |
void |
uninstall(E c)
Called when painter is intalled into some component. |
Methods inherited from class com.alee.extended.painter.AbstractPainter |
---|
addPainterListener, getPreferredSize, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, updateAll, updateOpacity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String BORDER_SHAPE
protected static final java.lang.String BACKGROUND_SHAPE
protected boolean undecorated
protected boolean paintFocus
protected int round
protected int shadeWidth
protected float shadeTransparency
protected java.awt.Stroke borderStroke
protected java.awt.Color borderColor
protected java.awt.Color disabledBorderColor
protected boolean paintBackground
protected boolean webColoredBackground
protected boolean paintTop
protected boolean paintLeft
protected boolean paintBottom
protected boolean paintRight
protected boolean paintTopLine
protected boolean paintLeftLine
protected boolean paintBottomLine
protected boolean paintRightLine
protected FocusTracker focusTracker
protected boolean focused
protected boolean ltr
protected boolean actualPaintLeft
protected boolean actualPaintRight
protected int w
protected int h
Constructor Detail |
---|
public WebDecorationPainter()
Method Detail |
---|
public void install(E c)
install
in interface Painter<E extends javax.swing.JComponent>
install
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to processpublic void uninstall(E c)
uninstall
in interface Painter<E extends javax.swing.JComponent>
uninstall
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to processpublic java.awt.Shape provideShape(E component, java.awt.Rectangle bounds)
provideShape
in interface PainterShapeProvider<E extends javax.swing.JComponent>
component
- component to processbounds
- bounds for painter visual data
public boolean isUndecorated()
public void setUndecorated(boolean undecorated)
undecorated
- whether decoration should be painted or notpublic boolean isPaintFocus()
public void setPaintFocus(boolean paint)
paint
- whether focus should be painted or notpublic int getRound()
public void setRound(int round)
round
- decoration corners roundingpublic int getShadeWidth()
public void setShadeWidth(int width)
width
- decoration shade widthpublic float getShadeTransparency()
public void setShadeTransparency(float transparency)
transparency
- new decoration shade transparencypublic java.awt.Stroke getBorderStroke()
public void setBorderStroke(java.awt.Stroke stroke)
stroke
- decoration border strokepublic java.awt.Color getBorderColor()
public void setBorderColor(java.awt.Color color)
color
- decoration border colorpublic java.awt.Color getDisabledBorderColor()
public void setDisabledBorderColor(java.awt.Color color)
color
- decoration disabled border colorpublic boolean isPaintBackground()
public void setPaintBackground(boolean paint)
paint
- whether should paint decoration background or notpublic boolean isWebColoredBackground()
public void setWebColoredBackground(boolean webColored)
webColored
- whether should paint web-styled background or notpublic boolean isPaintTop()
public void setPaintTop(boolean top)
setPaintTop
in interface PartialDecoration
top
- whether should paint top side or notpublic boolean isPaintLeft()
public void setPaintLeft(boolean left)
setPaintLeft
in interface PartialDecoration
left
- whether should paint left side or notpublic boolean isPaintBottom()
public void setPaintBottom(boolean bottom)
setPaintBottom
in interface PartialDecoration
bottom
- whether should paint bottom side or notpublic boolean isPaintRight()
public void setPaintRight(boolean right)
setPaintRight
in interface PartialDecoration
right
- whether should paint right side or notpublic void setPaintSides(boolean top, boolean left, boolean bottom, boolean right)
setPaintSides
in interface PartialDecoration
top
- whether should paint top side or notleft
- whether should paint left side or notbottom
- whether should paint bottom side or notright
- whether should paint right side or notpublic boolean isPaintTopLine()
public void setPaintTopLine(boolean top)
setPaintTopLine
in interface PartialDecoration
top
- whether should paint top side line or notpublic boolean isPaintLeftLine()
public void setPaintLeftLine(boolean left)
setPaintLeftLine
in interface PartialDecoration
left
- whether should paint left side line or notpublic boolean isPaintBottomLine()
public void setPaintBottomLine(boolean bottom)
setPaintBottomLine
in interface PartialDecoration
bottom
- whether should paint bottom side line or notpublic boolean isPaintRightLine()
public void setPaintRightLine(boolean right)
setPaintRightLine
in interface PartialDecoration
right
- whether should paint right side line or notpublic void setPaintSideLines(boolean top, boolean left, boolean bottom, boolean right)
setPaintSideLines
in interface PartialDecoration
top
- whether should paint top side line or notleft
- whether should paint left side line or notbottom
- whether should paint bottom side line or notright
- whether should paint right side line or notpublic java.lang.Boolean isOpaque(E c)
isOpaque
in interface Painter<E extends javax.swing.JComponent>
isOpaque
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to process
public java.awt.Insets getMargin(E scrollbar)
getMargin
in interface Painter<E extends javax.swing.JComponent>
getMargin
in class AbstractPainter<E extends javax.swing.JComponent>
scrollbar
- component to process
public void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c)
paint
in interface Painter<E extends javax.swing.JComponent>
g2d
- component graphicsbounds
- bounds for painter visual datac
- component to processprotected void paintShade(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c, java.awt.Shape borderShape)
g2d
- graphics contextbounds
- painting boundsc
- painted componentborderShape
- component border shapeprotected void paintBackground(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c, java.awt.Shape backgroundShape)
g2d
- graphics contextbounds
- painting boundsc
- painted componentbackgroundShape
- component background shapeprotected void paintBorder(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c, java.awt.Shape borderShape)
g2d
- graphics contextbounds
- painting boundsc
- painted componentborderShape
- component border shapeprotected java.awt.Shape getShape(E c, boolean background)
c
- painted componentbackground
- whether should return background shape or not
protected java.lang.Object[] getCachedShapeSettings(E c)
c
- painted component
protected java.awt.Shape createShape(E c, boolean background)
c
- painted componentbackground
- whether should return background shape or not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |