com.tivoli.twg.alertmgr
Class TWGActionParmListBox

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGActionParm
      extended bycom.tivoli.twg.alertmgr.TWGActionParmListBox
Direct Known Subclasses:
TWGActionParmDropDown, TWGActionParmMultiSelList, TWGActionParmStringSpinner

public abstract class TWGActionParmListBox
extends TWGActionParm

An abstract class for designating that an Event Action parameter should take the form of a list of choices.


Field Summary
protected  java.lang.String itemsBundle
           
 
Fields inherited from class com.tivoli.twg.alertmgr.TWGActionParm
ACTION_PARM_DROPDOWN, ACTION_PARM_FLOAT_SPINNER, ACTION_PARM_KEYED_DROPDOWN, ACTION_PARM_KEYED_MULTI_SEL_LIST, ACTION_PARM_LONG_SPINNER, ACTION_PARM_MULTI_SEL_LIST, ACTION_PARM_STRING_SPINNER, ACTION_PARM_STRING_TREE, ACTION_PARM_TEXTAREA, ACTION_PARM_TEXTBOX
 
Constructor Summary
TWGActionParmListBox(IntelByteBuffer buf, int type)
          Constructor for interpreting a provided IntelByteBuffer.
TWGActionParmListBox(IntelByteBuffer buf, int off, int type)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
TWGActionParmListBox(int index, int type, java.lang.String label, java.lang.String labelBundle, java.lang.String sublabel, java.lang.String sublabelBundle, java.lang.String[] choices, java.lang.String choicesBundle)
          Constructor for a single or multi-select list of strings action parameter where no pre-selections are made.
TWGActionParmListBox(int index, int type, java.lang.String label, java.lang.String labelBundle, java.lang.String sublabel, java.lang.String sublabelBundle, java.lang.String[] choices, java.lang.String choicesBundle, int defaultChoice)
          Constructor for a single-select list of strings action parameter.
TWGActionParmListBox(int index, int type, java.lang.String label, java.lang.String labelBundle, java.lang.String sublabel, java.lang.String sublabelBundle, java.lang.String[] choices, java.lang.String choicesBundle, int[] defaultChoices)
          Constructor for a multi-select list of strings action parameter.
TWGActionParmListBox(TWGActionParmListBox aplb)
          Copy constructor.
 
Method Summary
abstract  java.awt.Component getGuiComponent()
          Get the graphical component associated with this TWGActionParm subclass.
 java.lang.String getItem(int index)
          Get the value of the selectable item referenced by the given index.
 java.lang.String getItemsBundle()
          Get the bundle associated with the list of selectable items.
 java.lang.String[] getListOfItems()
          Get a reference to the list of selectable items.
 java.lang.String[] getListOfItems(java.util.Locale locale)
          Get the list of selectable items based on the given locale.
 int getNumSelectedItems()
          Get the number of currently selected items.
 int getSelected()
          Get the index of the currently selected item.
 int[] getSelectedItems()
          Get a list of indices that reference selected items.
 void print()
          Print the contents of the TWGActionParmListBox.
 int readTWGActionParmListBox(IntelByteBuffer buf, int off, int type)
          Method for interpreting a provided IntelByteBuffer at a given offset.
abstract  void saveValues(java.awt.Component comp)
          Save the user customized value(s) of this action parameter.
 void setItem(int index, java.lang.String s)
          Set the value of the selectable item referenced by the given index.
 void setItemsBundle(java.lang.String bundle)
          Set the bundle associated with the list of selectable items.
 void setListOfItems(java.lang.String[] list)
          Set a the list of selectable items.
 void setSelected(int itemIndex)
          Set the currently selected item to the item referenced by a given index.
 void setSelectedItems(int[] intArray)
          Set the currently selected items to the items referenced by a given array of indices.
 int sizeOf()
          Determine the size of the entire TWGActionParmListBox object
static int sizeOfHdr()
          Determine the size of the header information.
 int sizeOfTWGActionParmListBox()
          Determine the size of the entire TWGActionParmListBox object
 IntelByteBuffer toIntelByteBuffer()
          Convert the TWGActionParmListBox into IntelByteBuffer representation.
