Runtime

## org.eclipse.gmf.runtime.common.ui.dialogs
Class ShowHideRelationshipsDialog

    java.lang.Object
      org.eclipse.jface.window.Window
          org.eclipse.jface.dialogs.Dialog
              org.eclipse.gmf.runtime.common.ui.dialogs.ShowHideRelationshipsDialog

All Implemented Interfaces:
  IShellProvider

public class ShowHideRelationshipsDialog
extends Dialog

Show Hide Relationships dialog box, called from an action. When OK is clicked, returns Window.OK and result of the dialog is saved. When Cancel is clicked, returns Window.Cancel and result of dialog is not saved.

Nested Class Summary

Nested classes inherited from class org.eclipse.jface.window.Window
`Window.IExceptionHandler`

Field Summary

Fields inherited from class org.eclipse.jface.dialogs.Dialog
`blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS`

Fields inherited from class org.eclipse.jface.window.Window
`CANCEL, OK`

Constructor Summary
`ShowHideRelationshipsDialog(Shell parentShell, SelectableElement aRootElement)` Constructor takes the parent shell and data to add into the viewer

Method Summary
`protected Control` `createContents(Composite parent)` Makes the dialog
`protected void` `createViewer(Composite parent)` Make the tree viewer on the left side of the dialog
`void` `disposeImages()` Disposes the images for the legend box
`SelectableElement` `getRootElement()` Returns the root element of the RelatedElements that were in the viewer control at the left of the dialog.
`java.util.List` `getSelectedRelationshipTypes()` Returns a list of the selected relationship types.
`protected TreeViewer` `getTreeViewer()` Returns the tree viewer
`java.util.List` `getUnselectedRelationshipTypes()` Returns a list of the unselected relationship types.
`void` `initHelpContextId(java.lang.String helpId)` Initialize the context sensitive help id.
`protected void` `makeButtons(Composite parent)` Makes the buttons at the bottom of the dialog
`protected void` `performOk()` OK button click handler
`protected void` `setTreeViewer(TreeViewer aViewer)` Sets the tree viewer

Methods inherited from class org.eclipse.jface.dialogs.Dialog

`applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText`

Methods inherited from class org.eclipse.jface.window.Window

`canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager`

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

Constructor Detail

### ShowHideRelationshipsDialog

    public ShowHideRelationshipsDialog(Shell parentShell,
                                       SelectableElement aRootElement)

  Constructor takes the parent shell and data to add into the viewer

Parameters:
  `parentShell` - the parent Shell
  `aRootElement` - the root SelectableElement to add into the viewer

Method Detail

### getTreeViewer

    protected TreeViewer getTreeViewer()

  Returns the tree viewer

  Returns:
    TreeViewer on the left side of the dialog

### setTreeViewer

    protected void setTreeViewer(TreeViewer aViewer)

  Sets the tree viewer

  Parameters:
    `aViewer` - is the TreeViewer on the left side of the dialog

### createViewer

    protected void createViewer(Composite parent)

  Make the tree viewer on the left side of the dialog

  Parameters:
    `parent` - the parent Composite

### makeButtons

    protected void makeButtons(Composite parent)

  Makes the buttons at the bottom of the dialog

  Parameters:
    `parent` - the parent Composite

### createContents

    protected Control createContents(Composite parent)

  Makes the dialog

  Parameters:
    `parent` - the parent Composite
  Returns:
    Control the parent Composite

### performOk

    protected void performOk()

  OK button click handler

### getRootElement

    public SelectableElement getRootElement()

  Returns the root element of the RelatedElements that were in the viewer control at the left of the dialog.

  Returns:
    SelectableElement with the root element.

### getSelectedRelationshipTypes

    public java.util.List getSelectedRelationshipTypes()

  Returns a list of the selected relationship types.

  Returns:
    List of the selected relationship types

### getUnselectedRelationshipTypes

    public java.util.List getUnselectedRelationshipTypes()

  Returns a list of the unselected relationship types.

  Returns:
    List of the unselected relationship types

### initHelpContextId

    public void initHelpContextId(java.lang.String helpId)

  Initialize the context sensitive help id.

  Parameters:
    `helpId` - the help context id string

### disposeImages

    public void disposeImages()

  Disposes the images for the legend box

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.