de.lessvoid.nifty.controls
Interface DropDown.DropDownViewConverter<T>

Type Parameters:
T -
All Known Implementing Classes:
DropDown.SimpleDropDownViewConverter
Enclosing interface:
DropDown<T>

public static interface DropDown.DropDownViewConverter<T>

You'll need to implement this interface to change the way your model class T needs to be displayed in the DropDown. If you omit it then Nifty will use its default implementation which simply calls T.toString();

Author:
void

Method Summary
 void display(Element itemElement, T item)
          Display the given item in the given element.
 int getWidth(Element itemElement, T item)
          Return the width in pixel of the given item rendered for the given element.
 

Method Detail

display

void display(Element itemElement,
             T item)
Display the given item in the given element.

Parameters:
itemElement - the element to display the item in
item - the item to display

getWidth

int getWidth(Element itemElement,
             T item)
Return the width in pixel of the given item rendered for the given element.

Parameters:
itemElement - the element to render
item - the item to render
Returns:
the width of the element after the item has been applied to it


Copyright © 2011. All Rights Reserved.