at.spardat.xma.boot.component.IDialog Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
/*
* Created on 24.10.2003
*/
package at.spardat.xma.boot.component;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Widget;
/**
* The interface for DialogPage. This interface is part of the boot-runtime to
* enable the embedding of components of different applications.
*
* @author s2877
*/
public interface IDialog extends IXMAControl { //todo remove IDialog extends IXMAControl
/**
* Get the SWT-Shell of the DialogPage. For DialogPages the corresponding
* SWT-Composite of the DialogPage is a Shell and will be returned.
*
* @return the SWT-Shell containing the widgets of this DialogPage.
*/
Shell getShell();
/**
* Gets the Control on the DialogPage or a Subpage of it, which currently
* has the focus.
* @return the Control with the focus.
*/
Control getFocusControl();
/**
* 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.
* @param control the Control with the focus.
*/
void setFocusControl(Control control);
/**
* 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.
*
* @param widget the widget where the error occured. Null is allowd if the error can not
* be associated with a widget.
* @param errorText indicates the error
*/
void setError (Widget widget,String errorText);
/**
* Removes the error for the given widget.
*
* @param widget the widget where to clear the error state.
*/
void clearError (Widget widget);
/**
* 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.
*
* @param current the Widget which currently owns the focus.
*/
void updateErrorStatus(Widget current);
/**
* Returns the number of ValidationErrors in this dialog including its subpages.
*/
int getErrorCount();
/**
* Closes the dialog with exitStatus true.
*/
void closeOK();
/**
* Closes the dialog with exitStatus false.
*/
void closeCancel();
}