abstract  boolean wasModified(java.awt.Component comp)
          Determine if the user modified the value(s) of this action parameter.
 int writeIntelByteBuffer(IntelByteBuffer buf)
          Write contents of this object into an IntelByteBuffer.
 int writeIntelByteBuffer(IntelByteBuffer buf, int off)
          Write action parm into provided IntelByteBuffer starting at a given offset.
 
Methods inherited from class com.tivoli.twg.alertmgr.TWGActionParm
getCapturedValues, getCapturedValues, getIndex, getLabel, getLabel, getLabelBundle, getSubLabel, getSubLabel, getSubLabelBundle, readTWGActionParm, setIndex, setLabel, setLabel, setLabelBundle, setSubLabel, setSubLabel, setSubLabelBundle, setType, sizeOfTWGActionParm, traceString, traceValue, unwrap, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemsBundle

protected java.lang.String itemsBundle
Constructor Detail

TWGActionParmListBox

public TWGActionParmListBox(int index,
                            int type,
                            java.lang.String label,
                            java.lang.String labelBundle,
                            java.lang.String sublabel,
                            java.lang.String sublabelBundle,
                            java.lang.String[] choices,
                            java.lang.String choicesBundle,
                            int[] defaultChoices)
Constructor for a multi-select list of strings action parameter.

Parameters:
index - Index of action parameter (used as a reference key)
type - Integer encoding of subclass type
label - Label (or associated bundle keyword if label bundle non-null).
choices - Array of choices presented to the user. Literal strings or associated bundle keywords if choices bundle non-null. array of choices presented to the user
choicesBundle - Bundle containing choices referenced choices keywords
defaultChoices - Array of indices that reference the array of choices indicating pre-selected values.

TWGActionParmListBox

public TWGActionParmListBox(int index,
                            int type,
                            java.lang.String label,
                            java.lang.String labelBundle,
                            java.lang.String sublabel,
                            java.lang.String sublabelBundle,
                            java.lang.String[] choices,
                            java.lang.String choicesBundle,
                            int defaultChoice)
Constructor for a single-select list of strings action parameter.

Parameters:
index - Index of action parameter (used as a reference key)
type - Integer encoding of subclass type
label - Label (or associated bundle keyword if label bundle non-null).
choices - Array of choices presented to the user. Literal strings or associated bundle keywords if choices bundle non-null. array of choices presented to the user
choicesBundle - Bundle containing choices referenced choices keywords
defaultChoice - Index of the default selection in the array of choices

TWGActionParmListBox

public TWGActionParmListBox(int index,
                            int type,
                            java.lang.String label,
                            java.lang.String labelBundle,
                            java.lang.String sublabel,
                            java.lang.String sublabelBundle,
                            java.lang.String[] choices,
                            java.lang.String choicesBundle)
Constructor for a single or multi-select list of strings action parameter where no pre-selections are made.

Parameters:
index - Index of action parameter (used as a reference key)
type - Integer encoding of subclass type
label - Label (or associated bundle keyword if label bundle non-null).
choices - Array of choices presented to the user. Literal strings or associated bundle keywords if choices bundle non-null. array of choices presented to the user
choicesBundle - Bundle containing choices referenced choices keywords

TWGActionParmListBox

public TWGActionParmListBox(TWGActionParmListBox aplb)
Copy constructor.


TWGActionParmListBox

public TWGActionParmListBox(IntelByteBuffer buf,
                            int type)
Constructor for interpreting a provided IntelByteBuffer. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's offset ptr is advanced to reflect the number of bytes read.

Parameters:
buf - IntelByteBuffer from which data should be read
type - Integer encoding of the TWGActionParm subclass

TWGActionParmListBox

public TWGActionParmListBox(IntelByteBuffer buf,
                            int off,
                            int type)
Constructor for interpreting a provided IntelByteBuffer at a given offset. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's start and offset ptrs are unaffected.

Parameters:
buf - IntelByteBuffer from which data should be read
off - offset from the current relative start of the provided IntelByteBuffer
type - Integer encoding of the TWGActionParm subclass
Method Detail

sizeOfHdr

public static int sizeOfHdr()
Determine the size of the header information.

Returns:
number of bytes that comprise the header

sizeOfTWGActionParmListBox

public int sizeOfTWGActionParmListBox()
Determine the size of the entire TWGActionParmListBox object

Returns:
number of bytes that comprise the object

sizeOf

public int sizeOf()
Determine the size of the entire TWGActionParmListBox object

