vocleditor.dialog
Class AttributePropertiesDialog

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.AttributePropertiesDialog
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 AttributePropertiesDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog
implements org.eclipse.swt.events.SelectionListener, org.eclipse.swt.events.ModifyListener

Author:
bjoern, stefan JFace based dialog used to edit Attribute properties

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
AttributePropertiesDialog(org.eclipse.swt.widgets.Shell parentShell, VOCLModel.Constraint constraint, VOCLModel.ClassifierRole classifierRole, VOCLModel.Attribute attribute)
          Constructs a new AttributePropertiesDialog
AttributePropertiesDialog(org.eclipse.swt.widgets.Shell parentShell, VOCLModel.Constraint constraint, VOCLModel.ClassifierRole classifierRole, VOCLModel.Attribute attribute, java.util.List newVariableNames, java.util.List newNames, java.util.List newTypes)
          Constructs a new AttributePropertiesDialog
 
Method Summary
 java.lang.String getName()
          Returns the attribute name.
 java.lang.String getType()
          Returns the attribute type.
 java.lang.String getValue()
          Returns the attribute value.
 java.lang.String getVariableName()
          Returns the name of the attribute variable.
 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 event)
          Widged default selected listener.
 void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
          Widged selected listener.
 
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

AttributePropertiesDialog

public AttributePropertiesDialog(org.eclipse.swt.widgets.Shell parentShell,
                                 VOCLModel.Constraint constraint,
                                 VOCLModel.ClassifierRole classifierRole,
                                 VOCLModel.Attribute attribute)
Constructs a new AttributePropertiesDialog

Parameters:
parentShell - parent shell (becomes blocked when this dialog is open)
constraint - the constraint
classifierRole - the classifier role
attribute - the Attribute to be edited

AttributePropertiesDialog

public AttributePropertiesDialog(org.eclipse.swt.widgets.Shell parentShell,
                                 VOCLModel.Constraint constraint,
                                 VOCLModel.ClassifierRole classifierRole,
                                 VOCLModel.Attribute attribute,
                                 java.util.List newVariableNames,
                                 java.util.List newNames,
                                 java.util.List newTypes)
Constructs a new AttributePropertiesDialog

Parameters:
parentShell - parent shell (becomes blocked when this dialog is open)
constraint - the constraint
classifierRole - the classifier role
attribute - the Attribute to be edited
newVariableNames - the list of new variable names
newTypes - the list of new types.
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

getName

public java.lang.String getName()
Returns the attribute name.

Returns:
the attribute name

getType

public java.lang.String getType()
Returns the attribute type.

Returns:
the attribute type

getValue

public java.lang.String getValue()
Returns the attribute value.

Returns:
the attribute value

getVariableName

public java.lang.String getVariableName()
Returns the name of the attribute variable.

Returns:
the name of the attribute variable

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
Widged selected listener.

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

widgetDefaultSelected

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

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