com.tivoli.twg.alertmgr
Class TWGActionParm

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGActionParm
Direct Known Subclasses:
TWGActionParmListBox, TWGActionParmLongSpinner, TWGActionParmText

public abstract class TWGActionParm
extends java.lang.Object

An abstract base class for describing the characteristers of an action parameter in an Event Action. Those features that are common to all action parms are housed here.


Field Summary
protected static int ACTION_PARM_DROPDOWN
           
protected static int ACTION_PARM_FLOAT_SPINNER
           
protected static int ACTION_PARM_KEYED_DROPDOWN
           
protected static int ACTION_PARM_KEYED_MULTI_SEL_LIST
           
protected static int ACTION_PARM_LONG_SPINNER
           
protected static int ACTION_PARM_MULTI_SEL_LIST
           
protected static int ACTION_PARM_STRING_SPINNER
           
protected static int ACTION_PARM_STRING_TREE
           
protected static int ACTION_PARM_TEXTAREA
           
protected static int ACTION_PARM_TEXTBOX
           
 
Constructor Summary
protected TWGActionParm(IntelByteBuffer buf)
          Constructor for interpreting a provided IntelByteBuffer.
protected TWGActionParm(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
  TWGActionParm(int idx, int type, java.lang.String label, java.lang.String labBundle, java.lang.String subLabel, java.lang.String subLabBundle)
          Constructor for the NLS-enabled action parameter.
  TWGActionParm(TWGActionParm ap)
          Copy constructor.
 
Method Summary
 java.lang.String getCapturedValues()
          returns the values stored for the given actionparm.
 java.lang.String getCapturedValues(java.util.Locale locale)
           
abstract  java.awt.Component getGuiComponent()
          Get the graphical component associated with this TWGActionParm subclass.
 int getIndex()
          Get the index of action parameter.
 java.lang.String getLabel()
          Get the action parameter's label.
 java.lang.String getLabel(java.util.Locale locale)
          Get the label of the action parameter based on a desired locale.
 java.lang.String getLabelBundle()
          Get the bundle associated with the action parameter's label keyword.
 java.lang.String getSubLabel()
          Get the action parameter's sub-label.
 java.lang.String getSubLabel(java.util.Locale locale)
          Get the sub-label of the action parameter based on a desired locale.
 java.lang.String getSubLabelBundle()
          Get the bundle associated with the action parameter's sub-label keyword.
 void print()
          Print label and sub-label of this action parameter.
 int readTWGActionParm(IntelByteBuffer buf, int off)
          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 setIndex(int idx)
          Set the index of action parameter.
 void setLabel(java.lang.String lbl)
          Set the action parameter's label.
 void setLabel(java.lang.String lbl, java.lang.String bdl)
          Set the action parameter's label using a keyword and bundle.
 void setLabelBundle(java.lang.String lb)
          Set the bundle containing the keyword associated with the action parameter's label.
 void setSubLabel(java.lang.String lbl)
          Set the action parameter's sub-label.
 void setSubLabel(java.lang.String lbl, java.lang.String bdl)
          Set the action parameter's sub-label using a keyword and bundle.
 void setSubLabelBundle(java.lang.String slb)
          Set the bundle containing the keyword associated with the action parameter's sub-label.
protected  void setType(int t)
          Set the encoded TWGActionParm subclass type.
 int sizeOf()
          Determine the size of the entire TWGActionParm object
static int sizeOfHdr()
          Determine the size of the TWGActionParm header information.
 int sizeOfTWGActionParm()
          Determine the size of the entire TWGActionParm object
abstract  IntelByteBuffer toIntelByteBuffer()
          Convert the TWGActionParm into IntelByteBuffer representation.
 java.lang.String traceString()
           
 java.lang.String traceValue()
           
static TWGActionParm unwrap(IntelByteBuffer buf)
          Convert the IntelByteBuffer into the appropriate TWGActionParm object.
static TWGActionParm unwrap(IntelByteBuffer buf, int off)
          Convert the IntelByteBuffer (starting at the given offset) into the appropriate TWGActionParm object.
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_PARM_TEXTBOX

protected static final int ACTION_PARM_TEXTBOX
See Also:
Constant Field Values

ACTION_PARM_STRING_SPINNER

protected static final int ACTION_PARM_STRING_SPINNER
See Also:
Constant Field Values

ACTION_PARM_DROPDOWN

protected static final int ACTION_PARM_DROPDOWN
See Also:
Constant Field Values

ACTION_PARM_LONG_SPINNER

protected static final int ACTION_PARM_LONG_SPINNER
See Also:
Constant Field Values

ACTION_PARM_FLOAT_SPINNER

protected static final int ACTION_PARM_FLOAT_SPINNER
See Also:
Constant Field Values

ACTION_PARM_MULTI_SEL_LIST

protected static final int ACTION_PARM_MULTI_SEL_LIST
See Also:
Constant Field Values

ACTION_PARM_STRING_TREE

protected static final int ACTION_PARM_STRING_TREE
See Also:
Constant Field Values

ACTION_PARM_TEXTAREA

protected static final int ACTION_PARM_TEXTAREA
See Also:
Constant Field Values

ACTION_PARM_KEYED_DROPDOWN

protected static final int ACTION_PARM_KEYED_DROPDOWN
See Also:
Constant Field Values

ACTION_PARM_KEYED_MULTI_SEL_LIST

protected static final int ACTION_PARM_KEYED_MULTI_SEL_LIST
See Also:
Constant Field Values
Constructor Detail

TWGActionParm

public TWGActionParm(int idx,
                     int type,
                     java.lang.String label,
                     java.lang.String labBundle,
                     java.lang.String subLabel,
                     java.lang.String subLabBundle)
Constructor for the NLS-enabled action parameter.

Parameters:
idx - index of action parameter (used as a reference)
type - integer encoding of subclass type
label - label (or associated bundle keyword if label bundle non-null).
labBundle - bundle containing label referenced label keyword
subLabel - sublabel (or associated bundle keyword if sublabel bundle non-null).
subLabBundle - bundle containing sublabel referenced subLabel keyword

TWGActionParm

public TWGActionParm(TWGActionParm ap)
Copy constructor.


TWGActionParm

protected TWGActionParm(IntelByteBuffer buf)
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 TWGActionParm should be read

TWGActionParm

protected TWGActionParm(IntelByteBuffer buf,
                        int off)
Constructor 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
Method Detail

sizeOfHdr

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

Returns:
number of bytes that comprise the header

sizeOfTWGActionParm

public int sizeOfTWGActionParm()
Determine the size of the entire TWGActionParm object

Returns:
number of bytes that comprise the object

sizeOf

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

Returns:
number of bytes that comprise the object

toIntelByteBuffer

public abstract IntelByteBuffer toIntelByteBuffer()
Convert the TWGActionParm into IntelByteBuffer representation.

Returns:
IntelByteBuffer representing the encoded object

unwrap

public static TWGActionParm unwrap(IntelByteBuffer buf)
Convert the IntelByteBuffer into the appropriate TWGActionParm object.

Parameters:
buf - IntelByteBuffer to be converted
Returns:
TWGActionParm object decoded from the input buffer

unwrap

public static TWGActionParm unwrap(IntelByteBuffer buf,
                                   int off)
Convert the IntelByteBuffer (starting at the given offset) into the appropriate TWGActionParm object.

Parameters:
buf - IntelByteBuffer to be converted
off - offset into the provided IntelByteBuffer
Returns:
TWGActionParm object decoded from the input buffer

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.

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.

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

readTWGActionParm

public int readTWGActionParm(IntelByteBuffer buf,
                             int off)
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
Returns:
number of bytes read while interpreting the buffer

getLabel

public java.lang.String getLabel()
Get the action parameter's label.

Returns:
label or keyword associated with the label of the action parameter

setLabel

public void setLabel(java.lang.String lbl)
Set the action parameter's label.

Parameters:
lbl - label or keyword associated with label of the action parameter

setLabel

public void setLabel(java.lang.String lbl,
                     java.lang.String bdl)
Set the action parameter's label using a keyword and bundle.

Parameters:
lbl - keyword associated with label of the action parameter
bdl - bundle containing keyword associated with label of the action parameter

getLabelBundle

public java.lang.String getLabelBundle()
Get the bundle associated with the action parameter's label keyword.

Returns:
bundle associated with the action parameter's label keyword

setLabelBundle

public void setLabelBundle(java.lang.String lb)
Set the bundle containing the keyword associated with the action parameter's label.

Parameters:
lb - bundle containing keyword associated with label of the action parameter

getSubLabel

public java.lang.String getSubLabel()
Get the action parameter's sub-label.

Returns:
sub-label or keyword associated with the sub-label of the action parameter

setSubLabel

public void setSubLabel(java.lang.String lbl)
Set the action parameter's sub-label.

Parameters:
lbl - sub-label or keyword associated with the sub-label of the action parameter

setSubLabel

public void setSubLabel(java.lang.String lbl,
                        java.lang.String bdl)
Set the action parameter's sub-label using a keyword and bundle.

Parameters:
lbl - keyword associated with sub-label of the action parameter
bdl - bundle containing keyword associated with the sub-label of the action parameter

getSubLabelBundle

public java.lang.String getSubLabelBundle()
Get the bundle associated with the action parameter's sub-label keyword.

Returns:
bundle associated with the action parameter's sub-label keyword

setSubLabelBundle

public void setSubLabelBundle(java.lang.String slb)
Set the bundle containing the keyword associated with the action parameter's sub-label.

Parameters:
slb - bundle containing keyword associated with the sub-label of the action parameter

setType

protected void setType(int t)
Set the encoded TWGActionParm subclass type.

Parameters:
t - integer representing the type of TWGActionParm subclass being encoded

getIndex

public int getIndex()
Get the index of action parameter.

Returns:
integer identifier of action parameter

setIndex

public void setIndex(int idx)
Set the index of action parameter.

Parameters:
idx - index identifier of action parameter

getLabel

public java.lang.String getLabel(java.util.Locale locale)
Get the label of the action parameter based on a desired locale.

Parameters:
locale - locale of the label being requested
Returns:
String representing the label of the action parameter

getSubLabel

public java.lang.String getSubLabel(java.util.Locale locale)
Get the sub-label of the action parameter based on a desired locale.

Parameters:
locale - locale of the label being requested
Returns:
String representing the sub-label of the action parameter

getGuiComponent

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

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.

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.

Parameters:
comp - instance of the Swing component this subclass uses to display the action parameter

getCapturedValues

public java.lang.String getCapturedValues(java.util.Locale locale)

getCapturedValues

public java.lang.String getCapturedValues()
returns the values stored for the given actionparm. This function returns a string of values that were stored by the subclass Added by Chandra


print

public void print()
Print label and sub-label of this action parameter.


traceValue

public java.lang.String traceValue()

traceString

public java.lang.String traceString()