Source for org.jfree.report.modules.gui.swing.common.ActionPlugin

   1: /**
   2:  * ========================================
   3:  * JFreeReport : a free Java report library
   4:  * ========================================
   5:  *
   6:  * Project Info:  http://reporting.pentaho.org/
   7:  *
   8:  * (C) Copyright 2000-2007, by Object Refinery Limited, Pentaho Corporation and Contributors.
   9:  *
  10:  * This library is free software; you can redistribute it and/or modify it under the terms
  11:  * of the GNU Lesser General Public License as published by the Free Software Foundation;
  12:  * either version 2.1 of the License, or (at your option) any later version.
  13:  *
  14:  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  15:  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16:  * See the GNU Lesser General Public License for more details.
  17:  *
  18:  * You should have received a copy of the GNU Lesser General Public License along with this
  19:  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  20:  * Boston, MA 02111-1307, USA.
  21:  *
  22:  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
  23:  * in the United States and other countries.]
  24:  *
  25:  * ------------
  26:  * $Id: ActionPlugin.java 2890 2007-06-10 15:54:22Z taqua $
  27:  * ------------
  28:  * (C) Copyright 2000-2005, by Object Refinery Limited.
  29:  * (C) Copyright 2005-2007, by Pentaho Corporation.
  30:  */
  31: 
  32: package org.jfree.report.modules.gui.swing.common;
  33: 
  34: import java.beans.PropertyChangeListener;
  35: import javax.swing.Icon;
  36: import javax.swing.KeyStroke;
  37: 
  38: /**
  39:  * Creation-Date: 16.11.2006, 15:47:02
  40:  *
  41:  * @author Thomas Morgner
  42:  */
  43: public interface ActionPlugin
  44: {
  45:   /**
  46:    * Returns the display name for the export action.
  47:    *
  48:    * @return The display name.
  49:    */
  50:   public String getDisplayName ();
  51: 
  52:   /**
  53:    * Returns the short description for the export action.
  54:    *
  55:    * @return The short description.
  56:    */
  57:   public String getShortDescription ();
  58: 
  59:   /**
  60:    * Returns the small icon for the export action.
  61:    *
  62:    * @return The icon.
  63:    */
  64:   public Icon getSmallIcon ();
  65: 
  66:   /**
  67:    * Returns the large icon for the export action.
  68:    *
  69:    * @return The icon.
  70:    */
  71:   public Icon getLargeIcon ();
  72: 
  73:   /**
  74:    * Returns the accelerator key for the export action.
  75:    *
  76:    * @return The accelerator key.
  77:    */
  78:   public KeyStroke getAcceleratorKey ();
  79: 
  80:   /**
  81:    * Returns the mnemonic key code.
  82:    *
  83:    * @return The code.
  84:    */
  85:   public Integer getMnemonicKey ();
  86: 
  87:   /**
  88:    * Returns true if the action is separated, and false otherwise.
  89:    *
  90:    * @return A boolean.
  91:    */
  92:   public boolean isSeparated ();
  93: 
  94:   /**
  95:    * Returns true if the action should be added to the toolbar, and false otherwise.
  96:    *
  97:    * @return A boolean.
  98:    */
  99:   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: }