public class DecorationPainterUtils
extends java.lang.Object
Constructor | Description |
---|---|
DecorationPainterUtils() |
Modifier and Type | Method | Description |
---|---|---|
static void |
clearDecorationType(javax.swing.JComponent comp) |
Clears the client properties related to the decoration area type.
|
static DecorationAreaType |
getDecorationType(java.awt.Component comp) |
Returns the decoration area type of the specified component.
|
static DecorationAreaType |
getImmediateDecorationType(java.awt.Component comp) |
Returns the immediate decoration area type of the specified component.
|
static void |
paintDecorationBackground(java.awt.Graphics g,
java.awt.Component c,
boolean force) |
Paints the decoration background on the specified component.
|
static void |
paintDecorationBackground(java.awt.Graphics g,
java.awt.Component c,
DecorationAreaType decorationType,
boolean force) |
Paints the decoration background on the specified component.
|
static void |
setDecorationType(javax.swing.JComponent comp,
DecorationAreaType type) |
Sets the decoration type of the specified component.
|
public static void setDecorationType(javax.swing.JComponent comp, DecorationAreaType type)
comp
- Component.type
- Decoration type of the component and its children.public static void clearDecorationType(javax.swing.JComponent comp)
comp
- Component.public static DecorationAreaType getDecorationType(java.awt.Component comp)
setDecorationType(JComponent, DecorationAreaType)
has been
called on the specified component, the matching decoration type is
returned. Otherwise, the component hierarchy is scanned to find the
closest ancestor that was passed to
setDecorationType(JComponent, DecorationAreaType)
- and its
decoration type is returned. If neither the component, nor any one of its
parent components has been passed to the setter method,
DecorationAreaType.NONE
is returned.comp
- Component.public static DecorationAreaType getImmediateDecorationType(java.awt.Component comp)
setDecorationType(javax.swing.JComponent, org.pushingpixels.substance.api.DecorationAreaType)
was
not called on this component, this method returns null
.comp
- Component.public static void paintDecorationBackground(java.awt.Graphics g, java.awt.Component c, boolean force)
force
parameter is false
and at least one of the following
conditions holds:
g
- Graphics context.c
- Component.force
- If true
, the painting of decoration background is
enforced.public static void paintDecorationBackground(java.awt.Graphics g, java.awt.Component c, DecorationAreaType decorationType, boolean force)
paintDecorationBackground(Graphics, Component, boolean)
for
the cases when the decoration background painting is skipped.g
- Graphics context.c
- Component.decorationType
- Decoration area type of the component.force
- If true
, the painting of decoration background is
enforced. #see
paintDecorationBackground(Graphics, Component, boolean)