MDateSelector

mseries.plaf.basic
Class BasicDateEntryUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by mseries.plaf.basic.BasicDateEntryUI
All Implemented Interfaces:
PropertyChangeListener, EventListener
Direct Known Subclasses:
AquaDateEntryUI, MacDateEntryUI, MetalDateEntryUI, WindowsDateEntryUI

public class BasicDateEntryUI
extends ComponentUI
implements PropertyChangeListener


Nested Class Summary
protected  class BasicDateEntryUI.CancelAction
           
protected  class BasicDateEntryUI.CloseAction
           
protected  class BasicDateEntryUI.OpenAction
           
protected  class BasicDateEntryUI.OpenCloseAction
          Class to encapsulate the open and close action, activated by the button and keyboard keys
 
Field Summary
protected  JButton arrowButton
           
protected  MDateEntryField dateEntry
           
 
Constructor Summary
BasicDateEntryUI()
           
 
Method Summary
protected  void configureBorder(JComponent c)
          This is where we add a border the component, (the display field and the button)
 void configureDisplay(JComponent display)
          This is where we would configure the display field part of the component, such as remove the dfault border and change preferred size.
protected  Action createActionListener()
           
protected  AncestorListener createAncestorListener()
          Deals with the components ancestor being moved & removed, especially for when the component is used in an Applet & the browser is closed.
protected  JButton createArrowButton()
          Creates the arrow button.
protected  LayoutManager createLayoutManager()
          Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left.
protected  MDateSelectorPanel createMDateSelectorPanel()
           
protected  MMonthListener createMMonthListener()
           
protected  MouseListener createMouseListener()
           
static ComponentUI createUI(JComponent x)
          This method is called by the UIManager to get an instance of this class and must be overridden in subclasses.
protected  Insets getInsets()
          Gets the insets from the JComboBox.
protected  void installComponents()
          The editor and arrow button are added to the JComboBox here.
protected  void installListeners()
           
 void installUI(JComponent c)
           
 void paint(Graphics g, JComponent c)
           
 void propertyChange(PropertyChangeEvent evt)
           
protected  void registerKeyboardActions()
           
protected  void uninstallComponents()
           
protected  void uninstallListeners()
           
 void uninstallUI(JComponent c)
           
protected  void unRegisterKeyboardActions()
           
 void update(Graphics g, JComponent c)
           
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrowButton

protected JButton arrowButton

dateEntry

protected MDateEntryField dateEntry
Constructor Detail

BasicDateEntryUI

public BasicDateEntryUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent x)
This method is called by the UIManager to get an instance of this class and must be overridden in subclasses.


installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

update

public void update(Graphics g,
                   JComponent c)
Overrides:
update in class ComponentUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

createLayoutManager

protected LayoutManager createLayoutManager()
Creates the standard combo box layout manager that has the arrow button to the right and the editor to the left. Returns an instance of BasicComboBoxUI$ComboBoxLayoutManager.


installComponents

protected void installComponents()
The editor and arrow button are added to the JComboBox here.


uninstallComponents

protected void uninstallComponents()

createArrowButton

protected JButton createArrowButton()
Creates the arrow button. Subclasses can create any button they like. The default behavior of this class is to attach various listeners to the button returned by this method. Returns an instance of BasicArrowButton.


getInsets

protected Insets getInsets()
Gets the insets from the JComboBox.


configureBorder

protected void configureBorder(JComponent c)
This is where we add a border the component, (the display field and the button)

Parameters:
c - the entire component

configureDisplay

public void configureDisplay(JComponent display)
This is where we would configure the display field part of the component, such as remove the dfault border and change preferred size.

Parameters:
display - the display part of the component

createActionListener

protected Action createActionListener()

createMouseListener

protected MouseListener createMouseListener()

registerKeyboardActions

protected void registerKeyboardActions()

unRegisterKeyboardActions

protected void unRegisterKeyboardActions()

createMDateSelectorPanel

protected MDateSelectorPanel createMDateSelectorPanel()

createMMonthListener

protected MMonthListener createMMonthListener()

createAncestorListener

protected AncestorListener createAncestorListener()
Deals with the components ancestor being moved & removed, especially for when the component is used in an Applet & the browser is closed.


propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

MDateSelector

Copyright © 2001-2007 M Newstead. All Rights Reserved.