|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.substance.SubstanceFillBackgroundDelegate
public class SubstanceFillBackgroundDelegate
Delegate for painting filled backgrounds.
Constructor Summary | |
---|---|
SubstanceFillBackgroundDelegate()
Creates a new opaque fill background delegate. |
|
SubstanceFillBackgroundDelegate(float alphaComposite)
Creates a new translucent fill background delegate. |
Method Summary | |
---|---|
void |
fillAndWatermark(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Color fillColor,
java.awt.Rectangle rect)
Updates the background of the specified component on the specified graphic context in the specified rectangle. |
void |
setAlphaComposite(float alphaComposite)
Sets the alpha (translucency) attribute for this delegate. |
void |
update(java.awt.Graphics g,
java.awt.Component c)
Updates the background of the specified component on the specified graphic context. |
void |
update(java.awt.Graphics g,
java.awt.Component c,
boolean useHeaderPainter)
Updates the background of the specified component on the specified graphic context. |
void |
updateIfOpaque(java.awt.Graphics g,
java.awt.Component c)
Updates the background of the specified component on the specified graphic context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubstanceFillBackgroundDelegate()
public SubstanceFillBackgroundDelegate(float alphaComposite)
alphaComposite
- Alpha composite of this
delegate. The default
value is 1.0 which results in completely opaque background.
However, in some cases, we need to draw partially translucent
background, as in menus.Method Detail |
---|
public void update(java.awt.Graphics g, java.awt.Component c)
g
- Graphic context.c
- Component.public void updateIfOpaque(java.awt.Graphics g, java.awt.Component c)
g
- Graphic context.c
- Component.public void update(java.awt.Graphics g, java.awt.Component c, boolean useHeaderPainter)
g
- Graphic context.c
- Component.useHeaderPainter
- If true
, the currently installed title painter
will be used. The SubstanceHeaderPainter
that has been
added in version 3.3 handles background paintings on controls
in menu bars and tool bars (the latter depends on the value of
SubstanceHeaderPainter.isPaintingContainer(Container)
.public void fillAndWatermark(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Color fillColor, java.awt.Rectangle rect)
g
- Graphic context.c
- Component.fillColor
- Fill color.rect
- The rectangle to fill.public void setAlphaComposite(float alphaComposite)
alphaComposite
- Alpha (translucency) attribute for this delegate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |