de.lessvoid.nifty.controls
Class ListBox.ListBoxViewConverterSimple<T>

java.lang.Object
  extended by de.lessvoid.nifty.controls.ListBox.ListBoxViewConverterSimple<T>
Type Parameters:
T -
All Implemented Interfaces:
ListBox.ListBoxViewConverter<T>
Enclosing interface:
ListBox<T>

public static class ListBox.ListBoxViewConverterSimple<T>
extends Object
implements ListBox.ListBoxViewConverter<T>

A simple implementation of ListBoxViewConverter that will just use item.toString(). This is the default SimpleListBoxViewConverter used when you don't set a different implementation.

Author:
void

Constructor Summary
ListBox.ListBoxViewConverterSimple()
           
 
Method Summary
 void display(Element element, T item)
          Display the given item in the given element.
 int getWidth(Element element, T item)
          Return the width in pixel of the given item rendered for the given element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListBox.ListBoxViewConverterSimple

public ListBox.ListBoxViewConverterSimple()
Method Detail

display

public void display(Element element,
                    T item)
Description copied from interface: ListBox.ListBoxViewConverter
Display the given item in the given element.

Specified by:
display in interface ListBox.ListBoxViewConverter<T>
Parameters:
element - the element to display the item in
item - the item to display

getWidth

public int getWidth(Element element,
                    T item)
Description copied from interface: ListBox.ListBoxViewConverter
Return the width in pixel of the given item rendered for the given element.

Specified by:
getWidth in interface ListBox.ListBoxViewConverter<T>
Parameters:
element - 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.