vocleditor.dialog
Class ContextPropertiesDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TitleAreaDialog
              extended by vocleditor.dialog.ContextPropertiesDialog
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.window.IShellProvider, org.eclipse.swt.events.ModifyListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class ContextPropertiesDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog
implements org.eclipse.swt.events.SelectionListener, org.eclipse.swt.events.ModifyListener

Dialog to modify Context properties

Author:
bjoern

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DLG_IMG_ERROR, 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
ContextPropertiesDialog(org.eclipse.swt.widgets.Shell parentShell, VOCLModel.Context context)
          Constructs a ContextPropertiesDialog
 
Method Summary
 VOCLModel.ClassifierRole getContextClassifier()
          Returns the classifier role of the context.
 VOCLModel.Method getContextMethod()
          Returns the method of the context.
 java.lang.String getContextName()
          Returns the context name.
 java.lang.String getContextType()
          Returns the context type selected in this dialog ("inv", "pre" or "post").
 boolean getIsClassifier()
          Returns true if the context is a classifier.
 void modifyText(org.eclipse.swt.events.ModifyEvent e)
          implementation of ModifyListener.modifyText() used to show error messages and disable ok button on incomplete input
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
          Widged default selected listener.
 void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
          listens and reacts to "Add", "Edit" and "Delete" buttons
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, close, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, create, getBlockedHandler, getImage, setBlockedHandler, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
getDefaultImage, getDefaultImages, getDefaultOrientation, getReturnCode, getShell, getWindowManager, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setWindowManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextPropertiesDialog

public ContextPropertiesDialog(org.eclipse.swt.widgets.Shell parentShell,
                               VOCLModel.Context context)
Constructs a ContextPropertiesDialog

Parameters:
parentShell - parent shell
context - the Contex to be shown/modified
Method Detail

modifyText

public void modifyText(org.eclipse.swt.events.ModifyEvent e)
implementation of ModifyListener.modifyText() used to show error messages and disable ok button on incomplete input

Specified by:
modifyText in interface org.eclipse.swt.events.ModifyListener

getContextType

public java.lang.String getContextType()
Returns the context type selected in this dialog ("inv", "pre" or "post").

Returns:
the context type selected in this dialog ("inv", "pre" or "post")

getContextName

public java.lang.String getContextName()
Returns the context name.

Returns:
the context name

getIsClassifier

public boolean getIsClassifier()
Returns true if the context is a classifier.

Returns:
true if the context is a classifier

getContextClassifier

public VOCLModel.ClassifierRole getContextClassifier()
Returns the classifier role of the context.

Returns:
the classifier role of the context

getContextMethod

public VOCLModel.Method getContextMethod()
Returns the method of the context.

Returns:
the method of the context

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
listens and reacts to "Add", "Edit" and "Delete" buttons

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
Widged default selected listener.

Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener
See Also:
SelectionListener.widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)