de.lessvoid.nifty.controls.chatcontrol
Class ChatEntryModelClass

java.lang.Object
  extended by de.lessvoid.nifty.controls.chatcontrol.ChatEntryModelClass

public final class ChatEntryModelClass
extends Object

Handles a line in the chat controller. This can be either a chat line or an entry in the list of players.

Version:
0.1
Author:
Mark

Constructor Summary
ChatEntryModelClass(String labelParam, NiftyImage iconParam)
          Constructor excepting the line and the icon.
ChatEntryModelClass(String labelParam, NiftyImage iconParam, String style)
           
 
Method Summary
 boolean equals(Object obj)
          
 NiftyImage getIcon()
          Return the supplied icon.
 String getLabel()
          Return the supplied label.
 String getStyle()
          Returns the style of the current entry.
 int hashCode()
          
 void setIcon(NiftyImage icon)
          Supply a new icon which replaces the current one.
 void setLabel(String label)
          Set a new label to replace the current one.
 void setStyle(String style)
          Supply a new style which replaces the current one, null reverts to the default style from the XML.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChatEntryModelClass

public ChatEntryModelClass(String labelParam,
                           NiftyImage iconParam)
Constructor excepting the line and the icon.

Parameters:
labelParam - The label to put in the entry. This can be either a chat line or a player name.
iconParam - The icon to display in the entry, this one is optional.

ChatEntryModelClass

public ChatEntryModelClass(String labelParam,
                           NiftyImage iconParam,
                           String style)
Method Detail

toString

public String toString()

Overrides:
toString in class Object

getLabel

public String getLabel()
Return the supplied label. This can be either a chat line or a player name.

Returns:
The supplied label.

setLabel

public void setLabel(String label)
Set a new label to replace the current one.

Parameters:
label - The new label.

getIcon

public NiftyImage getIcon()
Return the supplied icon.

Returns:
The supplied icon.

setIcon

public void setIcon(NiftyImage icon)
Supply a new icon which replaces the current one.

Parameters:
icon - The icon.

getStyle

public String getStyle()
Returns the style of the current entry.

Returns:
The style.

setStyle

public void setStyle(String style)
Supply a new style which replaces the current one, null reverts to the default style from the XML.

Parameters:
style - The new style.

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2011. All Rights Reserved.