|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.swt.data.controls.DCUtils
public class DCUtils
Utilities used by Data Controls (i.e. DC* controls).
DataNode
,
DataNodeBinding
Field Summary | |
---|---|
static java.lang.String |
DATANODE_KEY
The key used by the DC* controls to identify a DataNodeBinding object associated with a widget |
static java.lang.String |
EDITOROPTIONS_KEY
The key used by the DC* controls to identify an ICompositeEditorOptions object associated with a widget |
static java.lang.String |
LOADER_KEY
The key used by the DC* controls to identify an ILoader object associated with a widget |
Constructor Summary | |
---|---|
DCUtils()
|
Method Summary | |
---|---|
static ICompositeEditorOptions |
findCompositeEditorOptions(org.eclipse.swt.widgets.Control control,
boolean mustExist)
Returns Composite Editor options associated with the given control. |
static DataNode |
findDataNode(org.eclipse.swt.widgets.Control control,
boolean mustExist)
Returns a DataNode associated with the given control. |
static DataNodeBinding |
findDataNodeBinding(org.eclipse.swt.widgets.Control control,
boolean mustExist)
Finds the DataNodeBinding associated with the provided control. |
static ILoader |
findLoader(org.eclipse.swt.widgets.Control control,
java.lang.String namespace,
boolean mustExist)
Finds an ILoader object associated with the given control. |
static java.lang.String |
getCheckedValue(java.lang.String checkValue,
java.lang.String uncheckValue)
Returns 'true' if checkedValue and uncheckedValue are both empty, otherwise returns the value of checkedValue |
static IDataControl |
getDataControl(org.eclipse.swt.widgets.Control control)
Determines if the provided control is a Data control. |
static java.lang.String |
getUncheckedValue(java.lang.String checkValue,
java.lang.String uncheckValue)
Returns 'false' if checkedValue and uncheckedValue are both empty, otherwise returns the value of uncheckedValue |
static void |
initCompositeEditorOptions(org.eclipse.swt.widgets.Control control,
ICompositeEditorOptions options)
Associates a ICompositeEditorOptions object with the given control. |
static void |
initDataBinding(org.eclipse.swt.widgets.Control control)
Creates a new DataNode, and DataNodeBinding object and associates the DataNodeBinding object with the given control. |
static void |
initLoader(org.eclipse.swt.widgets.Control control,
ILoader loader)
Associates the given ILoader object with the given control. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOADER_KEY
public static final java.lang.String DATANODE_KEY
public static final java.lang.String EDITOROPTIONS_KEY
Constructor Detail |
---|
public DCUtils()
Method Detail |
---|
public static IDataControl getDataControl(org.eclipse.swt.widgets.Control control)
control
- the control under test
public static DataNodeBinding findDataNodeBinding(org.eclipse.swt.widgets.Control control, boolean mustExist)
mustExist
is set
to true.
control
- the control that requires a DataNodeBindingmustExist
- a flag stating whether or not the client calling this method expects a DataNodeBinding to be returned
DataNodeBinding
public static DataNode findDataNode(org.eclipse.swt.widgets.Control control, boolean mustExist)
mustExist
is set
to true.
control
- the control that requires a DataNodemustExist
- a flag stating whether or not the client calling this method expects a DataNode to be returned
DataNode
public static ICompositeEditorOptions findCompositeEditorOptions(org.eclipse.swt.widgets.Control control, boolean mustExist)
mustExist
is set to true.
control
- the control that requires an ICompositeEditorOptionsmustExist
- a flag stating whether or not the client calling this method expects an ICompositeEditorOptions to be returned
ICompositeEditorOptions
public static void initCompositeEditorOptions(org.eclipse.swt.widgets.Control control, ICompositeEditorOptions options)
control
- a control that is to have an ICompositeEditorOptions object associated with itoptions
- the ICompositeEditorOptions objectICompositeEditorOptions
public static ILoader findLoader(org.eclipse.swt.widgets.Control control, java.lang.String namespace, boolean mustExist)
mustExist
is set to true and an ILoader is not
found matching the criteria specified.
control
- the control that requires an ILoadernamespace
- the namespace of the ILoader, must be equal to one of the values returned by ILoader.getNamespaces()
mustExist
- if true, implies that an exception will be thrown if an ILoader is not found.
ILoader
public static void initDataBinding(org.eclipse.swt.widgets.Control control)
control
- the control that the new DataNodeBinding is to be associated withDataNode
,
DataNodeBinding
public static void initLoader(org.eclipse.swt.widgets.Control control, ILoader loader)
control
- the control that the ILoader will be associated withloader
- the ILoader that is to be associated with the controlILoader
public static java.lang.String getCheckedValue(java.lang.String checkValue, java.lang.String uncheckValue)
checkValue
- a string that will cause a checkbox to be checkeduncheckValue
-
public static java.lang.String getUncheckedValue(java.lang.String checkValue, java.lang.String uncheckValue)
checkValue
- uncheckValue
- a string that will cause a checkbox to be unchecked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |