|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.carma.ui.widget.CARMAResourceAndContainerGroup
public class CARMAResourceAndContainerGroup
A widget which allows users to select a CARMA resource in the CARMA hierarchy. The
parent selection can be retrieved from the getParentContainer() method. The
widget also provides a text input box to allow the user to input a resource name in
addition to CARMA Resource selection.
| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
static int |
PROBLEM_CONTAINER_EMPTY
|
static int |
PROBLEM_NONE
|
static int |
PROBLEM_RESOURCE_EMPTY
|
static int |
PROBLEM_RESOURCE_EXIST
|
| Constructor Summary | |
|---|---|
CARMAResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener listener,
java.lang.String resourceLabel,
int resourceType)
Creates the widget with the default height |
|
CARMAResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener listener,
java.lang.String resourceLabel,
int resourceType,
int height)
Creates the widget |
|
CARMAResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener listener,
java.lang.String resourceLabel,
int resourceType,
int height,
boolean checkNames)
Creates the widget |
|
| Method Summary | |
|---|---|
ResourceContainer |
getParentContainer()
Return the container selected by the widget or null if no container is selected |
java.lang.String |
getProblemMessage()
Returns an error message indicating the current problem with the value of a control in the group, or an empty message if all controls in the group contain valid values. |
int |
getProblemType()
Returns the type of problem with the value of a control in the group. |
java.lang.String |
getResourceName()
Returns the name of the resource as specified by the user in the widget. |
void |
handleEvent(org.eclipse.swt.widgets.Event event)
|
boolean |
isCheckDuplicateNames()
Returns true if the group will validate that the resource name is not duplicating an existing resource name |
boolean |
isControlValid()
Returns true when all the values entered by the user are considered valid |
void |
setCheckDuplicateNames(boolean checkDuplicateNames)
Set to true if the group should validate that the resource name is unique in the parent container |
void |
setFocus()
Assigns the focus to the resource name field |
void |
setParentContainer(ResourceContainer container)
Sets the value of the container to select in the widget display |
void |
setResourceName(java.lang.String newName)
Sets the name the will be shown to the user in the resource name field. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COPYRIGHT
public static final int PROBLEM_NONE
public static final int PROBLEM_RESOURCE_EMPTY
public static final int PROBLEM_RESOURCE_EXIST
public static final int PROBLEM_CONTAINER_EMPTY
| Constructor Detail |
|---|
public CARMAResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener listener,
java.lang.String resourceLabel,
int resourceType)
parent - a widget which will be the parent of the new instance (cannot be null)listener - listener to notify of changes in the resource selectionresourceLabel - the label to display next to the resource name inputresourceType - type of resource the widget is querying for
public CARMAResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener listener,
java.lang.String resourceLabel,
int resourceType,
int height)
parent - a widget which will be the parent of the new instance (cannot be null)listener - listener to notify of changes in the resource selectionresourceLabel - the label to display next to the resource name inputresourceType - type of resource the widget is querying forheight - height to assign to the widget
public CARMAResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener listener,
java.lang.String resourceLabel,
int resourceType,
int height,
boolean checkNames)
parent - a widget which will be the parent of the new instance (cannot be null)listener - listener to notify of changes in the resource selectionresourceLabel - the label to display next to the resource name inputresourceType - type of resource the widget is querying forheight - height to assign to the widgetcheckNames - flag to indicate an error when duplicate names are detected for the given resource input| Method Detail |
|---|
public void handleEvent(org.eclipse.swt.widgets.Event event)
handleEvent in interface org.eclipse.swt.widgets.Listenerpublic java.lang.String getProblemMessage()
public int getProblemType()
public boolean isControlValid()
public boolean isCheckDuplicateNames()
public void setCheckDuplicateNames(boolean checkDuplicateNames)
checkDuplicateNames - true if duplication name validation should be activated.public java.lang.String getResourceName()
public void setResourceName(java.lang.String newName)
newName - public ResourceContainer getParentContainer()
public void setParentContainer(ResourceContainer container)
container - the container that should be selected in the widget displaypublic void setFocus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||