org.apache.pivot.wtk
Interface Button.DataRenderer

All Superinterfaces:
ConstrainedVisual, Renderer, Visual
All Known Implementing Classes:
AccordionHeaderDataRenderer, ButtonDataRenderer, CalendarButtonDataRenderer, LinkButtonDataRenderer, ListButtonColorItemRenderer, ListButtonDataRenderer, MenuBarItemDataRenderer, MenuButtonDataRenderer, MenuItemDataRenderer, TerraFileBrowserSkin.ListButtonDriveRenderer, TerraFileBrowserSkin.ListButtonFileRenderer
Enclosing class:
Button

public static interface Button.DataRenderer
extends Renderer

Renderer interface to customize the appearance of data in a Button.


Method Summary
 void render(Object data, Button button, boolean highlighted)
          Prepares the renderer for layout or paint.
 String toString(Object data)
          Converts button data to a string representation.
 
Methods inherited from interface org.apache.pivot.wtk.Renderer
getStyles
 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize
 
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getWidth, paint
 

Method Detail

render

void render(Object data,
            Button button,
            boolean highlighted)
Prepares the renderer for layout or paint.

Parameters:
data - The data to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
button - The host component.
highlighted - If true, the item is highlighted.

toString

String toString(Object data)
Converts button data to a string representation.

Parameters:
data -
Returns:
The data's string representation, or null if the data does not have a string representation.

Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.