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: DefaultReportController.java 3525 2007-10-16 11:43:48Z 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 java.awt.BorderLayout;
034    import javax.swing.JComponent;
035    import javax.swing.JMenu;
036    import javax.swing.JPanel;
037    
038    public class DefaultReportController extends JPanel implements ReportController
039    {
040      /**
041       * Creates a new <code>JPanel</code> with a double buffer and a flow layout.
042       */
043      public DefaultReportController ()
044      {
045      }
046    
047      /**
048       * Returns the graphical representation of the controler. This component will be added
049       * between the menu bar and the toolbar.
050       * <p/>
051       * Changes to this property are not detected automaticly, you have to call
052       * "refreshControler" whenever you want to display a completly new control panel.
053       *
054       * @return the controler component.
055       */
056      public JComponent getControlPanel ()
057      {
058        return this;
059      }
060    
061      /**
062       * The default implementation has no menus.
063       *
064       * @return an empty array.
065       */
066      public JMenu[] getMenus ()
067      {
068        return new JMenu[0];
069      }
070    
071      /**
072       * Returns the location for the report controler, one of BorderLayout.NORTH,
073       * BorderLayout.SOUTH, BorderLayout.EAST or BorderLayout.WEST.
074       *
075       * @return the location;
076       */
077      public String getControllerLocation ()
078      {
079        return BorderLayout.NORTH;
080      }
081    
082      /**
083       * Defines, whether the controler component is placed between the report pane and the
084       * toolbar.
085       *
086       * @return true, if this is a inne component.
087       */
088      public boolean isInnerComponent ()
089      {
090        return false;
091      }
092    
093      public void initialize(final PreviewPane pane)
094      {
095    
096      }
097    }