cookxml.cookswt.ui
Class XmlDialog

java.lang.Object
  extended byorg.eclipse.swt.widgets.Dialog
      extended bycookxml.cookswt.ui.XmlDialog

public class XmlDialog
extends Dialog

This dialog is used for creating dialogs from XML. The root of of the XML document must be a shell.

Since:
CookSwt 1.0

Field Summary
static SelectionListener closeAction
          This selection listener is provided for convenience of disposing a Dialog from a MenuItem, a Control (such as Button), or ToolItem inside the Dialog.
 
Constructor Summary
XmlDialog(Shell parent)
           
XmlDialog(Shell parent, int style)
           
 
Method Summary
 Object getResult()
          Overload this function to provide a return value.
 Object getVarObj()
          Get the variable object.
 DocumentElement getXml()
          Get the XML source.
 Object open()
           
 void setVarObj(Object varObj)
          Set the variable object.
 void setXml(DocumentElement xml)
          Set the XML source.
 
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 Detail

closeAction

public static final SelectionListener closeAction
This selection listener is provided for convenience of disposing a Dialog from a MenuItem, a Control (such as Button), or ToolItem inside the Dialog.

If you used your SelectionListener for the button instead, and wish to dispose the dialog in the end, re-direct the action to this one near the end.

Constructor Detail

XmlDialog

public XmlDialog(Shell parent)

XmlDialog

public XmlDialog(Shell parent,
                 int style)
Method Detail

open

public Object open()

getResult

public Object getResult()
Overload this function to provide a return value.

Returns:
result from dialog.

getXml

public DocumentElement getXml()
Get the XML source.

Returns:
the XML source.

setXml

public void setXml(DocumentElement xml)
Set the XML source.

Parameters:
xml - the XML source.

getVarObj

public Object getVarObj()
Get the variable object.

Returns:
the variable object.

setVarObj

public void setVarObj(Object varObj)
Set the variable object.

Parameters:
varObj - the variable object.