Class BasicMonthViewUI.KeyboardAction

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

    private class BasicMonthViewUI.KeyboardAction
    extends javax.swing.AbstractAction
    Class that supports keyboard traversal of the JXMonthView component.
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyboardAction​(int action)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent ev)  
      private void addToSelection​(int action)
      If we are in a mode that allows for range selection this method will extend the currently selected range.
      private boolean isIntervalMode()  
      private java.util.Date nextDay​(java.util.Calendar cal, java.util.Date date)  
      private java.util.Date nextWeek​(java.util.Calendar cal, java.util.Date date)  
      private java.util.Date previousDay​(java.util.Calendar cal, java.util.Date date)  
      private java.util.Date previousWeek​(java.util.Calendar cal, java.util.Date date)  
      private void traverse​(int action)  
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • 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

      • KeyboardAction

        public KeyboardAction​(int action)
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent ev)
      • isIntervalMode

        private boolean isIntervalMode()
        Returns:
      • traverse

        private void traverse​(int action)
      • addToSelection

        private void addToSelection​(int action)
        If we are in a mode that allows for range selection this method will extend the currently selected range. NOTE: This may not be the expected behavior for the keyboard controls and we ay need to update this code to act in a way that people expect.
        Parameters:
        action - action for adjusting selection
      • nextWeek

        private java.util.Date nextWeek​(java.util.Calendar cal,
                                        java.util.Date date)
        Parameters:
        cal -
        date -
        Returns:
      • previousWeek

        private java.util.Date previousWeek​(java.util.Calendar cal,
                                            java.util.Date date)
        Parameters:
        cal -
        date -
        Returns:
      • nextDay

        private java.util.Date nextDay​(java.util.Calendar cal,
                                       java.util.Date date)
        Parameters:
        cal -
        date -
        Returns:
      • previousDay

        private java.util.Date previousDay​(java.util.Calendar cal,
                                           java.util.Date date)
        Parameters:
        cal -
        date -
        Returns: