|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.substance.border.InnerDelegateBorderPainter
public abstract class InnerDelegateBorderPainter
Abstract base class for painters that provide inner painting. The implementation is based on three main parts:
| Field Summary | |
|---|---|
protected SubstanceBorderPainter |
delegate
Mandatory delegate painter. |
protected java.lang.String |
painterName
Display name of this painter. |
protected float |
shiftCoef
Shift coefficient. |
protected SubstanceConstants.ColorShiftKind |
shiftKind
Color shift kind. |
protected static java.util.Map<java.lang.String,ColorScheme> |
shiftMap
Map of shifted color schemes (to speed up the subsequent lookups). |
| Constructor Summary | |
|---|---|
InnerDelegateBorderPainter(java.lang.String painterName,
SubstanceBorderPainter delegate)
Creates an inner painter. |
|
InnerDelegateBorderPainter(java.lang.String painterName,
SubstanceBorderPainter delegate,
float shiftCoef,
SubstanceConstants.ColorShiftKind shiftKind)
Creates an inner painter. |
|
| Method Summary | |
|---|---|
SubstanceBorderPainter |
getDelegate()
Returns the painting delegate. |
java.lang.String |
getDisplayName()
Returns the display name of this trait. |
void |
paintBorder(java.awt.Graphics g,
java.awt.Component comp,
int width,
int height,
java.awt.Shape contour,
java.awt.Shape innerContour,
ColorScheme colorScheme1,
ColorScheme colorScheme2,
float cyclePos,
boolean useCyclePosAsInterpolation)
Paints the control border. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String painterName
this painter.
protected SubstanceBorderPainter delegate
protected float shiftCoef
protected SubstanceConstants.ColorShiftKind shiftKind
protected static java.util.Map<java.lang.String,ColorScheme> shiftMap
| Constructor Detail |
|---|
public InnerDelegateBorderPainter(java.lang.String painterName,
SubstanceBorderPainter delegate)
painterName - Painter display name.delegate - Delegate painter.
public InnerDelegateBorderPainter(java.lang.String painterName,
SubstanceBorderPainter delegate,
float shiftCoef,
SubstanceConstants.ColorShiftKind shiftKind)
painterName - Painter display name.delegate - Delegate painter.shiftCoef - Shift coefficient. Must be in 0.0-1.0 range.shiftKind - Color shift kind.| Method Detail |
|---|
public java.lang.String getDisplayName()
SubstanceTraitthis trait. This method is
part of officially supported API.
getDisplayName in interface SubstanceTraitthis trait.
public void paintBorder(java.awt.Graphics g,
java.awt.Component comp,
int width,
int height,
java.awt.Shape contour,
java.awt.Shape innerContour,
ColorScheme colorScheme1,
ColorScheme colorScheme2,
float cyclePos,
boolean useCyclePosAsInterpolation)
SubstanceBorderPainter
paintBorder in interface SubstanceBorderPainterg - Graphics.comp - Component.width - Width of a UI component.height - Height of a UI component.contour - Contour of a UI component.innerContour - Inner contour of a UI component. May be ignored if the
specific implementation paints only the outside border.colorScheme1 - The first color scheme.colorScheme2 - The second color scheme.cyclePos - Cycle position. Is used for rollover and pulsation effects.
Must be in 0..10 range.useCyclePosAsInterpolation - Indicates the algorithm to use for computing various colors.
If true, the cyclePos is used
to interpolate colors between different color components of
both color schemes. If false, the
cyclePos is used to interpolate colors between
different color components of the first color scheme.public SubstanceBorderPainter getDelegate()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||