org.apache.pivot.wtk
Interface Spinner.ItemRenderer

All Superinterfaces:
ConstrainedVisual, Renderer, Visual
All Known Implementing Classes:
SpinnerItemRenderer, TerraCalendarSkin.MonthSpinnerItemRenderer
Enclosing class:
Spinner

public static interface Spinner.ItemRenderer
extends Renderer

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


Method Summary
 void render(Object item, Spinner spinner)
          Prepares the renderer for layout or paint.
 String toString(Object item)
          Converts a spinner item 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 item,
            Spinner spinner)
Prepares the renderer for layout or paint.

Parameters:
item - The item to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
spinner - The host component.

toString

String toString(Object item)
Converts a spinner item to a string representation.

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

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