001: /**
002: * ===========================================
003: * JFreeReport : a free Java reporting library
004: * ===========================================
005: *
006: * Project Info: http://reporting.pentaho.org/
007: *
008: * (C) Copyright 2001-2007, by Object Refinery Ltd, 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: * ActionPlugin.java
027: * ------------
028: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
029: */package org.jfree.report.modules.gui.commonswing;
030:
031: import java.beans.PropertyChangeListener;
032: import javax.swing.Icon;
033: import javax.swing.KeyStroke;
034:
035: /**
036: * The Action-Plugin interface defines the common properties for the Control and Export-Plugins. Implementing
037: * just this interface will not make sense, you have to use either the Control- or ExportActionPlugin interface
038: * instead.
039: *
040: * @author Thomas Morgner
041: */
042: public interface ActionPlugin {
043: /**
044: * Returns the display name for the export action.
045: *
046: * @return The display name.
047: */
048: public String getDisplayName();
049:
050: /**
051: * Returns the short description for the export action.
052: *
053: * @return The short description.
054: */
055: public String getShortDescription();
056:
057: /**
058: * Returns the small icon for the export action.
059: *
060: * @return The icon.
061: */
062: public Icon getSmallIcon();
063:
064: /**
065: * Returns the large icon for the export action.
066: *
067: * @return The icon.
068: */
069: public Icon getLargeIcon();
070:
071: /**
072: * Returns the accelerator key for the export action.
073: *
074: * @return The accelerator key.
075: */
076: public KeyStroke getAcceleratorKey();
077:
078: /**
079: * Returns the mnemonic key code.
080: *
081: * @return The code.
082: */
083: public Integer getMnemonicKey();
084:
085: /**
086: * Returns true if the action is separated, and false otherwise.
087: *
088: * @return A boolean.
089: */
090: public boolean isSeparated();
091:
092: /**
093: * Returns true if the action should be added to the toolbar, and false otherwise.
094: *
095: * @return A boolean.
096: */
097: public boolean isAddToToolbar();
098:
099: /**
100: * Returns true if the action should be added to the menu, and false otherwise.
101: *
102: * @return A boolean.
103: */
104: public boolean isAddToMenu();
105:
106: public boolean isEnabled();
107:
108: public void addPropertyChangeListener(PropertyChangeListener l);
109:
110: public void addPropertyChangeListener(String property,
111: PropertyChangeListener l);
112:
113: public void removePropertyChangeListener(PropertyChangeListener l);
114:
115: /**
116: * A sort key used to enforce a certain order within the actions.
117: *
118: * @return
119: */
120: public int getMenuOrder();
121:
122: public int getToolbarOrder();
123:
124: public String getRole();
125:
126: public int getRolePreference();
127:
128: public boolean initialize(final SwingGuiContext context);
129: }
|