org.jvnet.substance.painter.border
Class InnerDelegateBorderPainter

java.lang.Object
  extended by org.jvnet.substance.painter.border.InnerDelegateBorderPainter
All Implemented Interfaces:
SubstanceTrait, SubstanceBorderPainter
Direct Known Subclasses:
ClassicInnerBorderPainter, FlatInnerBorderPainter, GlassInnerBorderPainter

Deprecated. Will be removed in version 6.0. Use CompositeBorderPainter and DelegateBorderPainter instead.

@Deprecated
public abstract class InnerDelegateBorderPainter
extends java.lang.Object
implements SubstanceBorderPainter

Abstract base class for painters that provide inner painting. The implementation is based on three main parts:

Author:
Kirill Grouchnikov

Field Summary
protected  SubstanceBorderPainter delegate
          Deprecated. Mandatory delegate painter.
protected  java.lang.String painterName
          Deprecated. Display name of this painter.
protected  float shiftCoef
          Deprecated. Shift coefficient.
protected  SubstanceConstants.ColorShiftKind shiftKind
          Deprecated. Color shift kind.
protected static LazyResettableHashMap<SubstanceColorScheme> shiftMap
          Deprecated. Map of shifted color schemes (to speed up the subsequent lookups).
 
Constructor Summary
InnerDelegateBorderPainter(java.lang.String painterName, SubstanceBorderPainter delegate)
          Deprecated. Creates an inner painter.
InnerDelegateBorderPainter(java.lang.String painterName, SubstanceBorderPainter delegate, float shiftCoef, SubstanceConstants.ColorShiftKind shiftKind)
          Deprecated. Creates an inner painter.
 
Method Summary
 SubstanceBorderPainter getDelegate()
          Deprecated. Returns the painting delegate.
 java.lang.String getDisplayName()
          Deprecated. Returns the display name of this trait.
 SubstanceColorScheme getShiftScheme(SubstanceColorScheme orig)
          Deprecated. Retrieves a shifted color scheme.
 boolean isPaintingInnerContour()
          Deprecated. Returns boolean indication whether this border painter is painting the inner contours.
 void paintBorder(java.awt.Graphics g, java.awt.Component comp, int width, int height, java.awt.Shape contour, java.awt.Shape innerContour, SubstanceColorScheme colorScheme1, SubstanceColorScheme colorScheme2, float cyclePos, boolean useCyclePosAsInterpolation)
          Deprecated. Paints the control border.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

painterName

protected java.lang.String painterName
Deprecated. 
Display name of this painter.


delegate

protected SubstanceBorderPainter delegate
Deprecated. 
Mandatory delegate painter.


shiftCoef

protected float shiftCoef
Deprecated. 
Shift coefficient. Must be in 0.0-1.0 range.


shiftKind

protected SubstanceConstants.ColorShiftKind shiftKind
Deprecated. 
Color shift kind.


shiftMap

protected static LazyResettableHashMap<SubstanceColorScheme> shiftMap
Deprecated. 
Map of shifted color schemes (to speed up the subsequent lookups).

Constructor Detail

InnerDelegateBorderPainter

public InnerDelegateBorderPainter(java.lang.String painterName,
                                  SubstanceBorderPainter delegate)
Deprecated. 
Creates an inner painter.

Parameters:
painterName - Painter display name.
delegate - Delegate painter.

InnerDelegateBorderPainter

public InnerDelegateBorderPainter(java.lang.String painterName,
                                  SubstanceBorderPainter delegate,
                                  float shiftCoef,
                                  SubstanceConstants.ColorShiftKind shiftKind)
Deprecated. 
Creates an inner painter.

Parameters:
painterName - Painter display name.
delegate - Delegate painter.
shiftCoef - Shift coefficient. Must be in 0.0-1.0 range.
shiftKind - Color shift kind.
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Deprecated. 
Description copied from interface: SubstanceTrait
Returns the display name of this trait. This method is part of officially supported API.

Specified by:
getDisplayName in interface SubstanceTrait
Returns:
The display name of this trait.

paintBorder

public void paintBorder(java.awt.Graphics g,
                        java.awt.Component comp,
                        int width,
                        int height,
                        java.awt.Shape contour,
                        java.awt.Shape innerContour,
                        SubstanceColorScheme colorScheme1,
                        SubstanceColorScheme colorScheme2,
                        float cyclePos,
                        boolean useCyclePosAsInterpolation)
Deprecated. 
Description copied from interface: SubstanceBorderPainter
Paints the control border.

Specified by:
paintBorder in interface SubstanceBorderPainter
Parameters:
g - 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..1 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.

getShiftScheme

public SubstanceColorScheme getShiftScheme(SubstanceColorScheme orig)
Deprecated. 
Retrieves a shifted color scheme.

Parameters:
orig - Original color scheme.
Returns:
Shifted color scheme.

getDelegate

public SubstanceBorderPainter getDelegate()
Deprecated. 
Returns the painting delegate.

Returns:
Painting delegate.

isPaintingInnerContour

public boolean isPaintingInnerContour()
Deprecated. 
Description copied from interface: SubstanceBorderPainter
Returns boolean indication whether this border painter is painting the inner contours.

Specified by:
isPaintingInnerContour in interface SubstanceBorderPainter
Returns:
true if this border painter is painting the inner contours, false otherwise.