001 /** 002 * ======================================== 003 * JFreeReport : a free Java report library 004 * ======================================== 005 * 006 * Project Info: http://reporting.pentaho.org/ 007 * 008 * (C) Copyright 2000-2007, by Object Refinery Limited, Pentaho Corporation and Contributors. 009 * 010 * This library is free software; you can redistribute it and/or modify it under the terms 011 * of the GNU Lesser General Public License as published by the Free Software Foundation; 012 * either version 2.1 of the License, or (at your option) any later version. 013 * 014 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 015 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 016 * See the GNU Lesser General Public License for more details. 017 * 018 * You should have received a copy of the GNU Lesser General Public License along with this 019 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 020 * Boston, MA 02111-1307, USA. 021 * 022 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 023 * in the United States and other countries.] 024 * 025 * ------------ 026 * $Id: ReportController.java 3048 2007-07-28 18:02:42Z tmorgner $ 027 * ------------ 028 * (C) Copyright 2000-2005, by Object Refinery Limited. 029 * (C) Copyright 2005-2007, by Pentaho Corporation. 030 */ 031 package org.jfree.report.modules.gui.swing.preview; 032 033 import javax.swing.JComponent; 034 import javax.swing.JMenu; 035 036 /** 037 * A report controler. This provides some means of configuring the 038 * preview components. 039 * <p> 040 * The controler should use the propertyChange events provided by 041 * the PreviewProxyBase and the ReportPane to update its state. 042 * <p> 043 * To force a new repagination, use the <code>refresh</code> method of 044 * the PreviewProxyBase. 045 * 046 * @author Thomas Morgner 047 */ 048 public interface ReportController 049 { 050 /** 051 * Returns the graphical representation of the controler. 052 * This component will be added between the menu bar and 053 * the toolbar. 054 * <p> 055 * Changes to this property are not detected automaticly, 056 * you have to call "refreshController" whenever you want to 057 * display a completly new control panel. 058 * 059 * @return the controler component. 060 */ 061 public JComponent getControlPanel(); 062 063 /** 064 * Returns the menus that should be inserted into the menubar. 065 * <p> 066 * Changes to this property are not detected automaticly, 067 * you have to call "refreshControler" whenever the contents 068 * of the menu array changed. 069 * 070 * @return the menus as array, never null. 071 */ 072 public JMenu[] getMenus(); 073 074 /** 075 * Defines, whether the controler component is placed between 076 * the preview pane and the toolbar. 077 * 078 * @return true, if this is a inner component. 079 */ 080 public boolean isInnerComponent (); 081 082 /** 083 * Returns the location for the report controler, one of 084 * BorderLayout.NORTH, BorderLayout.SOUTH, BorderLayout.EAST 085 * or BorderLayout.WEST. 086 * 087 * @return the location; 088 */ 089 public String getControllerLocation (); 090 091 public void initialize (PreviewPane pane); 092 }