at.spardat.xma.mdl.IWModelClient 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: IWModelClient.java 2089 2007-11-28 13:56:13Z s3460 $
package at.spardat.xma.mdl;
/**
* This interface is realized by all WidgetModels executing at the client side.
* All WidgetModels implementing this interface must also construct a UIDelegateClient
* at construction time, which must be accessible via getUIDelegate.
*/
public interface IWModelClient {
/**
* Returns the attached UIDelegateClient.
*
* @return the UIDelegateClient which never is null.
*/
public UIDelegateClient getUIDelegate();
/**
* Returns true if this model's widget may be modified by the end-user.
* Returns false, if the widget may not be edited, but the content of
* the widget should be readable and receive focus.
*/
public boolean isEditable ();
/**
* Sets the editable-state of this models's widget. A widget which is not editable
* can not be modified by the end user. Unlike the disabled-state, its contents
* remains readable and still receives focus.
*
* Usually, this method is called on all widget-models of a page to set the whole
* page to a read-only mode.
*
* If this method is not called, the default is true.
*
* @param what true if the model's widget should be editable, false otherwise.
*/
public void setEditable (boolean what);
/**
* Returns true, if this model's widget is enabled. Returns false,
* if it is disabled. A disabled control is displayed in a greyed look and
* does not receive focus.
*/
public boolean isEnabled ();
/**
* Sets the enabled-state of this model's widget.
*
* @param what the state to set.
*/
public void setEnabled (boolean what);
}