001 /* 002 * Copyright 2002-2004 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 import org.springframework.binding.value.PropertyChangePublisher; 019 import org.springframework.richclient.core.DescribedElement; 020 import org.springframework.richclient.core.VisualizedElement; 021 import org.springframework.richclient.factory.ControlFactory; 022 023 /** 024 * A page component is displayed within an area on the page 025 * associated with an application window. There can be multiple components 026 * per page; a single page component can only be displayed once on a 027 * single page. 028 * 029 * Components instances encapsulate the creation of and access to the visual 030 * presentation of the underlying control. A component's descriptor -- 031 * which is effectively a singleton -- can be asked to instantiate new 032 * instances of a single page component for display within an application 033 * with multiple windows. In other words, a single page component instance is 034 * never shared between windows. 035 * 036 * @author Keith Donald 037 */ 038 public interface PageComponent extends PropertyChangePublisher, DescribedElement, VisualizedElement, ControlFactory { 039 public PageComponentContext getContext(); 040 041 public void componentOpened(); 042 043 public void componentFocusGained(); 044 045 public void componentFocusLost(); 046 047 public void componentClosed(); 048 049 public void dispose(); 050 051 public void setContext(PageComponentContext context); 052 053 public void setDescriptor(PageComponentDescriptor pageComponentDescriptor); 054 055 public String getId(); 056 057 boolean canClose(); 058 059 public void close(); 060 }