JDatePicker v4.3

com.standbysoft.component.date.swing
Interface JDatePicker.Popup

Enclosing interface:
JDatePicker

public static interface JDatePicker.Popup

This interface defines the access to the popup used by a date picker. More importantly, it offers a way of accessing the calendar (monthview) that is used in the popup. This helps to configure and customize it.


Method Summary
 void addPopupListener(PopupListener listener)
          Registers a popup listener that will receive notifications when the popup visbility changes.
 JMonthView getMonthView()
          Returns the JMonthView component that is displayed in the popup.
 boolean isVisible()
          Determines whether the popup is visible or not.
 void removePopupListener(PopupListener listener)
          Removes a popup listener registered on this popup.
 void setVisible(boolean enabled)
          Shows or hides this popup.
 

Method Detail

getMonthView

public JMonthView getMonthView()

Returns the JMonthView component that is displayed in the popup.

WARNING: You should use this method only to configure its appearance: colors, status, number of months, etc. Do not change any of its models (date selection model, for instance) as they are handled by the JDatePicker UI delegate.

The only reason this component is exposed through this interface is to make its appearance configuration easier. Another approach (as in the design from previous versions), would be to have A LOT of delegate methods in JDatePicker that pass the settings to the JDatePicker UI delegate to configure the JMonthView.

Returns:
JMonthView component that is displayed in the popup.

setVisible

public void setVisible(boolean enabled)
Shows or hides this popup.

Parameters:
enabled - true to show it and false to hide it

isVisible

public boolean isVisible()
Determines whether the popup is visible or not.

Returns:
true if the popup is showing or false if it is hidden.

addPopupListener

public void addPopupListener(PopupListener listener)
Registers a popup listener that will receive notifications when the popup visbility changes.

Parameters:
listener - listener that is registered
See Also:
removePopupListener(PopupListener)

removePopupListener

public void removePopupListener(PopupListener listener)
Removes a popup listener registered on this popup.

Parameters:
listener - listener that is removed

JDatePicker v4.3

Visit www.jdatepicker.com for further information or send us your suggestions.

Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.