Class ActionPool


  • public final class ActionPool
    extends java.lang.Object
    This class contains a set of viewer actions for which are used in the viewer.
    Since:
    7.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EXPORT
      Opens the export dialog.
      static int FIRST_PAGE
      Switches to the first page.
      static int HAND_TOOL
      Switches to the hand tool mode, to navigate through the pages.
      static int IMAGE_SELECT
      Switches to the image select mode, to select report images.
      static int INFO
      Opens the print dialog.
      static int JRA_LOAD
      Opens the load JRA dialog.
      static int JRA_SAVE
      Opens the save JRA dialog.
      static int LAST_PAGE
      Switches to the next page.
      static int NEXT_PAGE
      Switches to the next page.
      static int PREV_PAGE
      Switches to the previous page.
      static int PRINT
      Opens the print dialog.
      static int REFRESH
      Performs a refresh.
      static int SEARCH
      Opens the search dialog.
      static int TEXT_SELECT
      Switches to the text selection mode, to select text via mouse drag.
      static int VIEW_DOUBLE_CONTINUOUS
      Switches to double continuous page view.
      static int VIEW_DOUBLE_PAGE
      Switches to double page layout.
      static int VIEW_SINGLE_CONTINUOUS
      Switches to a continuous layout with single pages.
      static int VIEW_SINGLE_PAGE
      Switches to single page layout.
      static int ZOOM_IN
      Zooms one step in.
      static int ZOOM_OUT
      Zooms one step out.
    • Field Detail

      • HAND_TOOL

        public static final int HAND_TOOL
        Switches to the hand tool mode, to navigate through the pages.
        Since:
        7.0
        See Also:
        Constant Field Values
      • TEXT_SELECT

        public static final int TEXT_SELECT
        Switches to the text selection mode, to select text via mouse drag.
        Since:
        7.0
        See Also:
        Constant Field Values
      • IMAGE_SELECT

        public static final int IMAGE_SELECT
        Switches to the image select mode, to select report images.
        Since:
        7.0
        See Also:
        Constant Field Values
      • FIRST_PAGE

        public static final int FIRST_PAGE
        Switches to the first page.
        Since:
        7.0
        See Also:
        Constant Field Values
      • PREV_PAGE

        public static final int PREV_PAGE
        Switches to the previous page.
        Since:
        7.0
        See Also:
        Constant Field Values
      • NEXT_PAGE

        public static final int NEXT_PAGE
        Switches to the next page.
        Since:
        7.0
        See Also:
        Constant Field Values
      • LAST_PAGE

        public static final int LAST_PAGE
        Switches to the next page.
        Since:
        7.0
        See Also:
        Constant Field Values
      • ZOOM_OUT

        public static final int ZOOM_OUT
        Zooms one step out.
        Since:
        7.0
        See Also:
        Constant Field Values
      • VIEW_SINGLE_PAGE

        public static final int VIEW_SINGLE_PAGE
        Switches to single page layout.
        Since:
        7.0
        See Also:
        Constant Field Values
      • VIEW_SINGLE_CONTINUOUS

        public static final int VIEW_SINGLE_CONTINUOUS
        Switches to a continuous layout with single pages.
        Since:
        7.0
        See Also:
        Constant Field Values
      • VIEW_DOUBLE_PAGE

        public static final int VIEW_DOUBLE_PAGE
        Switches to double page layout.
        Since:
        7.0
        See Also:
        Constant Field Values
      • VIEW_DOUBLE_CONTINUOUS

        public static final int VIEW_DOUBLE_CONTINUOUS
        Switches to double continuous page view.
        Since:
        7.0
        See Also:
        Constant Field Values
      • PRINT

        public static final int PRINT
        Opens the print dialog.
        Since:
        7.0
        See Also:
        Constant Field Values
      • EXPORT

        public static final int EXPORT
        Opens the export dialog.
        Since:
        7.0
        See Also:
        Constant Field Values
      • SEARCH

        public static final int SEARCH
        Opens the search dialog.
        Since:
        7.0
        See Also:
        Constant Field Values
      • REFRESH

        public static final int REFRESH
        Performs a refresh.
        Since:
        7.0
        See Also:
        Constant Field Values
      • JRA_LOAD

        public static final int JRA_LOAD
        Opens the load JRA dialog.
        Since:
        7.0
        See Also:
        Constant Field Values
      • JRA_SAVE

        public static final int JRA_SAVE
        Opens the save JRA dialog.
        Since:
        7.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActionPool

        public ActionPool​(ReportViewer viewer)
        This class handles all ViewerActions for a ReportViewer.
        Parameters:
        viewer - ReportViewer this that this instance of ActionPool will be connected
        Since:
        7.0
    • Method Detail

      • getUserActionCount

        public int getUserActionCount()
        Returns the number of user actions(action added by user).
        Returns:
        The number of user actions
        Since:
        7.0
      • getUserAction

        public ViewerAction getUserAction​(int index)
                                   throws java.lang.IndexOutOfBoundsException
        Returns an Action with the given action id from viewers action list.
        Parameters:
        index - The index in the list of viewer action.
        Returns:
        Returns the viewer Action for the given action id.
        Throws:
        java.lang.IndexOutOfBoundsException - if the index is less than 0 or greater than or equal to getUserActionCount()
        Since:
        7.0
        See Also:
        getUserActionCount()
      • addUserAction

        public int addUserAction​(ViewerAction action)
        Adds an Action to list of user actions.
        Parameters:
        action - The action to add.
        Returns:
        Returns the index in the list of ViewerActions.
        Throws:
        java.lang.IllegalArgumentException - when action == null
        Since:
        7.0
      • removeUserAction

        public void removeUserAction​(int index)
        Removes an Action from list of the user actions.
        Parameters:
        index - The action to remove.
        Since:
        7.0