SPT RWT Application API

com.sptci.rwt.webui
Class ConnectionDialogue

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by consultas.echo2consultas.SpWindowPane
          extended by com.sptci.echo2.WindowPane
              extended by com.sptci.rwt.webui.ConnectionDialogue
All Implemented Interfaces:
com.sptci.echo2.View, Serializable, FloatingPane, ModalSupport, Pane, PaneContainer, RenderIdSupport

public class ConnectionDialogue
extends com.sptci.echo2.WindowPane

The dialogue used to initiate a new JDBC Connection. Also used to save/edit pre-configured connections.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: ConnectionDialogue.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-09-30
See Also:
Serialized Form

Nested Class Summary
protected  class ConnectionDialogue.CancelListener
          The ActionListener that cancels (closes) this connection dialogue.
protected  class ConnectionDialogue.DatabaseTypeListener
          The ActionListener that updates port depending upon the selections made in databaseType.
 
Field Summary
private  Column column
          The container used to display all the components.
private  MainController controller
          The main controller for the application.
private  TextField database
          The name of the database to connect to.
private  SelectField databaseType
          The component used to display configured database engines.
private  TextField host
          The component used to specify the hostname of the database server.
private  PasswordField password
          The component used to enter the password to logon with.
private  consultas.echo2consultas.LiveTextField port
          The port on wich the database listens for connections.
private  TextField userName
          The component used to enter the user name to login as.
 
Fields inherited from class consultas.echo2consultas.SpWindowPane
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, INPUT_CLOSE, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_CLOSABLE, PROPERTY_CLOSE_ICON, PROPERTY_CLOSE_ICON_INSETS, PROPERTY_DEFAULT_CLOSE_OPERATION, PROPERTY_HEIGHT, PROPERTY_ICON, PROPERTY_ICON_INSETS, PROPERTY_INSETS, PROPERTY_MAXIMIZABLE, PROPERTY_MAXIMIZE_ICON, PROPERTY_MAXIMIZE_ICON_INSETS, PROPERTY_MAXIMIZED, PROPERTY_MAXIMUM_HEIGHT, PROPERTY_MAXIMUM_WIDTH, PROPERTY_MINIMIZABLE, PROPERTY_MINIMIZE_ICON, PROPERTY_MINIMIZE_ICON_INSETS, PROPERTY_MINIMIZED, PROPERTY_MINIMUM_HEIGHT, PROPERTY_MINIMUM_WIDTH, PROPERTY_MOVABLE, PROPERTY_POSITION_X, PROPERTY_POSITION_Y, PROPERTY_RESIZABLE, PROPERTY_TITLE, PROPERTY_TITLE_BACKGROUND, PROPERTY_TITLE_BACKGROUND_IMAGE, PROPERTY_TITLE_FONT, PROPERTY_TITLE_FOREGROUND, PROPERTY_TITLE_HEIGHT, PROPERTY_TITLE_INSETS, PROPERTY_WIDTH, Z_INDEX_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo2.app.ModalSupport
MODAL_CHANGED_PROPERTY
 
Constructor Summary
ConnectionDialogue(MainController controller)
          Create a new instance blank of the view.
 
Method Summary
protected  Component createButtons()
          Create the component used to display the control butons for the dialogue.
protected  Component createDatabaseType()
          Initialise the databaseType field with the localised values.
protected  Component createPort()
          Initialise the port field with the localised values.
protected  Component createSave()
          Create the PopUp component used to display the component used to capture user input on the name to assign to save the JDBC connection parameters represented by this component.
protected  String getDatabase()
          Return the name of the database (instance) to connect to.
protected  String getDatabaseType()
          Return the database engine that was selected.
protected  String getHost()
          Return the hostname of the database server as entered in the view.
protected  String getPassword()
          Return the password to use to login to the database server.
protected  int getPort()
          Return the port on which the database server listens for connections.
protected  String getUserName()
          Return the user name to logon to the database server as.
private  void initComponents()
          Initialises all the view components.
protected  void setDatabase(String value)
          Sets the value displayed in the database component.
protected  void setDatabaseType(String value)
          Sets the selected item in databaseType to the value specified.
protected  void setHost(String value)
          Sets the value displayed in the host component.
protected  void setPassword(String value)
          Sets the value displayed in the password component.
protected  void setPort(int value)
          Sets the value displayed in port component.
