|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.sqltools.schemaobjecteditor.ui.internal.ui.ResourceAndContainerGroup
public class ResourceAndContainerGroup
Workbench-level composite for resource and container specification by the user. Services such as field validation are performed by the group. The group can be configured to accept existing resources, or only new resources.
This class is copied from org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup
since it is an
internal class, the createExtraContents
method is added to allow subclasses to create extra contents.
Field Summary | |
---|---|
static int |
PROBLEM_CONTAINER_EMPTY
|
static int |
PROBLEM_NAME_INVALID
|
static int |
PROBLEM_NONE
|
static int |
PROBLEM_PATH_INVALID
|
static int |
PROBLEM_PATH_OCCUPIED
|
static int |
PROBLEM_PROJECT_DOES_NOT_EXIST
|
static int |
PROBLEM_RESOURCE_CONTAINS_SEPARATOR
|
static int |
PROBLEM_RESOURCE_EMPTY
|
static int |
PROBLEM_RESOURCE_EXIST
|
Constructor Summary | |
---|---|
ResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener client,
java.lang.String resourceFieldLabel,
java.lang.String resourceType,
boolean showClosedProjects,
int heightHint,
org.eclipse.swt.widgets.Listener listener)
Create an instance of the group to allow the user to enter/select a container and specify a resource name. |
|
ResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener client,
java.lang.String resourceFieldLabel,
java.lang.String resourceType,
boolean showClosedProjects,
org.eclipse.swt.widgets.Listener listener)
Create an instance of the group to allow the user to enter/select a container and specify a resource name. |
|
ResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.widgets.Listener client,
java.lang.String resourceFieldLabel,
java.lang.String resourceType,
org.eclipse.swt.widgets.Listener listener)
Create an instance of the group to allow the user to enter/select a container and specify a resource name. |
Method Summary | |
---|---|
boolean |
areAllValuesValid()
Returns a boolean indicating whether all controls in this group contain valid values. |
org.eclipse.core.runtime.IPath |
getContainerFullPath()
Returns the path of the currently selected container or null if no container has been 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 |
getResource()
Returns a string that is the path of the currently selected container. |
void |
handleEvent(org.eclipse.swt.widgets.Event e)
Handles events for all controls in the group. |
void |
setAllowExistingResources(boolean value)
Sets the flag indicating whether existing resources are permitted. |
void |
setContainerFullPath(org.eclipse.core.runtime.IPath path)
Sets the value of this page's container. |
void |
setFocus()
Gives focus to the resource name field and selects its contents |
void |
setResource(java.lang.String value)
Sets the value of this page's resource name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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_RESOURCE_CONTAINS_SEPARATOR
public static final int PROBLEM_PATH_INVALID
public static final int PROBLEM_CONTAINER_EMPTY
public static final int PROBLEM_PROJECT_DOES_NOT_EXIST
public static final int PROBLEM_NAME_INVALID
public static final int PROBLEM_PATH_OCCUPIED
Constructor Detail |
---|
public ResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener client, java.lang.String resourceFieldLabel, java.lang.String resourceType, org.eclipse.swt.widgets.Listener listener)
parent
- composite widget to parent the groupclient
- object interested in changes to the group's fields valueresourceFieldLabel
- label to use in front of the resource name fieldresourceType
- one word, in lowercase, to describe the resource to the user (file, folder, project)public ResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener client, java.lang.String resourceFieldLabel, java.lang.String resourceType, boolean showClosedProjects, org.eclipse.swt.widgets.Listener listener)
parent
- composite widget to parent the groupclient
- object interested in changes to the group's fields valueresourceFieldLabel
- label to use in front of the resource name fieldresourceType
- one word, in lowercase, to describe the resource to the user (file, folder, project)showClosedProjects
- whether or not to show closed projectspublic ResourceAndContainerGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener client, java.lang.String resourceFieldLabel, java.lang.String resourceType, boolean showClosedProjects, int heightHint, org.eclipse.swt.widgets.Listener listener)
parent
- composite widget to parent the groupclient
- object interested in changes to the group's fields valueresourceFieldLabel
- label to use in front of the resource name fieldresourceType
- one word, in lowercase, to describe the resource to the user (file, folder, project)showClosedProjects
- whether or not to show closed projectsheightHint
- height hint for the container selection widget groupMethod Detail |
---|
public boolean areAllValuesValid()
public org.eclipse.core.runtime.IPath getContainerFullPath()
public java.lang.String getProblemMessage()
public int getProblemType()
public java.lang.String getResource()
public void handleEvent(org.eclipse.swt.widgets.Event e)
handleEvent
in interface org.eclipse.swt.widgets.Listener
e
- org.eclipse.swt.widgets.Eventpublic void setAllowExistingResources(boolean value)
public void setContainerFullPath(org.eclipse.core.runtime.IPath path)
path
- Full path to the container.public void setFocus()
public void setResource(java.lang.String value)
value
- new value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |