com.ibm.as400.ui.framework.java
Class Capabilities
java.lang.Object
|
+--com.ibm.as400.ui.framework.java.Capabilities
- public class Capabilities
- extends java.lang.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 HandlerTask
s, 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.
- Since:
- v4r2m0
- See Also:
DataBean
,
HandlerTask
Constructor Summary |
Capabilities()
Constructs a Capabilities object. |
Method Summary |
HandlerTask[] |
getHandlerTasksFor(java.lang.String attribute)
Returns a list of HandlerTask s associated with
an unsupported attribute. |
boolean |
isCapable(java.lang.String attribute)
Determines whether the DataBean associated with this object
supports a particular attribute. |
void |
setCapable(java.lang.String attribute)
Sets an indication that a particular attribute is supported by
the DataBean associated with this object. |
void |
setNotCapable(java.lang.String attribute,
HandlerTask[] handlerTasks)
Sets an indication that a particular attribute is not supported by
the DataBean associated with this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Capabilities
public Capabilities()
- Constructs a
Capabilities
object.
- Since:
- v4r2m0
setNotCapable
public void setNotCapable(java.lang.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 HandlerTask
s with the attribute. The HandlerTask
s
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 sethandlerTasks
- an array of HandlerTask
objects (may be null)- Since:
- v4r2m0
- See Also:
setCapable(java.lang.String)
,
HandlerTask
setCapable
public void setCapable(java.lang.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- Since:
- v4r2m0
- See Also:
setNotCapable(java.lang.String, com.ibm.as400.ui.framework.java.HandlerTask[])
isCapable
public boolean isCapable(java.lang.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. - Since:
- v4r2m0
getHandlerTasksFor
public HandlerTask[] getHandlerTasksFor(java.lang.String attribute)
- Returns a list of
HandlerTask
s associated with
an unsupported attribute. If the attribute is supported, or if there are
no HandlerTask
s 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
HandlerTask
s - Since:
- v4r2m0
- See Also:
HandlerTask