Class PageNavigationAction

  • All Implemented Interfaces:
    IconActionListener, java.awt.event.ActionListener, java.util.EventListener

    public class PageNavigationAction
    extends java.lang.Object
    implements IconActionListener
    Class that can be used for some basic navigation actions. Each action also has a corresponding icon.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FIRST_PAGE
      Type to go to the first page.
      protected javax.swing.Icon icon
      The icon corresponding with the action.
      static int LAST_PAGE
      Type to go to the last page.
      protected PageNavigationListener listener
      The object that is listening to the page navigation.
      static int NEXT_PAGE
      Type to go to the next page.
      static int PREVIOUS_PAGE
      Type to go to the previous page.
      protected int type
      The type of this action.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent evt)  
      javax.swing.Icon getIcon()
      Returns an Icon.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FIRST_PAGE

        public static final int FIRST_PAGE
        Type to go to the first page.
        See Also:
        Constant Field Values
      • PREVIOUS_PAGE

        public static final int PREVIOUS_PAGE
        Type to go to the previous page.
        See Also:
        Constant Field Values
      • NEXT_PAGE

        public static final int NEXT_PAGE
        Type to go to the next page.
        See Also:
        Constant Field Values
      • LAST_PAGE

        public static final int LAST_PAGE
        Type to go to the last page.
        See Also:
        Constant Field Values
      • type

        protected int type
        The type of this action.
      • icon

        protected javax.swing.Icon icon
        The icon corresponding with the action.
    • Constructor Detail

      • PageNavigationAction

        public PageNavigationAction​(PageNavigationListener listener,
                                    int type,
                                    boolean withIcon)
        Creates a page navigation action.
        Parameters:
        listener - the object listening to the page navigation
        type - the type of action
        withIcon - if false, no icon will be attached to the action
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent evt)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        See Also:
        ActionListener.actionPerformed(java.awt.event.ActionEvent)