All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

java.lang.Object
   |
   +----com.ibm.as400.ui.framework.java.Capabilities

public class Capabilities
extends Object
Defines the capabilities of a DataBean by encapsulating a list of unsupported attributes. Clients of the DataBean can query its associated Capabilities object to learn whether a particular attribute is supported.

A list of instructions, or HandlerTasks, may optionally be associated with each unsupported attribute. These instructions are carried out by the UI framework. Typically they involve disabling or removing certain UI components from a panel.

See Also:
DataBean, HandlerTask

Constructor Index

 o Capabilities()
Constructs a Capabilities object.

Method Index

 o getHandlerTasksFor(String)
Returns a list of HandlerTasks associated with an unsupported attribute.
 o isCapable(String)
Determines whether the DataBean associated with this object supports a particular attribute.
 o setCapable(String)
Sets an indication that a particular attribute is supported by the DataBean associated with this object.
 o setNotCapable(String, HandlerTask[])
Sets an indication that a particular attribute is not supported by the DataBean associated with this object.

Constructors

 o Capabilities
 public Capabilities()
Constructs a Capabilities object.

Methods

 o setNotCapable
 public void setNotCapable(String attribute,
                           HandlerTask handlerTasks[])
Sets an indication that a particular attribute is not supported by the DataBean associated with this object. Optionally associates a list of HandlerTasks with the attribute. The HandlerTasks indicate which panel components are affected by the unsupported attribute, and what action should be taken on them.

Parameters:
attribute - the attribute for which the indication is to be set
handlerTasks - an array of HandlerTask objects (may be null)
See Also:
setCapable, HandlerTask
 o setCapable
 public void setCapable(String attribute)
Sets an indication that a particular attribute is supported by the DataBean associated with this object.

Parameters:
attribute - the attribute for which the indication is to be set
See Also:
setNotCapable
 o isCapable
 public boolean isCapable(String attribute)
Determines whether the DataBean associated with this object supports a particular attribute.

Parameters:
attribute - the attribute to be checked
Returns:
true if the DataBean supports the specified attribute; false otherwise.
 o getHandlerTasksFor
 public HandlerTask[] getHandlerTasksFor(String attribute)
Returns a list of HandlerTasks associated with an unsupported attribute. If the attribute is supported, or if there are no HandlerTasks associated with the attribute, this method returns an array of length 0.

Parameters:
attribute - the attribute for which handler tasks are to be returned
Returns:
an array of HandlerTasks
See Also:
HandlerTask

All Packages  Class Hierarchy  This Package  Previous  Next  Index