public final class CalendarPanel
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | DOUBLE_CLICK_COMMANDThe command for the action fired when the user double clicks on the calendar grid | 
| static java.lang.String | SELECTION_CHANGED_COMMANDThe command for the action fired when the selection of dates in the calendar changes | 
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description | 
|---|
| CalendarPanel() | 
| CalendarPanel(java.util.Locale locale)Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addActionListener(java.awt.event.ActionListener listener) | 
| void | addSelectedDates(java.util.Date[] dates)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| CalendarDateProvider | getDateProvider()Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| java.util.Set<java.time.ZonedDateTime> | getDates() | 
| java.util.Date | getMaximumDate()Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| java.util.Date | getMinimumDate()Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| CalendarModel | getModel()Get the model used by this calendar. | 
| java.util.TimeZone | getNearestTimeZone(java.util.TimeZone timeZone)Deprecated. 
 the calendar now shows all time zones, so this method will always return the passed in time zone. | 
| java.util.Date[] | getSelectedDates()Deprecated. 
 new Java time api in JDK8 has better classes than java.util.Date for this sort of thing. 
 Use getDates() instead. | 
| boolean | getShowTimeZone() | 
| java.util.TimeZone | getTimeZone()Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| java.util.TimeZone | getTimeZoneInList(java.util.TimeZone timeZone)Deprecated. 
 the calendar now shows all time zones, so this method will always return the passed in time zone. | 
| java.util.Date | getVisibleDate()Deprecated. 
 use the java.time API instead of java.util.Date | 
| boolean | isEditingTime() | 
| boolean | isMultiSelect() | 
| boolean | isShowingTime() | 
| void | makeDateVisible(java.util.Date date)Deprecated. 
 use the java.time API instead of java.util.Date | 
| void | removeActionListener(java.awt.event.ActionListener listener) | 
| void | removeSelectedDates(java.util.Date[] dates)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| void | setDateProvider(CalendarDateProvider calDateProvider)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| void | setEditTime(boolean editTime) | 
| void | setLocale(java.util.Locale l) | 
| void | setMaximumDate(java.util.Date maximumDate)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| void | setMinimumDate(java.util.Date minimumDate)Deprecated. 
 use CalendarModel directly with java.time API | 
| void | setMultiSelect(boolean isMultiSelect) | 
| void | setSelectedDate(java.util.Date date)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| void | setSelectedDates(java.util.Date[] dates)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| void | setShowTime(boolean showTime)Show or hide BOTH time and time zone components. | 
| void | setShowTimeZone(boolean showTimeZone) | 
| void | setTimeZone(java.util.TimeZone timeZone)Deprecated. 
 use CalendarModel and the java.time API instead of java.util.Date | 
| void | setVisibleDate(boolean visible)Turn on or off the display of the date component in this
 CalenderPanel (on by default). | 
| void | setVisibleTime(boolean visible)Turn on or off the display of the time component in this
 CalenderPanel. | 
| void | setVisibleTimeZone(boolean visible)Turn on or off the display of the time zone component in this
 CalenderPanel. | 
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String DOUBLE_CLICK_COMMAND
public static final java.lang.String SELECTION_CHANGED_COMMAND
@Deprecated public CalendarPanel(java.util.Locale locale)
locale - public CalendarPanel()
public void setLocale(java.util.Locale l)
setLocale in class java.awt.Componentpublic CalendarModel getModel()
@Deprecated public java.util.Date[] getSelectedDates()
If the calendar is displaying the time section (in either edit or display mode) then the time portion (hours/minutes/seconds) for all returned dates will match the displayed time. Note: This means that any date set using setSelectedDate() or setSelectedDates() may not exactly match the return values for the same day. Calendar time
public java.util.Set<java.time.ZonedDateTime> getDates()
@Deprecated public void setSelectedDate(java.util.Date date)
date - @Deprecated public void setTimeZone(java.util.TimeZone timeZone)
timeZone - the time zone to set@Deprecated public java.util.TimeZone getTimeZone()
public void setMultiSelect(boolean isMultiSelect)
public boolean isMultiSelect()
@Deprecated public void setSelectedDates(java.util.Date[] dates)
dates - @Deprecated public void addSelectedDates(java.util.Date[] dates)
dates - @Deprecated public void removeSelectedDates(java.util.Date[] dates)
dates - @Deprecated public java.util.Date getVisibleDate()
@Deprecated public void makeDateVisible(java.util.Date date)
date - @Deprecated public void setMinimumDate(java.util.Date minimumDate)
minimumDate - @Deprecated public java.util.Date getMinimumDate()
@Deprecated public void setMaximumDate(java.util.Date maximumDate)
@Deprecated public java.util.Date getMaximumDate()
@Deprecated public void setDateProvider(CalendarDateProvider calDateProvider)
@Deprecated public CalendarDateProvider getDateProvider()
public void setShowTime(boolean showTime)
showTime - public boolean isShowingTime()
public void setEditTime(boolean editTime)
public boolean isEditingTime()
public void setShowTimeZone(boolean showTimeZone)
public boolean getShowTimeZone()
public void setVisibleDate(boolean visible)
visible - boolean true to make it visible;
        false to make it invisible.public void setVisibleTime(boolean visible)
setShowTimeZone(boolean), this
 method and setVisibleTimeZone(boolean) may be used to make the
 time only and time zone components separatly visible.visible - boolean true to make it visible;
        false to make it invisible.public void setVisibleTimeZone(boolean visible)
setShowTimeZone(boolean), this
 method and setVisibleTime(boolean) may be used to make the time
 zone and time only components separatly visible.visible - boolean true to make it visible;
        false to make it invisible.@Deprecated public java.util.TimeZone getNearestTimeZone(java.util.TimeZone timeZone)
timeZone - TimeZone to be checked.@Deprecated public java.util.TimeZone getTimeZoneInList(java.util.TimeZone timeZone)
timeZone - TimeZone to be located.public void addActionListener(java.awt.event.ActionListener listener)
public void removeActionListener(java.awt.event.ActionListener listener)