Class BasicDatePickerUI.Handler

java.lang.Object
org.jdesktop.swingx.plaf.basic.BasicDatePickerUI.Handler
All Implemented Interfaces:
ActionListener, FocusListener, MouseListener, MouseMotionListener, LayoutManager, PropertyChangeListener, EventListener, DateSelectionListener
Enclosing class:
BasicDatePickerUI

PENDING: JW - I really hate the one-in-all. Wont touch it for now, maybe later. As long as we have it, the new listeners (dateSelection) are here too, for consistency. Adding the Layout here as well is ... , IMO.
  • Field Details

    • _forwardReleaseEvent

      private boolean _forwardReleaseEvent
  • Constructor Details

    • Handler

      private Handler()
  • Method Details

    • mouseClicked

      public void mouseClicked(MouseEvent ev)
      Specified by:
      mouseClicked in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent ev)
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent ev)
      Specified by:
      mouseReleased in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent ev)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent ev)
      Specified by:
      mouseExited in interface MouseListener
    • mouseDragged

      public void mouseDragged(MouseEvent ev)
      Specified by:
      mouseDragged in interface MouseMotionListener
    • mouseMoved

      public void mouseMoved(MouseEvent ev)
      Specified by:
      mouseMoved in interface MouseMotionListener
    • valueChanged

      public void valueChanged(DateSelectionEvent ev)
      Specified by:
      valueChanged in interface DateSelectionListener
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • editorPropertyChange

      private void editorPropertyChange(PropertyChangeEvent evt)
      Handles property changes from datepicker's editor.
      Parameters:
      e - the PropertyChangeEvent object describing the event source and the property that has changed
    • datePickerPropertyChange

      private void datePickerPropertyChange(PropertyChangeEvent e)
      Handles property changes from DatePicker.
      Parameters:
      e - the PropertyChangeEvent object describing the event source and the property that has changed
    • monthViewPropertyChange

      private void monthViewPropertyChange(PropertyChangeEvent e)
      Handles propertyChanges from the picker's monthView.
      Parameters:
      e - the PropertyChangeEvent object describing the event source and the property that has changed
    • buttonPropertyChange

      private void buttonPropertyChange(PropertyChangeEvent e)
      Handles propertyChanges from the picker's popupButton. PENDING: does nothing, kept while refactoring .. which properties from the button do we want to handle?
      Parameters:
      e - the PropertyChangeEvent object describing the event source and the property that has changed.
    • addLayoutComponent

      public void addLayoutComponent(String name, Component comp)
      Specified by:
      addLayoutComponent in interface LayoutManager
    • removeLayoutComponent

      public void removeLayoutComponent(Component comp)
      Specified by:
      removeLayoutComponent in interface LayoutManager
    • preferredLayoutSize

      public Dimension preferredLayoutSize(Container parent)
      Specified by:
      preferredLayoutSize in interface LayoutManager
    • minimumLayoutSize

      public Dimension minimumLayoutSize(Container parent)
      Specified by:
      minimumLayoutSize in interface LayoutManager
    • layoutContainer

      public void layoutContainer(Container parent)
      Specified by:
      layoutContainer in interface LayoutManager
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • editorActionPerformed

      private void editorActionPerformed(ActionEvent e)
      Listening to actionEvents fired by the picker's editor.
      Parameters:
      e -
    • monthViewActionPerformed

      private void monthViewActionPerformed(ActionEvent e)
      Listening to actionEvents fired by the picker's monthView.
      Parameters:
      e -
    • focusGained

      public void focusGained(FocusEvent e)
      Issue #573-swingx - F2 in table doesn't focus the editor. Do the same as combo: manually pass-on the focus to the editor.
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent e)
      #565-swingx: popup not hidden if clicked into combo. The problem is that the combo uses the same trick as this datepicker to prevent auto-closing of the popup if focus is transfered back to the picker's editor. The idea is to hide the popup manually when the permanentFocusOwner changes to somewhere else. JW: doesn't work - we only get the temporary lost, but no permanent loss if the focus is transfered from the focusOwner to a new permanentFocusOwner. OOOkaay ... looks like exclusively related to a combo: we do get the expected focusLost if the focus is transferred permanently from the temporary focusowner to a new "normal" permanentFocusOwner (like a textfield), we don't get it if transfered to a tricksing owner (like a combo or picker). So can't do anything here. listen to keyboardFocusManager?
      Specified by:
      focusLost in interface FocusListener