com.tensegrity.gui
Class UIItemList

java.lang.Object
  extended bycom.tensegrity.gui.UIItemList

public class UIItemList
extends java.lang.Object

UIItemList holds lists of UIItems. Classes like UIManager use this class to maintain their list of id's and objects.

Version:
$Id: UIItemList.java,v 1.21 2006/03/02 11:42:01 BurkhardWick Exp $
Author:
Michael Kegel, Gilles Iachelini

Constructor Summary
UIItemList()
          Creates a new UIItemList.
UIItemList(java.util.ResourceBundle resourcebundle)
          Creates a new UIItemList from a ResourceBundle instance.
 
Method Summary
 void add(java.util.ResourceBundle resourcebundle)
          Method add(ResourceBundle) creates new UIItems from the key-value pairs extracted out of the given ResourceBundle instance.
 void add(java.lang.String id, int state, java.lang.String text)
          Adds a UIItem with the given state, text & id to the designated list.
 void add(UIItem uiitem)
          Method add adds an UIItem to the internal uiItems list.
 UIItem get(java.lang.String id)
          Method get returns the UIItem for the given id.
 java.util.Set getKeys()
          Returns a Set of the keys.
 UIItem remove(java.lang.String id)
          Removes a mapping from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIItemList

public UIItemList()
Creates a new UIItemList.


UIItemList

public UIItemList(java.util.ResourceBundle resourcebundle)
Creates a new UIItemList from a ResourceBundle instance.

Parameters:
resourcebundle - The ResourceBundle instance to initialize this UIItemList with.
See Also:
add(ResourceBundle)
Method Detail

add

public void add(java.lang.String id,
                int state,
                java.lang.String text)
Adds a UIItem with the given state, text & id to the designated list. If such an UIItem already exist, it will be updated with the given state and text value.

Parameters:
id - the id of the (new) UIItem.
state - the state of the (new) UIItem.
text - the text associated with the (new) UIItem.

remove

public UIItem remove(java.lang.String id)
Removes a mapping from the list.

Parameters:
id - the id to remove
Returns:
previous mapping if existing, otherwise null.

get

public UIItem get(java.lang.String id)
Method get returns the UIItem for the given id. Returns null if no such item is found with this id.

Parameters:
id - the id of the item you want to receive.
Returns:
UIItem

add

public void add(UIItem uiitem)
Method add adds an UIItem to the internal uiItems list. If there is already an item in that list with the same id, the item is updated with the given values.

Parameters:
uiitem - the item instance to add.
See Also:
add(String, int, String)

add

public void add(java.util.ResourceBundle resourcebundle)
Method add(ResourceBundle) creates new UIItems from the key-value pairs extracted out of the given ResourceBundle instance.

Parameters:
resourcebundle - The ResourceBundle to create the UIItems from.

getKeys

public java.util.Set getKeys()
Returns a Set of the keys.

Returns:
A Set of the keys.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.