org.eclipse.ocl.examples.emf.validation.validity.ui.ripoffs
Class ContainerSelectionGroup

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.eclipse.ocl.examples.emf.validation.validity.ui.ripoffs.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.


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
view
 
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, int widthHint)
          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, int widthHint)
          Creates the contents of the composite.
protected  void createTreeViewer(int heightHint)
          Returns a new drill down viewer for this dialog.
 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, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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,
                               int widthHint)
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
widthHint - width 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.

Parameters:
container - The container that changed

createContents

public void createContents(java.lang.String message)
Creates the contents of the composite.

Parameters:
message -

createContents

public void createContents(java.lang.String message,
                           int heightHint,
                           int widthHint)
Creates the contents of the composite.

Parameters:
message -
heightHint -
widthHint -

createTreeViewer

protected void createTreeViewer(int heightHint)
Returns a new drill down viewer for this dialog.

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.

Returns:
IPath

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.

Parameters:
container -