## org.eclipse.datatools.sqltools.result.internal.ui.export
Class ContainerSelectionGroup

    java.lang.Object
      org.eclipse.swt.widgets.Widget
          org.eclipse.swt.widgets.Control
              org.eclipse.swt.widgets.Scrollable
                  org.eclipse.swt.widgets.Composite
                      org.eclipse.datatools.sqltools.result.internal.ui.export.ContainerSelectionGroup

All Implemented Interfaces:
  org.eclipse.swt.graphics.Drawable

    public class ContainerSelectionGroup

extends org.eclipse.swt.widgets.Composite

Workbench-level composite for choosing a container.

This class is copied from `org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup`, adding a "Create Project" button to allow user to create project on this UI section.

Author:
  Dafan Yang

Field Summary

Fields inherited from class org.eclipse.swt.widgets.Composite
`embeddedHandle`

Fields inherited from class org.eclipse.swt.widgets.Widget
`handle`

Constructor Summary
`ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener listener, boolean allowNewContainerName)` Creates a new instance of the widget.
`ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener listener, boolean allowNewContainerName, java.lang.String message)` Creates a new instance of the widget.
`ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener listener, boolean allowNewContainerName, java.lang.String message, boolean showClosedProjects)` Creates a new instance of the widget.
`ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.widgets.Listener listener, boolean allowNewContainerName, java.lang.String message, boolean showClosedProjects, int heightHint)` Creates a new instance of the widget.

Method Summary
`void` `containerSelectionChanged(org.eclipse.core.resources.IContainer container)` The container selection has changed in the tree view.
`void` `createContents(java.lang.String message)` Creates the contents of the composite.
`void` `createContents(java.lang.String message, int heightHint)` Creates the contents of the composite.
`org.eclipse.core.runtime.IPath` `getContainerFullPath()` Returns the currently entered container name.
`void` `setInitialFocus()` Gives focus to one of the widgets in the group, as determined by the group.
`void` `setSelectedContainer(org.eclipse.core.resources.IContainer container)` Sets the selected existing container.

Methods inherited from class org.eclipse.swt.widgets.Composite
`changed, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList`

Methods inherited from class org.eclipse.swt.widgets.Scrollable
`computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar`

Methods inherited from class org.eclipse.swt.widgets.Control

`addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update`

Methods inherited from class org.eclipse.swt.widgets.Widget
`addDisposeListener, addListener, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ContainerSelectionGroup

    public ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent,
                                   org.eclipse.swt.widgets.Listener listener,
                                   boolean allowNewContainerName)

  Creates a new instance of the widget.

  Parameters:
    `parent` - The parent widget of the group.
    `listener` - A listener to forward events to. Can be null if no listener is required.
    `allowNewContainerName` - Enable the user to type in a new container name instead of just selecting from the existing ones.

### ContainerSelectionGroup

    public ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent,
                                   org.eclipse.swt.widgets.Listener listener,
                                   boolean allowNewContainerName,
                                   java.lang.String message)

  Creates a new instance of the widget.

  Parameters:
    `parent` - The parent widget of the group.
    `listener` - A listener to forward events to. Can be null if no listener is required.
    `allowNewContainerName` - Enable the user to type in a new container name instead of just selecting from the existing ones.
    `message` - The text to present to the user.

### ContainerSelectionGroup

    public ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent,
                                   org.eclipse.swt.widgets.Listener listener,
                                   boolean allowNewContainerName,
                                   java.lang.String message,
                                   boolean showClosedProjects)

  Creates a new instance of the widget.

  Parameters:
    `parent` - The parent widget of the group.
    `listener` - A listener to forward events to. Can be null if no listener is required.
    `allowNewContainerName` - Enable the user to type in a new container name instead of just selecting from the existing ones.
    `message` - The text to present to the user.
    `showClosedProjects` - Whether or not to show closed projects.

### ContainerSelectionGroup

    public ContainerSelectionGroup(org.eclipse.swt.widgets.Composite parent,
                                   org.eclipse.swt.widgets.Listener listener,
                                   boolean allowNewContainerName,
                                   java.lang.String message,
                                   boolean showClosedProjects,
                                   int heightHint)

  Creates a new instance of the widget.

  Parameters:
    `parent` - The parent widget of the group.
    `listener` - A listener to forward events to. Can be null if no listener is required.
    `allowNewContainerName` - Enable the user to type in a new container name instead of just selecting from the existing ones.
    `message` - The text to present to the user.
    `showClosedProjects` - Whether or not to show closed projects.
    `heightHint` - height hint for the drill down composite

Method Detail

### containerSelectionChanged

    public void containerSelectionChanged(org.eclipse.core.resources.IContainer container)

  The container selection has changed in the tree view. Update the container name field value and notify all listeners.

### createContents

    public void createContents(java.lang.String message)

  Creates the contents of the composite.

### createContents

    public void createContents(java.lang.String message,
                               int heightHint)

  Creates the contents of the composite.

  Parameters:
    `heightHint` - height hint for the drill down composite

### getContainerFullPath

    public org.eclipse.core.runtime.IPath getContainerFullPath()

  Returns the currently entered container name. Null if the field is empty. Note that the container may not exist yet if the user entered a new container name in the field.

### setInitialFocus

    public void setInitialFocus()

  Gives focus to one of the widgets in the group, as determined by the group.

### setSelectedContainer

    public void setSelectedContainer(org.eclipse.core.resources.IContainer container)

  Sets the selected existing container.