Documentation of 'org.jdesktop.swingx.plaf.basic.SpinningCalendarHeaderHandler' Java class
SpinningCalendarHeaderHandler
org.jdesktop.swingx.plaf.basic

Class SpinningCalendarHeaderHandler



  • public class SpinningCalendarHeaderHandler
    extends CalendarHeaderHandler
    Custom CalendarHeaderHandler which supports year-wise navigation.

    The custom component used as header component of this implementation contains month-navigation buttons, a label with localized month text and a spinner for .. well ... spinning the years. There is minimal configuration control via the UIManager:

    • control the position of the nextMonth button: the default is at the trailing edge of the header. Option is to insert it directly after the month text, to enable set a Boolean.TRUE as value for key ARROWS_SURROUNDS_MONTH.
    • control the focusability of the spinner's text field: the default is false. To enable set a Boolean.TRUE as value for key FOCUSABLE_SPINNER_TEXT.
    Note: this header is not used by default. To make it the per-application default register it with the UIManager, like
    
     UIManager.put(CalendarHeaderHandler.uiControllerID, 
          "org.jdesktop.swingx.plaf.basic.SpinningCalendarHeaderHandler");
     
     
    PENDING JW: implement and bind actions for keyboard navigation. These are potentially different from navigation by mouse: need to move the selection along with the scrolling?
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ARROWS_SURROUND_MONTH
      Key for use in UIManager to control the position of the nextMonth arrow.
      static java.lang.String FOCUSABLE_SPINNER_TEXT
      Key for use in UIManager to control the focusable property of the year spinner.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      org.jdesktop.swingx.plaf.basic.SpinningCalendarHeaderHandler.SpinningCalendarHeader getHeaderComponent()
      Returns a component to be used as header in a zoomable month view, guaranteed to be not null.
      void install(JXMonthView monthView)
      Installs this handler to the given month view.
      void uninstall(JXMonthView monthView)
      Uninstalls this handler from the given target month view.
      • Methods inherited from class java.lang.Object

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

      • ARROWS_SURROUND_MONTH

        public static final java.lang.String ARROWS_SURROUND_MONTH
        Key for use in UIManager to control the position of the nextMonth arrow.
        See Also:
        Constant Field Values
      • FOCUSABLE_SPINNER_TEXT

        public static final java.lang.String FOCUSABLE_SPINNER_TEXT
        Key for use in UIManager to control the focusable property of the year spinner.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SpinningCalendarHeaderHandler

        public SpinningCalendarHeaderHandler()
    • Method Detail

      • install

        public void install(JXMonthView monthView)
        Installs this handler to the given month view.

        Overridden to configure header specifics component after calling super.

        Overrides:
        install in class CalendarHeaderHandler
        Parameters:
        monthView - the target month view to install to.
      • uninstall

        public void uninstall(JXMonthView monthView)
        Uninstalls this handler from the given target month view.

        Overridden to cleanup the specifics before calling super.

        Overrides:
        uninstall in class CalendarHeaderHandler
        Parameters:
        monthView - the target month view to install from.
      • getHeaderComponent

        public org.jdesktop.swingx.plaf.basic.SpinningCalendarHeaderHandler.SpinningCalendarHeader getHeaderComponent()
        Returns a component to be used as header in a zoomable month view, guaranteed to be not null.

        Convenience override to the type created.

        Overrides:
        getHeaderComponent in class CalendarHeaderHandler
        Returns:
        a component to be used as header in a zoomable JXMonthView

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.