public class WebCalendar extends WebPanel
WebDateField,
Serialized Formjavax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected boolean |
animate
Whether should animate month transitions or not.
|
protected java.util.Date |
date
Currently selected date.
|
protected DateCustomizer |
dateCustomizer
Date buttons customizer.
|
protected java.util.List<DateListener> |
dateListeners
Date selection listeners.
|
protected boolean |
displayWeekNumbers
Whether should display week numbers or not.
|
protected boolean |
horizontalSlide
Whether should perform horizontal slide animation or not.
|
protected WebToggleButton |
lastSelectedDayButton |
protected WebPanel |
monthDays |
protected ComponentTransition |
monthDaysTransition |
protected WebButton |
next |
static javax.swing.ImageIcon |
nextIcon |
protected WebButton |
nextSkip |
static javax.swing.ImageIcon |
nextSkipIcon |
protected java.util.Date |
oldShownDate
Previously displayed month date.
|
protected WebButton |
previous |
static javax.swing.ImageIcon |
previousIcon |
protected WebButton |
previousSkip
UI components.
|
static javax.swing.ImageIcon |
previousSkipIcon
Used icons.
|
protected java.util.Date |
shownDate
Displayed month date.
|
protected boolean |
startWeekFromSunday
Whether sunday should be the first day of week or not.
|
protected java.text.SimpleDateFormat |
titleFormat
Calendar title format.
|
protected WebLabel |
titleLabel |
protected WebPanel |
weekHeaders |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTEMPTYEMPTYUNDEFINED| Constructor and Description |
|---|
WebCalendar()
Constructs new calendar without selected date.
|
WebCalendar(java.util.Date date)
Constructs new calendar with the specified selected date.
|
WebCalendar(StyleId id)
Constructs new calendar without selected date.
|
WebCalendar(StyleId id,
java.util.Date date)
Constructs new calendar with the specified selected date.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDateSelectionListener(DateListener listener)
Adds date selection listener.
|
protected void |
changeMonth(int change)
Changes displayed month.
|
protected void |
changeYear(int change)
Changes displayed year.
|
protected WebPanel |
createMonthPanel()
Creates and returns month panel.
|
void |
fireDateSelected(java.util.Date date)
Informs about date selection change.
|
protected double[] |
getContentColumns()
Returns content columns.
|
java.util.Date |
getDate()
Returns currently selected date.
|
DateCustomizer |
getDateCustomizer()
Returns date buttons customizer.
|
protected int |
getFirstDatesColumn()
Returns first content column.
|
protected Direction |
getNextDirection(boolean ltr)
Returns next month transition direction.
|
protected Direction |
getPrevDirection(boolean ltr)
Returns previous month transition direction.
|
java.util.Date |
getShownDate()
Returns displayed month date.
|
java.text.SimpleDateFormat |
getTitleFormat()
Returns title format.
|
boolean |
isAnimate()
Returns whether should animate month transitions or not.
|
boolean |
isDisplayWeekNumbers()
Returns whether week numbers are displayed or not.
|
boolean |
isHorizontalSlide()
Returns whether should perform horizontal slide animation or not.
|
boolean |
isStartWeekFromSunday()
Returns whether sunday should be the first day of week or not.
|
void |
removeDateSelectionListener(DateListener listener)
Removes date selection listener.
|
protected void |
requestFocusToSelected()
Requests focus to last selected date button.
|
void |
setAnimate(boolean animate)
Sets whether should animate month transitions or not.
|
void |
setDate(java.util.Date date)
Sets currently selected and displayed date.
|
void |
setDate(java.util.Date date,
boolean animate)
Sets currently selected and displayed date.
|
void |
setDateCustomizer(DateCustomizer dateCustomizer)
Sets date buttons customizer.
|
protected void |
setDateImpl(java.util.Date date)
Sets currently selected and displayed date.
|
protected void |
setDateImpl(java.util.Date date,
boolean animate)
Sets currently selected and displayed date.
|
void |
setDisplayWeekNumbers(boolean display)
Sets whether should display week numbers or not.
|
void |
setEnabled(boolean enabled) |
void |
setHorizontalSlide(boolean horizontalSlide)
Sets whether should perform horizontal slide animation or not.
|
void |
setShownDate(java.util.Date date)
Sets displayed month date.
|
void |
setShownDate(java.util.Date date,
boolean animate)
Sets displayed month date.
|
void |
setStartWeekFromSunday(boolean startWeekFromSunday)
Sets whether sunday should be the first day of week or not.
|
void |
setTitleFormat(java.text.SimpleDateFormat titleFormat)
Sets title format.
|
protected void |
updateMonth(boolean animate)
Switches view to new displayed month.
|
protected void |
updateMonth(javax.swing.JPanel monthDays)
Updates displayed month date buttons.
|
protected void |
updateTitleLabel()
Switches to new title label.
|
protected void |
updateWeekHeaders()
Updates week headers.
|
add, add, add, add, add, add, addStyleListener, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, contains, equalizeComponentsHeight, equalizeComponentsSize, equalizeComponentsWidth, getCustomPainter, getCustomPainter, getCustomPainters, getFirstComponent, getLanguageContainerKey, getLastComponent, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getPadding, getPreferredHeight, getPreferredSize, getPreferredWidth, getSkin, getStyleId, onDoubleClick, onFocusGain, onFocusLoss, onKeyPress, onKeyPress, onKeyRelease, onKeyRelease, onKeyType, onKeyType, onMenuTrigger, onMouseClick, onMouseClick, onMouseDrag, onMouseDrag, onMouseEnter, onMouseExit, onMousePress, onMousePress, provideShape, remove, remove, removeAll, removeLanguageContainerKey, removeStyleListener, removeToolTip, removeToolTips, removeToolTips, removeToolTips, restoreDefaultPainters, restoreSkin, setCustomPainter, setCustomPainter, setLanguageContainerKey, setMargin, setMargin, setMargin, setMaximumHeight, setMaximumWidth, setMinimumHeight, setMinimumWidth, setPadding, setPadding, setPadding, setPreferredHeight, setPreferredSize, setPreferredWidth, setSkin, setSkin, setStyleId, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, updateUIgetAccessibleContext, getUI, getUIClassID, paramString, setUIaddAncestorListener, 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, 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, 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, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final javax.swing.ImageIcon previousSkipIcon
public static final javax.swing.ImageIcon previousIcon
public static final javax.swing.ImageIcon nextIcon
public static final javax.swing.ImageIcon nextSkipIcon
protected java.util.List<DateListener> dateListeners
protected java.text.SimpleDateFormat titleFormat
protected boolean startWeekFromSunday
protected boolean displayWeekNumbers
protected boolean animate
protected boolean horizontalSlide
protected DateCustomizer dateCustomizer
protected java.util.Date date
protected java.util.Date shownDate
protected java.util.Date oldShownDate
protected WebButton previousSkip
protected WebButton previous
protected WebLabel titleLabel
protected WebButton next
protected WebButton nextSkip
protected WebPanel weekHeaders
protected WebPanel monthDays
protected ComponentTransition monthDaysTransition
protected WebToggleButton lastSelectedDayButton
public WebCalendar()
public WebCalendar(java.util.Date date)
date - selected datepublic WebCalendar(StyleId id)
id - style IDpublic WebCalendar(StyleId id, java.util.Date date)
id - style IDdate - selected dateprotected void updateTitleLabel()
protected void updateMonth(boolean animate)
animate - whether should animate transition or notprotected void changeMonth(int change)
change - months change amountprotected void changeYear(int change)
change - years change amountprotected double[] getContentColumns()
protected int getFirstDatesColumn()
protected WebPanel createMonthPanel()
protected void requestFocusToSelected()
protected Direction getNextDirection(boolean ltr)
ltr - whether LTR orientation or notprotected Direction getPrevDirection(boolean ltr)
ltr - whether LTR orientation or notprotected void updateWeekHeaders()
protected void updateMonth(javax.swing.JPanel monthDays)
monthDays - panel to updatepublic java.text.SimpleDateFormat getTitleFormat()
public void setTitleFormat(java.text.SimpleDateFormat titleFormat)
titleFormat - title formatpublic java.util.Date getDate()
public void setDate(java.util.Date date)
date - date to select and displaypublic void setDate(java.util.Date date,
boolean animate)
date - date to select and displayanimate - whether should animate month transition or notprotected void setDateImpl(java.util.Date date)
date - date to select and displayprotected void setDateImpl(java.util.Date date,
boolean animate)
date - date to select and displayanimate - whether should animate month transition or notpublic java.util.Date getShownDate()
public void setShownDate(java.util.Date date)
date - displayed month datepublic void setShownDate(java.util.Date date,
boolean animate)
date - displayed month dateanimate - whether should animate month transition or notpublic boolean isStartWeekFromSunday()
public void setStartWeekFromSunday(boolean startWeekFromSunday)
startWeekFromSunday - whether sunday should be the first day of week or notpublic boolean isDisplayWeekNumbers()
public void setDisplayWeekNumbers(boolean display)
display - whether should display week numbers or notpublic boolean isAnimate()
public void setAnimate(boolean animate)
animate - whether should animate month transitions or notpublic boolean isHorizontalSlide()
public void setHorizontalSlide(boolean horizontalSlide)
horizontalSlide - whether should perform horizontal slide animation or notpublic DateCustomizer getDateCustomizer()
public void setDateCustomizer(DateCustomizer dateCustomizer)
dateCustomizer - date buttons customizerpublic void setEnabled(boolean enabled)
setEnabled in class javax.swing.JComponentpublic void addDateSelectionListener(DateListener listener)
listener - date selection listenerpublic void removeDateSelectionListener(DateListener listener)
listener - date selection listenerpublic void fireDateSelected(java.util.Date date)
date - new selected date