001    /*
002     * Copyright 2002-2008 the original author or authors.
003     * 
004     * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005     * use this file except in compliance with the License. You may obtain a copy of
006     * the License at
007     * 
008     * http://www.apache.org/licenses/LICENSE-2.0
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012     * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013     * License for the specific language governing permissions and limitations under
014     * the License.
015     */
016    package org.springframework.richclient.application;
017    
018    /**
019     * A view is a panel-like component displayed within an area on the page associated with an application window. There
020     * can be multiple views per page; a single view can only be displayed once on a single page.
021     * 
022     * View instances encapsulate the creation of and access to the visual presentation of the underlying control. A view's
023     * descriptor -- which is effectively a singleton -- can be asked to instantiate new instances of a single view for
024     * display within an application with multiple windows. In other words, a single view instance is never shared between
025     * windows.
026     * 
027     * @author Keith Donald
028     */
029    public interface View extends PageComponent {
030        /**
031         * Sets the input for this {@link View}. This method may be implemented so this {@link View} can update it's own
032         * state (ui) when this method is called.
033         * <p>
034         * Normally this method is called from {@link ApplicationPage#showView(String, Object)}, but may also be called
035         * directly.
036         * 
037         * @param input
038         *            the input, can be <code>null</code>
039         */
040        void setInput(Object input);
041    }