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: ActionPlugin.java 2890 2007-06-10 15:54:22Z taqua $
027     * ------------
028     * (C) Copyright 2000-2005, by Object Refinery Limited.
029     * (C) Copyright 2005-2007, by Pentaho Corporation.
030     */
031    
032    package org.jfree.report.modules.gui.swing.common;
033    
034    import java.beans.PropertyChangeListener;
035    import javax.swing.Icon;
036    import javax.swing.KeyStroke;
037    
038    /**
039     * Creation-Date: 16.11.2006, 15:47:02
040     *
041     * @author Thomas Morgner
042     */
043    public interface ActionPlugin
044    {
045      /**
046       * Returns the display name for the export action.
047       *
048       * @return The display name.
049       */
050      public String getDisplayName ();
051    
052      /**
053       * Returns the short description for the export action.
054       *
055       * @return The short description.
056       */
057      public String getShortDescription ();
058    
059      /**
060       * Returns the small icon for the export action.
061       *
062       * @return The icon.
063       */
064      public Icon getSmallIcon ();
065    
066      /**
067       * Returns the large icon for the export action.
068       *
069       * @return The icon.
070       */
071      public Icon getLargeIcon ();
072    
073      /**
074       * Returns the accelerator key for the export action.
075       *
076       * @return The accelerator key.
077       */
078      public KeyStroke getAcceleratorKey ();
079    
080      /**
081       * Returns the mnemonic key code.
082       *
083       * @return The code.
084       */
085      public Integer getMnemonicKey ();
086    
087      /**
088       * Returns true if the action is separated, and false otherwise.
089       *
090       * @return A boolean.
091       */
092      public boolean isSeparated ();
093    
094      /**
095       * Returns true if the action should be added to the toolbar, and false otherwise.
096       *
097       * @return A boolean.
098       */
099      public boolean isAddToToolbar ();
100    
101      /**
102       * Returns true if the action should be added to the menu, and false otherwise.
103       *
104       * @return A boolean.
105       */
106      public boolean isAddToMenu ();
107    
108      public void addPropertyChangeListener (PropertyChangeListener l);
109    
110      public void addPropertyChangeListener (String property, PropertyChangeListener l);
111    
112      public void removePropertyChangeListener (PropertyChangeListener l);
113    
114      /**
115       * A sort key used to enforce a certain order within the actions.
116       *
117       * @return
118       */
119      public int getMenuOrder ();
120    
121      public int getToolbarOrder ();
122    
123      public String getRole();
124    
125      public int getRolePreference ();
126    
127      public boolean initialize(final SwingGuiContext context);
128    }