Overrides:
sizeOf in class TWGActionParm
Returns:
number of bytes that comprise the object

toIntelByteBuffer

public IntelByteBuffer toIntelByteBuffer()
Convert the TWGActionParmListBox into IntelByteBuffer representation.

Specified by:
toIntelByteBuffer in class TWGActionParm
Returns:
IntelByteBuffer representing the encoded object

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf)
Write contents of this object into an IntelByteBuffer. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's offset ptr is advanced to reflect the number of bytes written.

Overrides:
writeIntelByteBuffer in class TWGActionParm
Parameters:
buf - IntelByteBuffer into which data should be written
Returns:
original offset plus number of bytes written

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf,
                                int off)
Write action parm into provided IntelByteBuffer starting at a given offset. Use the current offset and start ptrs within the provided IntelByteBuffer to determine a relative start ptr and begin writing off bytes from that location. Return the buffer's offset ptr advanced to reflect the number of bytes written.

Overrides:
writeIntelByteBuffer in class TWGActionParm
Parameters:
buf - IntelByteBuffer into which data should be written
off - offset from the current relative start of the provided IntelByteBuffer
Returns:
number of bytes written

readTWGActionParmListBox

public int readTWGActionParmListBox(IntelByteBuffer buf,
                                    int off,
                                    int type)
Method for interpreting a provided IntelByteBuffer at a given offset.

Parameters:
buf - IntelByteBuffer from which TWGActionParm should be read
off - offset from the current relative start of the provided IntelByteBuffer
type - Integer encoding of the TWGActionParm subclass
Returns:
number of bytes read while interpreting the buffer

getGuiComponent

public abstract java.awt.Component getGuiComponent()
Get the graphical component associated with this TWGActionParm subclass.

Specified by:
getGuiComponent in class TWGActionParm
Returns:
Swing component this subclass uses to display the action parameter

saveValues

public abstract void saveValues(java.awt.Component comp)
Save the user customized value(s) of this action parameter.

Specified by:
saveValues in class TWGActionParm
Parameters:
comp - instance of the Swing component this subclass uses to display the action parameter

wasModified

public abstract boolean wasModified(java.awt.Component comp)
Determine if the user modified the value(s) of this action parameter.

Specified by:
wasModified in class TWGActionParm
Parameters:
comp - instance of the Swing component this subclass uses to display the action parameter

getItem

public java.lang.String getItem(int index)
Get the value of the selectable item referenced by the given index.

Parameters:
index - Index of the selectable item.
Returns:
Value of the selectable item.

getListOfItems

public java.lang.String[] getListOfItems(java.util.Locale locale)
Get the list of selectable items based on the given locale.

Parameters:
locale - Locale of the desired language.
Returns:
Array of strings tailored to the given locale.

setItem

public void setItem(int index,
                    java.lang.String s)
Set the value of the selectable item referenced by the given index.

Parameters:
index - Index of the selectable item.
s - New value.
Returns:
Value of the selectable item.

getListOfItems

public java.lang.String[] getListOfItems()
Get a reference to the list of selectable items.

Returns:
Array of selectable items.

setListOfItems

public void setListOfItems(java.lang.String[] list)
Set a the list of selectable items.

Parameters:
list - New list of selectable items.

getItemsBundle

public java.lang.String getItemsBundle()
Get the bundle associated with the list of selectable items.

Returns:
bundle Bundle name associated with the list of selectable items.

setItemsBundle

public void setItemsBundle(java.lang.String bundle)
Set the bundle associated with the list of selectable items.

Parameters:
bundle - New bundle name.

getSelected

public int getSelected()
Get the index of the currently selected item.

Returns:
index of the currently selected item.

getNumSelectedItems

public int getNumSelectedItems()
Get the number of currently selected items.

Returns:
number of the currently selected items.

getSelectedItems

public int[] getSelectedItems()
Get a list of indices that reference selected items.

Returns:
Array of indices that reference the currently selected items.

setSelected

public void setSelected(int itemIndex)
Set the currently selected item to the item referenced by a given index.

Parameters:
itemIndex - Index of the selected item.

setSelectedItems

public void setSelectedItems(int[] intArray)
Set the currently selected items to the items referenced by a given array of indices.

Parameters:
intArray - Array of indices.

print

public void print()
Print the contents of the TWGActionParmListBox.

Overrides:
print in class TWGActionParm