org.pentaho.reporting.engine.classic.core.modules.gui.commonswing
Class AbstractActionPlugin

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.gui.commonswing.AbstractActionPlugin
All Implemented Interfaces:
ActionPlugin
Direct Known Subclasses:
AboutActionPlugin, AbstractExportActionPlugin, ExitActionPlugin, GoToActionPlugin, GoToFirstPageActionPlugin, GoToLastPageActionPlugin, GoToNextPageActionPlugin, GoToPreviousPageActionPlugin, PageSetupPlugin, ZoomCustomActionPlugin, ZoomInActionPlugin, ZoomListActionPlugin, ZoomOutActionPlugin

public abstract class AbstractActionPlugin
extends Object
implements ActionPlugin

The AbstractExportPlugin provides a basic implementation of the ExportPlugin interface.

Author:
Thomas Morgner

Field Summary
static String ENABLED_PROPERTY
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addPropertyChangeListener(String property, PropertyChangeListener l)
           
 void deinitialize(SwingGuiContext swingGuiContext)
           
 org.pentaho.reporting.libraries.base.util.ResourceBundleSupport getBaseResources()
           
 org.pentaho.reporting.libraries.base.config.ExtendedConfiguration getConfig()
           
 SwingGuiContext getContext()
           
 IconTheme getIconTheme()
           
 int getMenuOrder()
          A sort key used to enforce a certain order within the actions.
 String getRole()
           
 int getRolePreference()
           
 int getToolbarOrder()
           
 boolean initialize(SwingGuiContext context)
           
 boolean isAddToMenu()
          Returns true if the action should be added to the menu, and false otherwise.
 boolean isAddToToolbar()
          Returns true if the action should be added to the toolbar, and false otherwise.
 boolean isEnabled()
           
 boolean isSeparated()
          Returns true if the action is separated, and false otherwise.
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void setEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.modules.gui.commonswing.ActionPlugin
getAcceleratorKey, getDisplayName, getLargeIcon, getMnemonicKey, getShortDescription, getSmallIcon
 

Field Detail

ENABLED_PROPERTY

public static final String ENABLED_PROPERTY
See Also:
Constant Field Values
Method Detail

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface ActionPlugin

setEnabled

public void setEnabled(boolean enabled)

initialize

public boolean initialize(SwingGuiContext context)
Specified by:
initialize in interface ActionPlugin

deinitialize

public void deinitialize(SwingGuiContext swingGuiContext)
Specified by:
deinitialize in interface ActionPlugin

getBaseResources

public org.pentaho.reporting.libraries.base.util.ResourceBundleSupport getBaseResources()

getContext

public SwingGuiContext getContext()

getConfig

public org.pentaho.reporting.libraries.base.config.ExtendedConfiguration getConfig()

isSeparated

public boolean isSeparated()
Returns true if the action is separated, and false otherwise. A separated action starts a new action group and will be spearated from previous actions on the menu and toolbar.

Specified by:
isSeparated in interface ActionPlugin
Returns:
true, if the action should be separated from previous actions, false otherwise.

isAddToToolbar

public boolean isAddToToolbar()
Returns true if the action should be added to the toolbar, and false otherwise.

Specified by:
isAddToToolbar in interface ActionPlugin
Returns:
true, if the plugin should be added to the toolbar, false otherwise.

isAddToMenu

public boolean isAddToMenu()
Returns true if the action should be added to the menu, and false otherwise.

Specified by:
isAddToMenu in interface ActionPlugin
Returns:
A boolean.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Specified by:
addPropertyChangeListener in interface ActionPlugin

addPropertyChangeListener

public void addPropertyChangeListener(String property,
                                      PropertyChangeListener l)
Specified by:
addPropertyChangeListener in interface ActionPlugin

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Specified by:
removePropertyChangeListener in interface ActionPlugin

getIconTheme

public IconTheme getIconTheme()

getMenuOrder

public int getMenuOrder()
A sort key used to enforce a certain order within the actions.

Specified by:
getMenuOrder in interface ActionPlugin
Returns:

getToolbarOrder

public int getToolbarOrder()
Specified by:
getToolbarOrder in interface ActionPlugin

getRole

public String getRole()
Specified by:
getRole in interface ActionPlugin

getRolePreference

public int getRolePreference()
Specified by:
getRolePreference in interface ActionPlugin