Package uk.ac.gda.ui.dialog
Class OKCancelDialog
java.lang.Object
org.eclipse.swt.widgets.Dialog
uk.ac.gda.ui.dialog.OKCancelDialog
- Direct Known Subclasses:
AuthenticationDialog,XMLFileDialog
public abstract class OKCancelDialog
extends org.eclipse.swt.widgets.Dialog
You can use this class for low level dialogs in the GDA.
Alternative - use the JFace Dialog class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcreateUserUI(org.eclipse.swt.widgets.Shell shell, Object userObject) Please implement to create the GUI by adding UI to the shell.voiddispose()open()Opens the dialog and returns the value, null if the user did not press ok.Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
-
Field Details
-
ok
protected boolean ok -
currentSelection
-
-
Constructor Details
-
OKCancelDialog
public OKCancelDialog(org.eclipse.swt.widgets.Shell parent, int style) - Parameters:
parent-style-
-
-
Method Details
-
open
Opens the dialog and returns the value, null if the user did not press ok.- Returns:
- the object chosen.
-
open
- Parameters:
userData- (may be null)- Returns:
- the selected file
-
createUserUI
Please implement to create the GUI by adding UI to the shell. The shell already has a grid layout.- Parameters:
shell-userObject-
-
dispose
public void dispose()
-