at.spardat.xma.boot.component
Interface IDialog

All Superinterfaces:
IXMAControl

public interface IDialog
extends IXMAControl

The interface for DialogPage. This interface is part of the boot-runtime to enable the embedding of components of different applications.


Method Summary
 void clearError(org.eclipse.swt.widgets.Widget widget)
          Removes the error for the given widget.
 void closeCancel()
          Closes the dialog with exitStatus false.
 void closeOK()
          Closes the dialog with exitStatus true.
 int getErrorCount()
          Returns the number of ValidationErrors in this dialog including its subpages.
 org.eclipse.swt.widgets.Control getFocusControl()
          Gets the Control on the DialogPage or a Subpage of it, which currently has the focus.
 org.eclipse.swt.widgets.Shell getShell()
          Get the SWT-Shell of the DialogPage.
 void setError(org.eclipse.swt.widgets.Widget widget, java.lang.String errorText)
          Sets an error for the given widget.
 void setFocusControl(org.eclipse.swt.widgets.Control control)
          Sets the Control on the DialogPage of a Subpage of it, which currently has the focus.
 void updateErrorStatus(org.eclipse.swt.widgets.Widget current)
          Updates the error message in the StatusBar.
 
Methods inherited from interface at.spardat.xma.boot.component.IXMAControl
createComposite, enterBase, getComposite, initGUI, leaveBase, removeModel, removeWidgetsBase, stateChangedBase
 

Method Detail

getShell

public org.eclipse.swt.widgets.Shell getShell()
Get the SWT-Shell of the DialogPage. For DialogPages the corresponding SWT-Composite of the DialogPage is a Shell and will be returned.

Returns:
the SWT-Shell containing the widgets of this DialogPage.

getFocusControl

public org.eclipse.swt.widgets.Control getFocusControl()
Gets the Control on the DialogPage or a Subpage of it, which currently has the focus.

Returns:
the Control with the focus.

setFocusControl

public void setFocusControl(org.eclipse.swt.widgets.Control control)
Sets the Control on the DialogPage of a Subpage of it, which currently has the focus. The Control must allready have the focus. No SWT-Method will be called.

Parameters:
control - the Control with the focus.

setError

public void setError(org.eclipse.swt.widgets.Widget widget,
                     java.lang.String errorText)
Sets an error for the given widget. The error is shown in the status line. Only one error can be shown at a time. The precedence rules are: 1) the validation error of the widget owning the focus 2) the error of the widget owning the focus set with this method 3) the error of the next widget in the tab order containing an error 4) the error set for the null-widget.

Parameters:
widget - the widget where the error occured. Null is allowd if the error can not be associated with a widget.
errorText - indicates the error

clearError

public void clearError(org.eclipse.swt.widgets.Widget widget)
Removes the error for the given widget.

Parameters:
widget - the widget where to clear the error state.

updateErrorStatus

public void updateErrorStatus(org.eclipse.swt.widgets.Widget current)
Updates the error message in the StatusBar. If there are more then one error, the error belonging to the widget which currently owns the focus is displayed. If there is no error on the PageClient, the error message is cleared.

Parameters:
current - the Widget which currently owns the focus.

getErrorCount

public int getErrorCount()
Returns the number of ValidationErrors in this dialog including its subpages.


closeOK

public void closeOK()
Closes the dialog with exitStatus true.


closeCancel

public void closeCancel()
Closes the dialog with exitStatus false.