Class CalendarButtonSkin

    • Field Detail

      • calendarPopup

        protected Window calendarPopup
      • pressed

        protected boolean pressed
    • Constructor Detail

      • CalendarButtonSkin

        public CalendarButtonSkin()
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class ButtonSkin
        Parameters:
        component - The component to which the skin is being attached.
      • enabledChanged

        public void enabledChanged​(Component component)
        Description copied from interface: ComponentStateListener
        Called when a component's enabled state has changed.

        Called both when the component is enabled and when it is disabled. The component's enabled flag has already been set when this method is called so the new state can be determined by calling the Component.isEnabled() method.

        Specified by:
        enabledChanged in interface ComponentStateListener
        Overrides:
        enabledChanged in class ButtonSkin
        Parameters:
        component - The component whose enabled state is changing.
      • focusedChanged

        public void focusedChanged​(Component component,
                                   Component obverseComponent)
        Description copied from interface: ComponentStateListener
        Called when a component's focused state has changed.

        This will be called both when a component gains focus and when it loses focus. The currently focused component has already been set when this method is called, so that the new state of the component can be determined by calling the Component.isFocused() method.

        Specified by:
        focusedChanged in interface ComponentStateListener
        Overrides:
        focusedChanged in class ButtonSkin
        Parameters:
        component - The component that is either gaining focus or the one that previously had focus and is now losing it.
        obverseComponent - If the component is gaining focus, this is the component that is losing focus. If the component is losing focus this is the component that is gaining the focus instead.
      • mouseDown

        public boolean mouseDown​(Component component,
                                 Mouse.Button button,
                                 int x,
                                 int y)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is pressed over a component.
        Specified by:
        mouseDown in interface ComponentMouseButtonListener
        Overrides:
        mouseDown in class ComponentSkin
        Parameters:
        component - Component that is under the mouse pointer.
        button - Which mouse button was pressed.
        x - X position of the mouse.
        y - Y position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate (default).
      • mouseUp

        public boolean mouseUp​(Component component,
                               Mouse.Button button,
                               int x,
                               int y)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is released over a component.
        Specified by:
        mouseUp in interface ComponentMouseButtonListener
        Overrides:
        mouseUp in class ComponentSkin
        Parameters:
        component - Component user the mouse pointer.
        button - Which mouse button that was released.
        x - X position of the mouse.
        y - Y position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate (default).
      • keyReleased

        public boolean keyReleased​(Component component,
                                   int keyCode,
                                   Keyboard.KeyLocation keyLocation)
        SPACE 'presses' the button.
        Specified by:
        keyReleased in interface ComponentKeyListener
        Overrides:
        keyReleased in class ComponentSkin
        Parameters:
        component - Component that has the focus, that is receiving this key event.
        keyCode - Code for the key that was released.
        keyLocation - Location of the key.
        Returns:
        true to consume the event; false to allow it to propagate.
      • yearChanged

        public void yearChanged​(CalendarButton calendarButton,
                                int previousYear)
        Description copied from interface: CalendarButtonListener
        Called when a calendar button's year value has changed.
        Specified by:
        yearChanged in interface CalendarButtonListener
        Parameters:
        calendarButton - The calendar button that changed.
        previousYear - The previously selected year.
      • monthChanged

        public void monthChanged​(CalendarButton calendarButton,
                                 int previousMonth)
        Description copied from interface: CalendarButtonListener
        Called when a calendar button's month value has changed.
        Specified by:
        monthChanged in interface CalendarButtonListener
        Parameters:
        calendarButton - The calendar button that changed.
        previousMonth - The previously selected month.
      • localeChanged

        public void localeChanged​(CalendarButton calendarButton,
                                  java.util.Locale previousLocale)
        Description copied from interface: CalendarButtonListener
        Called when a calendar button's locale has changed.
        Specified by:
        localeChanged in interface CalendarButtonListener
        Parameters:
        calendarButton - The calendar button that changed.
        previousLocale - The previously selected locale for the calendar.