Class ViewerAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class ViewerAction
    extends javax.swing.AbstractAction
    Action class for the ReportViewer.
    Since:
    7.0
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractAction

        changeSupport
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Constructor Summary

      Constructors 
      Constructor Description
      ViewerAction()
      Default Constructor for extending this class.
      ViewerAction​(java.lang.String name)
      Defines an Action object with the specified description string and a default icon.
      ViewerAction​(java.lang.String name, javax.swing.Icon icon)
      Defines an Action object with the specified description string and a the specified icon.The Action will be initialized disabled until a ReportView is opened.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)
      Handling of actions from the default ViewerActions.
      void reportViewChanged​(ReportView view)
      Overwrite the method to perform changes on this action if the selected ReportView has been changed.
      void setEnabled​(boolean newValue)
      Enables or disables the action.
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Constructor Detail

      • ViewerAction

        public ViewerAction()
        Default Constructor for extending this class. The Action will be initialized disabled until a ReportView is opened.
        Since:
        7.0
      • ViewerAction

        public ViewerAction​(java.lang.String name,
                            javax.swing.Icon icon)
        Defines an Action object with the specified description string and a the specified icon.The Action will be initialized disabled until a ReportView is opened.
        Parameters:
        name - Description String
        icon - icon representing this action. Will be displayed in a toolbar if the action is added
        Since:
        7.0
        See Also:
        JToolBar.add(Action)
      • ViewerAction

        public ViewerAction​(java.lang.String name)
        Defines an Action object with the specified description string and a default icon. The Action will be initialized disabled until a ReportView is opened.
        Parameters:
        name - Description String
        Since:
        7.0
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Handling of actions from the default ViewerActions. Do not call it directly.
        Parameters:
        e - ActionEvent
        Since:
        7.0
      • setEnabled

        public void setEnabled​(boolean newValue)
        Enables or disables the action. If enabled is false the Action will stay disabled until this method is called with parameter true.
        Specified by:
        setEnabled in interface javax.swing.Action
        Overrides:
        setEnabled in class javax.swing.AbstractAction
        Parameters:
        newValue - true to enable the action, false to disable it.
        Since:
        7.0
        See Also:
        Action.setEnabled(boolean)
      • reportViewChanged

        public void reportViewChanged​(ReportView view)
        Overwrite the method to perform changes on this action if the selected ReportView has been changed. if no ReportView is selected the parameter view will be null.
        Parameters:
        view - the current selectes ReportView
        Since:
        7.0