de.lessvoid.nifty.controls.chatcontrol
Class ChatBoxViewConverter

java.lang.Object
  extended by de.lessvoid.nifty.controls.chatcontrol.ChatBoxViewConverter
All Implemented Interfaces:
ListBox.ListBoxViewConverter<ChatEntryModelClass>

public class ChatBoxViewConverter
extends Object
implements ListBox.ListBoxViewConverter<ChatEntryModelClass>

Handles the displaying of the items in the ChatBox.

Version:
0.1
Author:
Mark

Constructor Summary
ChatBoxViewConverter()
          Default constructor.
 
Method Summary
 void display(Element listBoxItem, ChatEntryModelClass item)
          Display the given item in the given element.
 int getWidth(Element listBoxItem, ChatEntryModelClass 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

ChatBoxViewConverter

public ChatBoxViewConverter()
Default constructor.

Method Detail

display

public final void display(Element listBoxItem,
                          ChatEntryModelClass item)
Display the given item in the given element.

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

getWidth

public final int getWidth(Element listBoxItem,
                          ChatEntryModelClass item)
Return the width in pixel of the given item rendered for the given element.

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