com.ibm.as400.opnav
Class TBButtonDescriptor

java.lang.Object
  |
  +--com.ibm.as400.opnav.TBButtonDescriptor

public class TBButtonDescriptor
extends java.lang.Object

A data entity which describes a Windows toolbar button. A TBButtonDescriptor contains a set of fields which correspond to the Windows TBBUTTON data structure. An array of TBButtonDescriptors is included in the WindowsToolBarInfo instance returned by a component's implementation of WindowsListManager.getWindowsToolBarInfo.

Since:
v4r5m0
See Also:
WindowsToolBarInfo, WindowsListManager

Field Summary
static int CANCEL_BUTTON
          The button is the public framework cancel button.
static int COPY_BUTTON
          The button is the public framework copy button.
static int CUT_BUTTON
          The button is the public framework cut button.
static int DELETE_BUTTON
          The button is the public framework delete button.
static int PASTE_BUTTON
          The button is the public framework paste button.
static int PRINT_BUTTON
          The button is the public framework print button.
static int PROPERTIES_BUTTON
          The button is the public framework properties button.
static int REFRESH_BUTTON
          The button is the public framework refresh button.
static byte STATE_ENABLED
          Indicates the button accepts user input.
static byte STATE_HIDDEN
          Indicates the button is not visible and cannot receive user input.
static byte STATE_INDETERMINATE
          Indicates the button is grayed.
 
Constructor Summary
TBButtonDescriptor()
          Constructs a button descriptor which acts as a separator.
TBButtonDescriptor(int imageIndex, int command, byte state, java.lang.String verb)
          Constructs a button descriptor.
 
Method Summary
 int getCommand()
          Returns the command identifier associated with this button.
 int getImageIndex()
          Returns the index of the button image.
 byte getState()
          Returns the state flags for this button.
 java.lang.String getVerb()
          Returns the verb string used to identify the button programmatically.
 void setCommand(int command)
          Sets the command identifier associated with this button.
 void setImageIndex(int index)
          Sets the index of the button image.
 void setState(byte state)
          Sets the state flags for this button.
 void setVerb(java.lang.String verb)
          Sets the verb string used to identify the button programmatically.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REFRESH_BUTTON

public static final int REFRESH_BUTTON
The button is the public framework refresh button.

COPY_BUTTON

public static final int COPY_BUTTON
The button is the public framework copy button.

PASTE_BUTTON

public static final int PASTE_BUTTON
The button is the public framework paste button.

DELETE_BUTTON

public static final int DELETE_BUTTON
The button is the public framework delete button.

PROPERTIES_BUTTON

public static final int PROPERTIES_BUTTON
The button is the public framework properties button.

CUT_BUTTON

public static final int CUT_BUTTON
The button is the public framework cut button.

CANCEL_BUTTON

public static final int CANCEL_BUTTON
The button is the public framework cancel button.

PRINT_BUTTON

public static final int PRINT_BUTTON
The button is the public framework print button.

STATE_ENABLED

public static final byte STATE_ENABLED
Indicates the button accepts user input. A button not having this state does not accept user input and is grayed.

STATE_HIDDEN

public static final byte STATE_HIDDEN
Indicates the button is not visible and cannot receive user input.

STATE_INDETERMINATE

public static final byte STATE_INDETERMINATE
Indicates the button is grayed.
Constructor Detail

TBButtonDescriptor

public TBButtonDescriptor()
Constructs a button descriptor which acts as a separator.
Since:
v4r5m0

TBButtonDescriptor

public TBButtonDescriptor(int imageIndex,
                          int command,
                          byte state,
                          java.lang.String verb)
Constructs a button descriptor.
Parameters:
imageIndex - Zero-based index of the button image.
command - Command identifier associated with this button.
state - Specify STATE_ENABLED, STATE_HIDDEN, or STATE_INDETERMINATE.
verb - The verb string used to identify the button programmatically.
Since:
v4r5m0
See Also:
setCommand(int)
Method Detail

getImageIndex

public int getImageIndex()
Returns the index of the button image.
Returns:
The zero-based index of the button image.
Since:
v4r5m0

setImageIndex

public void setImageIndex(int index)
Sets the index of the button image.
Parameters:
index - The zero-based index of the button image.
Since:
v4r5m0

getCommand

public int getCommand()
Returns the command identifier associated with this button.
Returns:
The integer identifier associated with this button.
Since:
v4r5m0

setCommand

public void setCommand(int command)
Sets the command identifier associated with this button. The value of the identifier must lie within the range 7000-8000, the acceptable range for Operations Navigator custom toolbar buttons.
Parameters:
command - The integer identifier associated with this button. This value can also be CANCEL_BUTTON, DELETE_BUTTON, PRINT_BUTTON, REFRESH_BUTTON, CUT_BUTTON, COPY_BUTTON, PASTE_BUTTON or PROPERTIES_BUTTON.
Throws:
java.lang.IllegalArgumentException - if the command identifier value lies outside the range 7000-8000.
Since:
v4r5m0

getState

public byte getState()
Returns the state flags for this button.
Returns:
One of the three flags STATE_ENABLED, STATE_HIDDEN, or STATE_INDETERMINATE.
Since:
v4r5m0

setState

public void setState(byte state)
Sets the state flags for this button.
Parameters:
state - One of the three flags STATE_ENABLED, STATE_HIDDEN, or STATE_INDETERMINATE.
Throws:
java.lang.IllegalArgumentException - if the command identifier value is not STATE_ENABLED, STATE_HIDDEN or STATE_INDETERMINATE.
Since:
v4r5m0

getVerb

public java.lang.String getVerb()
Returns the verb string used to identify the button programmatically.
Returns:
The verb string associated with this button.
Since:
v4r5m0

setVerb

public void setVerb(java.lang.String verb)
Sets the verb string used to identify the button programmatically.
Parameters:
verb - The verb string associated with this button.
Since:
v4r5m0

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object.
Since:
v4r5m0