vocleditor.dialog
Class AssociationPropertiesDialog

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

JFace based dialog used to edit AssociationRole properties

Author:
bjoern, stefan, jan

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
AssociationPropertiesDialog(org.eclipse.swt.widgets.Shell parentShell, VOCLModel.AssociationRole associationrole)
          Constructs a new AssociationPropertiesDialog
AssociationPropertiesDialog(org.eclipse.swt.widgets.Shell parentShell, VOCLModel.AssociationRole associationrole, VOCLModel.ClassifierRole source, VOCLModel.ClassifierRole target)
          Constructs a new AssociationPropertiesDialog
 
Method Summary
 java.lang.String getName()
          Returns the name of the association end role
 VOCLModel.ClassifierRole getSource()
          Returns the new instance of ClassifierRole connected with as source
 VOCLModel.ClassifierRole getTarget()
          Returns the new instance of ClassifierRole connected with as target
 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)
          implementation of SelectionListener.widgetSelected() toggle checkboxes
 
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

AssociationPropertiesDialog

public AssociationPropertiesDialog(org.eclipse.swt.widgets.Shell parentShell,
                                   VOCLModel.AssociationRole associationrole)
Constructs a new AssociationPropertiesDialog

Parameters:
parentShell - parent shell (becomes blocked when this dialog is open)
associationrole - the AssociationRole to be edited

AssociationPropertiesDialog

public AssociationPropertiesDialog(org.eclipse.swt.widgets.Shell parentShell,
                                   VOCLModel.AssociationRole associationrole,
                                   VOCLModel.ClassifierRole source,
                                   VOCLModel.ClassifierRole target)
Constructs a new AssociationPropertiesDialog

Parameters:
parentShell - parent shell (becomes blocked when this dialog is open)
associationrole - the AssociationRole to be edited
source - the instance of ClassifierRole connected with the associationrole as source
target - the instance of ClassifierRole conected with the associationrole as target
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

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)

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
implementation of SelectionListener.widgetSelected() toggle checkboxes

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

getName

public java.lang.String getName()
Returns the name of the association end role

Returns:
the name of the association end role

getSource

public VOCLModel.ClassifierRole getSource()
Returns the new instance of ClassifierRole connected with as source

Returns:
the new instance of ClassifierRole connected with as source

getTarget

public VOCLModel.ClassifierRole getTarget()
Returns the new instance of ClassifierRole connected with as target

Returns:
the new instance of ClassifierRole connected with as target