Package 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
render(java.lang.Object item, Spinner spinner)
Prepares the renderer for layout or paint.java.lang.String
toString(java.lang.Object item)
Converts a spinner item to a string representation.-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize, setSize
-
-
-
-
Method Detail
-
render
void render(java.lang.Object item, Spinner spinner)
Prepares the renderer for layout or paint.- Parameters:
item
- The item to render, ornull
if called to calculate preferred height for skins that assume a fixed renderer height.spinner
- The host component.
-
toString
java.lang.String toString(java.lang.Object item)
Converts a spinner item to a string representation.- Parameters:
item
- The item from the spinner's data.- 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.
-
-