com.infoengine.schema
Class DisplayContainer

java.lang.Object
  extended bycom.infoengine.schema.DisplayContainer
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Attribute, EnumeratedValue

public class DisplayContainer
extends Object
implements Serializable

Represents an object that contains displayable strings. For example labels, flyover help, descriptions, etc.

Displayable strings are stored and retrieved by id. A list of ids a DisplayContainer contains can be retrieved using the getIds method. Utility methods are provided to retrieve displayable strings without the need to interact with the DisplayValue object.

See Also:
DisplayValue, Serialized Form

Field Summary
private  Vector displays
           
private static int VEC_CAP_INCR
           
 
Constructor Summary
DisplayContainer()
           
 
Method Summary
 void addDisplayValue(DisplayValue dv)
          Append a DisplayValue object to the end of the array
 DisplayValue[] getDisplays()
          Get the entire array of DisplayValue objects
 DisplayValue getDisplays(int index)
          Gets the DisplayValue at index in the array.
 String getDisplayString(String id)
          Get the display string associated with an id
 DisplayValue getDisplayValue(String id)
          Get a DisplayValue object by its id
 String[] getIds()
          Get a list of string ids string values are stored under
 void removeDisplayValue(String id)
          Remove a DisplayValue object from the array by its id
 void setDisplays(DisplayValue[] vals)
          Set the entire array of DisplayValue objects
 void setDisplays(int index, DisplayValue dv)
          Sets a DisplayValue at a specific index.
 void setDisplayString(String id, String value)
          Set the display string associated with an id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VEC_CAP_INCR

private static final int VEC_CAP_INCR
See Also:
Constant Field Values

displays

private Vector displays
Constructor Detail

DisplayContainer

public DisplayContainer()
Method Detail

setDisplays

public void setDisplays(int index,
                        DisplayValue dv)
Sets a DisplayValue at a specific index. If index is larger than the size of the current array then dv is appended to the end of the array.

Parameters:
index - the index in the array to set the DisplayValue dv the DisplayValue to set

getDisplays

public DisplayValue getDisplays(int index)
Gets the DisplayValue at index in the array.

Parameters:
index - the index into the array
Returns:
the DisplayValue at index or null if invalid index

setDisplays

public void setDisplays(DisplayValue[] vals)
Set the entire array of DisplayValue objects

Parameters:
vals - the new array of DisplayValue objects

getDisplays

public DisplayValue[] getDisplays()
Get the entire array of DisplayValue objects

Returns:
the array, may be zero length

getIds

public String[] getIds()
Get a list of string ids string values are stored under

Returns:
the list of ids, may be zero length

addDisplayValue

public void addDisplayValue(DisplayValue dv)
Append a DisplayValue object to the end of the array

Parameters:
dv - the new DisplayValue object, if null ignored

getDisplayValue

public DisplayValue getDisplayValue(String id)
Get a DisplayValue object by its id

Parameters:
id - the id of the DisplayValue to retrieved
Returns:
the DisplayValue or null if invalid id

removeDisplayValue

public void removeDisplayValue(String id)
Remove a DisplayValue object from the array by its id

Parameters:
id - the id of hte DisplayValue to remove

getDisplayString

public String getDisplayString(String id)
Get the display string associated with an id

Parameters:
id - the id to retrieve

setDisplayString

public void setDisplayString(String id,
                             String value)
Set the display string associated with an id

Parameters:
id - the id of the string to set value the value of the display string