com.ibm.as400.ui.framework.java
Class AbstractDescriptor

java.lang.Object
  |
  +--com.ibm.as400.ui.framework.java.AbstractDescriptor
Direct Known Subclasses:
ChoiceDescriptor, ItemDescriptor, NodeDescriptor

public abstract class AbstractDescriptor
extends java.lang.Object

Describes a predefined value associated with a data attribute. An attribute's predefined values are often displayed as choices on a user interface panel, for example as a radio button group or a combo box.

Since:
v5r1m0

Constructor Summary
AbstractDescriptor()
          Constructs an AbstractDescriptor.
AbstractDescriptor(java.lang.String name, java.lang.String title)
          Constructs an AbstractDescriptor with the specified name and title.
AbstractDescriptor(java.lang.String name, java.lang.String title, HandlerTask[] handlerTasks)
          Constructs an AbstractDescriptor with the specified name, title, and HandlerTask list.
 
Method Summary
 void addHandlerTask(HandlerTask task)
          Adds a HandlerTask to the descriptor.
 java.lang.String getName()
          Returns the descriptor's name.
 java.lang.String getTitle()
          Returns the descriptor title.
 java.lang.Object getUserObject()
          Returns the user Object associated with this descriptor.
 void removeHandlerTask(HandlerTask task)
          Removes a HandlerTask from the choice.
 void setName(java.lang.String name)
          Sets the descriptor name.
 void setTitle(java.lang.String title)
          Sets the descriptor title.
 void setUserObject(java.lang.Object object)
          Sets the user object.
 java.lang.String toString()
          Returns a string representation of the descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDescriptor

public AbstractDescriptor()
Constructs an AbstractDescriptor.
Since:
v4r2m0

AbstractDescriptor

public AbstractDescriptor(java.lang.String name,
                          java.lang.String title)
Constructs an AbstractDescriptor with the specified name and title.
Parameters:
name - the name that is used to identify the choice programmatically.
title - the title of the choice in a form suitable for displaying to the user.
Since:
v4r2m0

AbstractDescriptor

public AbstractDescriptor(java.lang.String name,
                          java.lang.String title,
                          HandlerTask[] handlerTasks)
Constructs an AbstractDescriptor with the specified name, title, and HandlerTask list.
Parameters:
name - the name that is used to identify the choice programmatically
title - the title of the choice in a form suitable for displaying to the user
handlerTasks - a list of HandlerTasks which describe to the UI framework actions which should be carried out when the choice is selected
Since:
v4r2m0
See Also:
HandlerTask
Method Detail

getName

public java.lang.String getName()
Returns the descriptor's name.
Returns:
a string which is used to identify the descriptor programmatically
Since:
v4r2m0
See Also:
setName(java.lang.String)

setName

public void setName(java.lang.String name)
Sets the descriptor name.
Parameters:
name - a string which is used to identify the descriptor programmatically
Since:
v4r2m0
See Also:
getName()

getTitle

public java.lang.String getTitle()
Returns the descriptor title.
Returns:
the string which is displayed to the user
Since:
v4r2m0
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(java.lang.String title)
Sets the descriptor title.
Parameters:
title - the string which is used displayed to the user
Since:
v4r2m0
See Also:
getTitle()

addHandlerTask

public void addHandlerTask(HandlerTask task)
Adds a HandlerTask to the descriptor. A HandlerTask is an action that should be performed by the UI framework when the choice is selected.
Parameters:
task - the task to be performed
Since:
v4r2m0
See Also:
removeHandlerTask(com.ibm.as400.ui.framework.java.HandlerTask), HandlerTask

removeHandlerTask

public void removeHandlerTask(HandlerTask task)
Removes a HandlerTask from the choice. If the specified HandlerTask is not associated with the descriptor, no action occurs.
Parameters:
task - the task to be removed
Since:
v4r2m0
See Also:
addHandlerTask(com.ibm.as400.ui.framework.java.HandlerTask), HandlerTask

getUserObject

public java.lang.Object getUserObject()
Returns the user Object associated with this descriptor.
Returns:
the user Object
Since:
v5r1m0
See Also:
setUserObject(java.lang.Object)

setUserObject

public void setUserObject(java.lang.Object object)
Sets the user object.
Parameters:
the - user object to be associated with this descriptor
Since:
v5r1m0
See Also:
getUserObject()

toString

public java.lang.String toString()
Returns a string representation of the descriptor. The string is in a form suitable for displaying to the user.
Overrides:
toString in class java.lang.Object
Returns:
the descriptor as a string
Since:
v4r2m0