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.wizard; 017 018 /** 019 * Interface for containers that can host a wizard. It displays wizard pages, at 020 * most one of which is considered the current page. <code>getCurrentPage</code> 021 * returns the current page; <code>showPage</code> programmatically changes 022 * the the current page. Note that the pages need not all belong to the same 023 * wizard. 024 * <p> 025 * The class <code>WizardDialog</code> provides a fully functional 026 * implementation of this interface which will meet the needs of most clients. 027 * However, clients are also free to implement this interface if 028 * <code>WizardDialog</code> does not suit their needs. 029 * </p> 030 * <p> 031 * Implementors are responsible for disposing of their wizards. 032 * </p> 033 */ 034 public interface WizardContainer { 035 036 /** 037 * Returns the current wizard page for this container. 038 * 039 * @return the current wizard page, or <code>null</code> if the container 040 * is not yet showing the wizard 041 * @see #showPage 042 */ 043 public WizardPage getCurrentPage(); 044 045 /** 046 * Makes the given page visible. 047 * <p> 048 * This method should not be use for normal page sequencing (back, next) 049 * which is handled by the container itself. It may, however, be used to 050 * move to another page in response to some custom action such as double 051 * clicking in a list. 052 * </p> 053 * 054 * @param page 055 * the page to show 056 * @see #getCurrentPage 057 */ 058 public void showPage(WizardPage page); 059 060 }