at.spardat.xma.page.IDialogPage 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
*******************************************************************************/
/*
* @(#) $Id: IDialogPage.java 2274 2008-01-14 14:28:42Z s2877 $
*
*
*
*
*/
package at.spardat.xma.page;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Widget;
import at.spardat.xma.boot.component.IDialog;
/**
* The interface for all DialogPages.
*
* @author s2877
* @since 1.3.0
*/
public interface IDialogPage extends IDialog, IEmbeddable {
/**
* Sets the focus to the given control.
* @param control the Control to set the focus to.
*/
void setFocus(Control control);
/**
* Removes a validation error for a particular widget. This method
* is for internal use only. Calling it causes undefined behaviour!
*
* @param widget the widget where to clear the error state.
*/
public void clearValidationErrorImpl (Widget widget);
/**
* Sets a validation error for a particular widget. This method
* is for internal use only. Calling it causes undefined behaviour!
*
* @param widget the widget where the error occured
* @param errorText indicates the error
*/
public void setValidationErrorImpl (Widget widget,String errorText);
/**
* Resets all widgets containing values with validation errors to their
* valid value from the model.
*/
public void overrideErrorsFromModel();
/**
* Determines if a validation error currently exists for a given widget.
* Note that validation is disabled automatically for readonly widgets, so
* readonly widgets never have validation errors.
* @param widget to search for validation errors
* @return true if the validator reported an error for the given widget. false otherwise.
*/
boolean hasValidationError(Widget widget);
/**
* Sets an warning for the given widget. The warning is shown in the status line,
* if currently no error has to be shown.
* Only one error or warning can be shown at a time. The precedence rules are:
* 1) any error of any widget (see {@link #setError(Widget, String)}
* 2) the warning of the widget owning the focus
* 3) the warning of the next widget in the tab order containing a warning
* 4) the warning set for the null-widget.
*
* @param widget the widget the warning is associated with. Null is allowed.
* @param warningText indicates the warning
*/
public void setWarning(Widget widget,String warningText);
/**
* Removes the warning for the given widget.
*
* @param widget the widget where to clear the warning.
*/
public void clearWarning(Widget widget);
/**
* Sets an info for the given widget. The info is shown in the status line,
* if currently no error or warning has to be shown.
* Only one error, warning or info can be shown at a time. The precedence rules are:
* 1) any error or warning of any widget (see {@link #setWarning(Widget, String)}
* 2) the info of the widget owning the focus
* 3) the info of the next widget in the tab order containing a warning
* 4) the info set for the null-widget.
*
* @param widget the widget the info is associated with. Null is allowed.
* @param infoText indicates the info
*/
public void setInfo(Widget widget,String infoText);
/**
* Removes the info for the given widget.
*
* @param widget the widget where to clear the info.
*/
public void clearInfo(Widget widget);
}