|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
semorg.gui.provider.EnumDlg
public class EnumDlg
Provides a very simple dialog to edit enumeration constants.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
---|
org.eclipse.jface.window.Window.IExceptionHandler |
Field Summary | |
---|---|
private org.eclipse.swt.widgets.Text |
editor
The text field to enter the new values. |
private boolean |
newDialog
true if the user inserts a new enumeration otherwise it is set to false, i.e. the user changes an existing enumeration. |
private String |
newValue
The new value of the enumeration. |
private String |
oldValue
The old value of the enumeration. |
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 | |
---|---|
EnumDlg(org.eclipse.swt.widgets.Shell parent,
String value)
Creates a new enumeration dialog to edit the value of a enumeration. |
Method Summary | |
---|---|
protected void |
buttonPressed(int buttonId)
Assigns methods to the buttons, which will be executed when the appropriate button was pressed. |
protected void |
cancelPressed()
Sets the return code to the cancel button id and closes the dialog. |
protected void |
configureShell(org.eclipse.swt.widgets.Shell shell)
Simply configures the given shell by setting the size and the title e.g.. |
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
Creates the buttons for the button bar of this dialog. |
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
Creates the dialog area including the text field to enter new values or change existing one. |
String |
getNewValue()
Gets the new value of enumeration type. |
protected void |
okPressed()
Sets the return code to the ok button id and closes the dialog. |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
---|
applyDialogFont, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, 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 |
Field Detail |
---|
private boolean newDialog
private org.eclipse.swt.widgets.Text editor
private String newValue
private String oldValue
Constructor Detail |
---|
public EnumDlg(org.eclipse.swt.widgets.Shell parent, String value)
parent
- the parent shell.value
- the old value of the enumeration (= initial value of the
text field editor
).Method Detail |
---|
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
createButtonsForButtonBar
in class org.eclipse.jface.dialogs.Dialog
parent
- the parent composite which contains the buttonsprotected void buttonPressed(int buttonId)
buttonPressed
in class org.eclipse.jface.dialogs.Dialog
buttonId
- the id of the button pressed.protected void okPressed()
okPressed
in class org.eclipse.jface.dialogs.Dialog
protected void cancelPressed()
cancelPressed
in class org.eclipse.jface.dialogs.Dialog
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
createDialogArea
in class org.eclipse.jface.dialogs.Dialog
parent
- the composite which contains the dialog.
Composite
.public String getNewValue()
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
configureShell
in class org.eclipse.jface.window.Window
shell
- the shell to configure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |