Package org.apache.pivot.wtk.content
Class ListViewColorItemRenderer.ColorBadge
- java.lang.Object
-
- org.apache.pivot.wtk.media.Image
-
- org.apache.pivot.wtk.content.ListViewColorItemRenderer.ColorBadge
-
- All Implemented Interfaces:
Visual
- Enclosing class:
- ListViewColorItemRenderer
public static class ListViewColorItemRenderer.ColorBadge extends Image
Internal image class for rendering color swatches.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.media.Image
Image.LoadTask
-
-
Field Summary
Fields Modifier and Type Field Description static int
SIZE
-
Fields inherited from class org.apache.pivot.wtk.media.Image
imageListeners
-
-
Constructor Summary
Constructors Constructor Description ColorBadge()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBaseline()
Returns the visual's baseline.java.awt.Color
getColor()
int
getHeight()
Returns the visual's height.int
getWidth()
Returns the visual's width.void
paint(java.awt.Graphics2D graphics)
Paints the visual.void
setColor(java.awt.Color color)
-
Methods inherited from class org.apache.pivot.wtk.media.Image
getImageListeners, load, load, loadFromCache, toString, update
-
-
-
-
Field Detail
-
SIZE
public static final int SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWidth
public int getWidth()
Description copied from interface:Visual
Returns the visual's width.- Returns:
- Current width of this visual.
-
getHeight
public int getHeight()
Description copied from interface:Visual
Returns the visual's height.- Returns:
- Current height of this visual.
-
getBaseline
public int getBaseline()
Description copied from interface:Visual
Returns the visual's baseline.- Specified by:
getBaseline
in interfaceVisual
- Overrides:
getBaseline
in classImage
- Returns:
- The baseline relative to the origin of the visual, or
-1
if this visual does not have a baseline.
-
getColor
public java.awt.Color getColor()
-
setColor
public void setColor(java.awt.Color color)
-
paint
public void paint(java.awt.Graphics2D graphics)
Description copied from interface:Visual
Paints the visual.- Parameters:
graphics
- The graphics context in which to paint the visual.
-
-