Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance.painter.highlight
Class ClassicHighlightPainter

    java.lang.Object
      org.jvnet.substance.painter.highlight.ClassicHighlightPainter

All Implemented Interfaces:
  SubstanceTrait, SubstanceHighlightPainter

    public class ClassicHighlightPainter

extends java.lang.Object
implements SubstanceHighlightPainter

Highlight painter that paints a classic gradient. This class is part of officially supported API.

Since:
  version 4.3
Author:
  Kirill Grouchnikov

Field Summary
`static java.lang.String` | `DISPLAY_NAME` The display name for the highlight painters of this class.
`protected ClassicGradientPainter` | `painter` Single gradient painter instance.
`protected static LazyResettableHashMap<java.awt.image.BufferedImage>` | `smallImageCache` Cache for small objects.

Constructor Summary
`ClassicHighlightPainter()` Creates new classic title painter.

Method Summary
`java.lang.String` | `getDisplayName()` Returns the display name of `this` trait.
`static java.lang.String` | `getMemoryUsage()` Returns the memory usage string.
`protected void` | `internalPaint(java.awt.Graphics2D graphics, java.awt.Component comp, int width, int height, SubstanceColorScheme colorScheme1, SubstanceColorScheme colorScheme2, float cyclePos, SubstanceBorderPainter borderPainter, float borderAlpha, java.util.Set<SubstanceConstants.Side> openSides)`
Paints the highlight.
`void` | `paintHighlight(java.awt.Graphics2D graphics, java.awt.Component comp, int width, int height, float borderAlpha, java.util.Set<SubstanceConstants.Side> openSides, SubstanceColorScheme colorScheme1, SubstanceColorScheme colorScheme2, float cyclePos)`
Paints the highlight.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DISPLAY_NAME

    public static final java.lang.String DISPLAY_NAME

  The display name for the highlight painters of this class.

  See Also:
    Constant Field Values

### smallImageCache

    protected static LazyResettableHashMap<java.awt.image.BufferedImage> smallImageCache

  Cache for small objects.

### painter

    protected ClassicGradientPainter painter

  Single gradient painter instance.

Constructor Detail

### ClassicHighlightPainter

    public ClassicHighlightPainter()

  Creates new classic title painter.

Method Detail

### getDisplayName

    public java.lang.String getDisplayName()

  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.

### paintHighlight

    public void paintHighlight(java.awt.Graphics2D graphics,
                               java.awt.Component comp,
                               int width,
                               int height,
                               float borderAlpha,
                               java.util.Set<SubstanceConstants.Side> openSides,
                               SubstanceColorScheme colorScheme1,
                               SubstanceColorScheme colorScheme2,
                               float cyclePos)

  Description copied from interface: `SubstanceHighlightPainter`
  Paints the highlight.

  Specified by:
    `paintHighlight` in interface `SubstanceHighlightPainter`
  Parameters:
    `graphics` - Graphics context.
    `comp` - Component.
    `width` - Width.
    `height` - Height.
    `borderAlpha` - Border alpha factor.
    `openSides` - The sides specified in this set will not be painted. Can be `null` or empty.
    `colorScheme1` - The first color scheme.
    `colorScheme2` - The second color scheme.
    `cyclePos` - Cycle position. Is used for rollover and selection animations. Must be in 0..10 range.

### internalPaint

    protected void internalPaint(java.awt.Graphics2D graphics,
                                 java.awt.Component comp,
                                 int width,
                                 int height,
                                 SubstanceColorScheme colorScheme1,
                                 SubstanceColorScheme colorScheme2,
                                 float cyclePos,
                                 SubstanceBorderPainter borderPainter,
                                 float borderAlpha,
                                 java.util.Set<SubstanceConstants.Side> openSides)

  Paints the highlight.

  Parameters:
    `graphics` - Graphics context.
    `comp` - Component.
    `width` - Width.
    `height` - Height.
    `borderPainter` - Border painter.
    `borderAlpha` - Border alpha factor.
    `openSides` - The sides specified in this set will not be painted. Can be `null` or empty.
    `colorScheme1` - The first color scheme.
    `colorScheme2` - The second color scheme.
    `cyclePos` - Cycle position. Is used for rollover and selection animations. Must be in 0..10 range.

### getMemoryUsage

    public static java.lang.String getMemoryUsage()

  Returns the memory usage string.

  Returns:
    Memory usage string.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD