g-Eclipse
Release 1.0.0

eu.geclipse.ui.widgets
Class GridConnectionDefinitionComposite

java.lang.Object
  extended by Composite
      extended by eu.geclipse.ui.widgets.GridConnectionDefinitionComposite

public class GridConnectionDefinitionComposite
extends Composite

A composite for specifying the settings of a new connection. In fact it holds all necessary widgets to create an URI with any of the available constructors. It may be contextualized with the eu.geclipse.ui.efs extension point.


Constructor Summary
GridConnectionDefinitionComposite(IGridContainer mountPoint, Composite parent, int style)
          Create a new connection definition composite.
 
Method Summary
 void addModifyListener(ModifyListener l)
          Add a ModifyListener to the list of listeners.
 java.lang.String getErrorMessage()
          Get the cached error message if any or null otherwise.
 java.net.URI getURI()
          Construct a URI from the currently specified parameters.
 boolean isValid()
          Validates the current settings of the composite controls.
 void removeModifyListener(ModifyListener l)
          Removes the specified listener from the list of listeners.
 void setURI(java.net.URI uri)
          Set the URI represented by the controls of this composite.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridConnectionDefinitionComposite

public GridConnectionDefinitionComposite(IGridContainer mountPoint,
                                         Composite parent,
                                         int style)
Create a new connection definition composite.

Parameters:
parent - The parent of the composite.
style - The composite's style.
Method Detail

addModifyListener

public void addModifyListener(ModifyListener l)
Add a ModifyListener to the list of listeners. Modify listeners are informed whenever a URI specific token was edited.

Parameters:
l - The listener to be added.

getErrorMessage

public java.lang.String getErrorMessage()
Get the cached error message if any or null otherwise.

Returns:
The error message of the last critical operation or null if this operation did not cause an error.

getURI

public java.net.URI getURI()
Construct a URI from the currently specified parameters. If this method fails to construct a URI it returns null. In this case getErrorMessage() will return an appropriate error message.

Returns:
A URI from the currently specified parameters or null in the case of an error.

isValid

public boolean isValid()
Validates the current settings of the composite controls. If any setting turns out to be invalid false will be returned. In this case getErrorMessage() will contain an appropriate error message.

Returns:
True if all settings are valid, false otherwise.

removeModifyListener

public void removeModifyListener(ModifyListener l)
Removes the specified listener from the list of listeners.

Parameters:
l - The ModifyListener to be removed.

setURI

public void setURI(java.net.URI uri)
Set the URI represented by the controls of this composite. No validation is done by this method.

Parameters:
uri - The URI to be set.

g-Eclipse
Release 1.0.0