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
    Modifier and Type
    Field
    Description
    protected Object
     
    protected boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OKCancelDialog(org.eclipse.swt.widgets.Shell parent, int style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    createUserUI(org.eclipse.swt.widgets.Shell shell, Object userObject)
    Please implement to create the GUI by adding UI to the shell.
    void
     
    Opens the dialog and returns the value, null if the user did not press ok.
    open(Object userData)
     

    Methods inherited from class org.eclipse.swt.widgets.Dialog

    checkSubclass, getParent, getStyle, getText, setText

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ok

      protected boolean ok
    • currentSelection

      protected Object currentSelection
  • Constructor Details

    • OKCancelDialog

      public OKCancelDialog(org.eclipse.swt.widgets.Shell parent, int style)
      Parameters:
      parent -
      style -
  • Method Details

    • open

      public Object open()
      Opens the dialog and returns the value, null if the user did not press ok.
      Returns:
      the object chosen.
    • open

      public Object open(Object userData)
      Parameters:
      userData - (may be null)
      Returns:
      the selected file
    • createUserUI

      public abstract void createUserUI(org.eclipse.swt.widgets.Shell shell, Object userObject)
      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()