org.eclipse.datatools.connectivity.ui.dse.dialogs
Class ProfileSelectionComposite

java.lang.Object
  extended by org.eclipse.datatools.connectivity.ui.dse.dialogs.ProfileSelectionComposite

public class ProfileSelectionComposite
extends java.lang.Object

Composite that hosts the DSE that can be used in a variety of ways. Currently we host the composite on a dialog, but it could also be used on a property, preference, or wizard page where needed.

Author:
brianf

Field Summary
static java.lang.String JDBC_CATEGORY
           
 
Constructor Summary
ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent, int style)
          Simple Constructor
ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String category)
          Constructor with category ID to narrow the profile list
ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String category, boolean limitToProfiles)
          Constructor with category ID and setting to either show or hide profile contents.
ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String category, boolean limitToProfiles, boolean canNew, boolean canConnect, boolean canSelect)
           
ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String category, boolean limitToProfiles, boolean canNew, boolean canConnect, boolean canSelect, boolean createNow)
          Constructor
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Add a change listener
 ProfileSelectionDialogPage createProfileDatabaseSelectionDialogPage()
          Create the dialog page being hosted
 void dispose()
          Dispose of connect listeners
 void fillInDefaultValues()
          Set up the viewer
 java.lang.String getCategory()
          Return the category ID
 java.lang.String getCPName()
          Returns the profile name
 org.eclipse.jface.viewers.ViewerFilter getCustomFilter()
          Returns the custom filter
 ProfileSelectionDialogPage getPage()
          Return the underlying dialog page the composite is hosting
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Remove a change listener.
 void setCategory(java.lang.String category)
          Set the category ID to filter the viewer to
 void setCPName(java.lang.String input)
          Set the profile name if we are to set an initial selection
 void setCustomFilter(org.eclipse.jface.viewers.ViewerFilter input)
          Set a custom filter for viewer contents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JDBC_CATEGORY

public static java.lang.String JDBC_CATEGORY
Constructor Detail

ProfileSelectionComposite

public ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent,
                                 int style)
Simple Constructor

Parameters:
parent -
style -

ProfileSelectionComposite

public ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent,
                                 int style,
                                 java.lang.String category)
Constructor with category ID to narrow the profile list

Parameters:
parent -
style -
category -

ProfileSelectionComposite

public ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent,
                                 int style,
                                 java.lang.String category,
                                 boolean limitToProfiles)
Constructor with category ID and setting to either show or hide profile contents.

Parameters:
parent -
style -
category -
limitToProfiles -

ProfileSelectionComposite

public ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent,
                                 int style,
                                 java.lang.String category,
                                 boolean limitToProfiles,
                                 boolean canNew,
                                 boolean canConnect,
                                 boolean canSelect)

ProfileSelectionComposite

public ProfileSelectionComposite(org.eclipse.swt.widgets.Composite parent,
                                 int style,
                                 java.lang.String category,
                                 boolean limitToProfiles,
                                 boolean canNew,
                                 boolean canConnect,
                                 boolean canSelect,
                                 boolean createNow)
Constructor

Parameters:
parent -
style -
category - - category ID to filter
limitToProfiles - - indicate whether to show or hide profile contents
canNew - - indicate whether user can create a new profile or not
canConnect - - indicate whether user can connect/disconnect profiles
canSelect - - indicate whether user can select one or more profiles
Method Detail

createProfileDatabaseSelectionDialogPage

public ProfileSelectionDialogPage createProfileDatabaseSelectionDialogPage()
Create the dialog page being hosted

Returns:

setCategory

public void setCategory(java.lang.String category)
Set the category ID to filter the viewer to

Parameters:
category -

getCategory

public java.lang.String getCategory()
Return the category ID

Returns:

getPage

public ProfileSelectionDialogPage getPage()
Return the underlying dialog page the composite is hosting

Returns:

fillInDefaultValues

public void fillInDefaultValues()
Set up the viewer


getCPName

public java.lang.String getCPName()
Returns the profile name

Returns:

setCPName

public void setCPName(java.lang.String input)
Set the profile name if we are to set an initial selection

Parameters:
input -

getCustomFilter

public org.eclipse.jface.viewers.ViewerFilter getCustomFilter()
Returns the custom filter

Returns:

setCustomFilter

public void setCustomFilter(org.eclipse.jface.viewers.ViewerFilter input)
Set a custom filter for viewer contents

Parameters:
input -

dispose

public void dispose()
Dispose of connect listeners


addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)
Add a change listener

Parameters:
listener -

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a change listener.

Parameters:
listener -