de.uka.ipd.sdq.dialogs.selection
Class SelectEObjectDialog

java.lang.Object
  extended by TitleAreaDialog
      extended by de.uka.ipd.sdq.dialogs.selection.SelectEObjectDialog
Direct Known Subclasses:
PalladioSelectEObjectDialog

public abstract class SelectEObjectDialog
extends TitleAreaDialog

Author:
Roman Andrej

Field Summary
protected  String resourceName
          input dialog resource name (Repository,System,..)
 
Constructor Summary
SelectEObjectDialog(Shell parentShell)
          Create the dialog
 
Method Summary
protected abstract  void addModelToResourceSet(Shell shell, String uri)
          add new resource to ResourceSet - delegetad on the subclass
protected  void cancelPressed()
           
protected  void configureShell(Shell newShell)
           
protected  void createButtonsForButtonBar(Composite parent)
           
protected  Control createDialogArea(Composite parent)
           
 void enableToolBar(Boolean addEnabled, Boolean deleteEnabled, Boolean editedEnabled)
          Activated an action border with that actions: Insert, an editing, deletion.
protected  Point getInitialSize()
          Return the initial size of the dialog
 EObject getResult()
           
 EObject getRootOfResult()
           
 TreeViewer getTreeViewer()
           
 int open()
           
protected  void setAddSelectionListener(SelectionListener listener)
           
protected  void setDeleteSelectionListener(SelectionListener listener)
           
protected  void setEditeSelectionListener(SelectionListener listener)
           
protected abstract  void setInputDialogResourceName(Collection<Object> filterList)
          Gives back a resource, which is necessary for this dialog.
 void setProvidedService(Class<?> providedService)
          The function makes possible for validation a selected type element in in the dialogue.
protected  void setResourceName(String resourceName)
           
 void setViewerContentProvider(IContentProvider provider)
           
 void setViewerInput(Object input)
           
 void setViewerLabelProvider(IBaseLabelProvider labelProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceName

protected String resourceName
input dialog resource name (Repository,System,..)

Constructor Detail

SelectEObjectDialog

public SelectEObjectDialog(Shell parentShell)
Create the dialog

Method Detail

configureShell

protected void configureShell(Shell newShell)

createDialogArea

protected Control createDialogArea(Composite parent)

createButtonsForButtonBar

protected void createButtonsForButtonBar(Composite parent)

cancelPressed

protected void cancelPressed()

open

public int open()

getInitialSize

protected Point getInitialSize()
Return the initial size of the dialog


setViewerContentProvider

public void setViewerContentProvider(IContentProvider provider)

setViewerLabelProvider

public void setViewerLabelProvider(IBaseLabelProvider labelProvider)

setViewerInput

public void setViewerInput(Object input)

enableToolBar

public void enableToolBar(Boolean addEnabled,
                          Boolean deleteEnabled,
                          Boolean editedEnabled)
Activated an action border with that actions: Insert, an editing, deletion.

Parameters:
addEnabled - - the new enabled state of insert action deleteEnabled - the new enabled state of delete actio editedEnabled - the new enabled state of edited action If a Action is activated, one must set additionally a SelectionListener
See Also:
de.uka.ipd.sdq.dialogs#setAddSelectionListener(SelectionListener)

setAddSelectionListener

protected void setAddSelectionListener(SelectionListener listener)

setDeleteSelectionListener

protected void setDeleteSelectionListener(SelectionListener listener)

setEditeSelectionListener

protected void setEditeSelectionListener(SelectionListener listener)

setProvidedService

public void setProvidedService(Class<?> providedService)
The function makes possible for validation a selected type element in in the dialogue. If provided service is set, OK button activated only if selected element agrees with entered type. The function must be called forwards open() function!

Parameters:
providedService - - return type of dialog

setInputDialogResourceName

protected abstract void setInputDialogResourceName(Collection<Object> filterList)
Gives back a resource, which is necessary for this dialog. Delegetad on the subclass


addModelToResourceSet

protected abstract void addModelToResourceSet(Shell shell,
                                              String uri)
add new resource to ResourceSet - delegetad on the subclass


getTreeViewer

public TreeViewer getTreeViewer()

getResult

public EObject getResult()

getRootOfResult

public EObject getRootOfResult()

setResourceName

protected void setResourceName(String resourceName)