protected  void setUserName(String value)
          Sets the value displayed in the userName component.
 
Methods inherited from class com.sptci.echo2.WindowPane
init
 
Methods inherited from class consultas.echo2consultas.SpWindowPane
addWindowPaneListener, fireWindowClosing, getBackgroundImage, getBorder, getCloseIcon, getCloseIconInsets, getDefaultCloseOperation, getHeight, getIcon, getIconInsets, getInsets, getMaximizeIcon, getMaximizeIconInsets, getMaximumHeight, getMaximumWidth, getMinimizeIcon, getMinimizeIconInsets, getMinimumHeight, getMinimumWidth, getPositionX, getPositionY, getTitle, getTitleBackground, getTitleBackgroundImage, getTitleFont, getTitleForeground, getTitleHeight, getTitleInsets, getWidth, getZIndex, isClosable, isMaximizable, isMaximized, isMinimizable, isMinimized, isModal, isMovable, isResizable, isValidChild, isValidParent, processInput, removeWindowPaneListener, setBackgroundImage, setBorder, setClosable, setCloseIcon, setCloseIconInsets, setDefaultCloseOperation, setHeight, setIcon, setIconInsets, setInsets, setMaximizable, setMaximized, setMaximumHeight, setMaximumWidth, setMinimizable, setMinimized, setMinimumHeight, setMinimumWidth, setModal, setMovable, setPositionX, setPositionY, setResizable, setTitle, setTitleBackground, setTitleBackgroundImage, setTitleFont, setTitleForeground, setTitleHeight, setTitleInsets, setWidth, setZIndex, userClose
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller

private final MainController controller
The main controller for the application.


column

private final Column column
The container used to display all the components.


databaseType

private SelectField databaseType
The component used to display configured database engines.


host

private TextField host
The component used to specify the hostname of the database server.


port

private consultas.echo2consultas.LiveTextField port
The port on wich the database listens for connections.


database

private TextField database
The name of the database to connect to.


userName

private TextField userName
The component used to enter the user name to login as.


password

private PasswordField password
The component used to enter the password to logon with.

Constructor Detail

ConnectionDialogue

public ConnectionDialogue(MainController controller)
Create a new instance blank of the view.

Parameters:
controller - The controller to use.
Method Detail

initComponents

private void initComponents()
Initialises all the view components.

See Also:
Utilities.createTextField( String, String, String, Object ), createDatabaseType(), createPort(), createButtons()

createDatabaseType

protected Component createDatabaseType()
Initialise the databaseType field with the localised values.

Returns:
The initialised databaseType component.

createPort

protected Component createPort()
Initialise the port field with the localised values.

Returns:
The initialised port component.

createButtons

protected Component createButtons()
Create the component used to display the control butons for the dialogue.

Returns:
The container component with the buttons.
See Also:
createSave()

createSave

protected Component createSave()
Create the PopUp component used to display the component used to capture user input on the name to assign to save the JDBC connection parameters represented by this component.

Returns:
The component used to capture user input.

getDatabaseType

protected String getDatabaseType()
Return the database engine that was selected.

Returns:
The database type selected.

setDatabaseType

protected void setDatabaseType(String value)
Sets the selected item in databaseType to the value specified.

Parameters:
value - The name to set as selected.

getHost

protected String getHost()
Return the hostname of the database server as entered in the view.

Returns:
The hastname of the server to connect to.

setHost

protected void setHost(String value)
Sets the value displayed in the host component.

Parameters:
value - The value to display.

getPort

protected int getPort()
Return the port on which the database server listens for connections.

Returns:
The port number.

setPort

protected void setPort(int value)
Sets the value displayed in port component.

Parameters:
value - The value to display.

getDatabase

protected String getDatabase()
Return the name of the database (instance) to connect to.

Returns:
The name of the database to connect to.

setDatabase

protected void setDatabase(String value)
Sets the value displayed in the database component.

Parameters:
value - The value to display.

getUserName

protected String getUserName()
Return the user name to logon to the database server as.

Returns:
The user name as entered.

setUserName

protected void setUserName(String value)
Sets the value displayed in the userName component.

Parameters:
value - The value to display.

getPassword

protected String getPassword()
Return the password to use to login to the database server.

Returns:
The password as entered.

setPassword

protected void setPassword(String value)
Sets the value displayed in the password component.

Parameters:
value - The value to display.

SPT RWT Application API