de.cau.cs.kieler.uml2.sim.kiem
Class SelectTraceDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by de.cau.cs.kieler.uml2.sim.kiem.SelectTraceDialog
All Implemented Interfaces:
IShellProvider

public class SelectTraceDialog
extends Dialog

The Class AddDataComponentDialog.

Rating proposed yellow
(2009-01-15)

Nested Class Summary
 
Nested classes/interfaces 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
SelectTraceDialog(Shell parent, String titleParam)
          Instantiates a dialog.
 
Method Summary
 boolean checkMultipleInstanceOk(String component)
          Check if multiple instances of a DataComponent are okay and if not check if there already is another instance in the original DataComponentWrapperList.
protected  void configureShell(Shell newShell)
           
protected  Control createDialogArea(Composite parent)
           
protected  Point getInitialSize()
           
 List<String> getSelectedComponents()
          Gets the selected components.
 int getSelectedIndex()
          Gets the selected index.
 void refreshEnabledDisabledTextColors()
          Refreshes the enabled/disabled text colors of the DataComponent selection list.
 void setComponentList(List<String> components)
          Sets the component list.
 void setForbiddenComponentList(List<String> forbiddenComponentListParam)
          Sets the DataComponentEsList.
 
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, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, 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

SelectTraceDialog

public SelectTraceDialog(Shell parent,
                         String titleParam)
Instantiates a dialog.

Parameters:
parent - the SWT parent of this dialog
Method Detail

configureShell

protected void configureShell(Shell newShell)
Overrides:
configureShell in class Window

createDialogArea

protected Control createDialogArea(Composite parent)
Overrides:
createDialogArea in class Dialog

getInitialSize

protected Point getInitialSize()
Overrides:
getInitialSize in class Dialog

getSelectedIndex

public int getSelectedIndex()
Gets the selected index.

Returns:
the selected index

setComponentList

public void setComponentList(List<String> components)
Sets the component list. The component list should hold all available default DataComponents and is used to update the table. This should be provided by the calling instance.

Parameters:
dataComponents - the new component list

setForbiddenComponentList

public void setForbiddenComponentList(List<String> forbiddenComponentListParam)
Sets the DataComponentEsList. It is used to check for multiple instances. It should hold all DataComponentWrapper's that are in the original list of the KiemView to check if another instance of a DataComponent can safely be added.
This should be provided by the calling instance.

Parameters:
dataComponentWrapperListParam - the new component list

getSelectedComponents

public List<String> getSelectedComponents()
Gets the selected components. This is normally called after the user has selected and chosen DataComponents and already closed the dialog.

Returns:
the selected DataComponents for which DataComponentWrappers has to be created by the calling instance

checkMultipleInstanceOk

public boolean checkMultipleInstanceOk(String component)
Check if multiple instances of a DataComponent are okay and if not check if there already is another instance in the original DataComponentWrapperList. If the latter is the case then return false. In any other case it is okay to add another instance of this DataComponent so this method returns true.

Parameters:
component - the DataComponent that we want to check on
Returns:
true, if another instance of this DataComponent is allowed

refreshEnabledDisabledTextColors

public void refreshEnabledDisabledTextColors()
Refreshes the enabled/disabled text colors of the DataComponent selection list. In case a DataComponent is NOT multiple instantiable and there already is one instance in the original DataComponentWrapperList (of the KiemView) then we indicate this by a grayed colorDisabled.