|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.alee.laf.panel.WebPanel com.alee.extended.date.WebCalendar
public class WebCalendar
This is a custom calendar component.
WebDateField
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected boolean |
animate
Whether should animate month transitions or not. |
protected java.awt.Color |
currentMonthForeground
Current month date buttons foreground. |
protected java.util.Date |
date
Currently selected date. |
protected DateCustomizer |
dateCustomizer
Date buttons customizer. |
protected java.util.List<DateSelectionListener> |
dateSelectionListeners
Date selection listeners. |
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 java.awt.Color |
otherMonthForeground
Other month date buttons foreground. |
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 ComponentTransition |
titlePanel
|
protected java.awt.Color |
weekendsForeground
Weekends date buttons foreground. |
protected WebPanel |
weekHeaders
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
WebCalendar()
Constructs new calendar without selected date. |
|
WebCalendar(java.util.Date date)
Constructs new calendar with the specified selected date. |
Method Summary | |
---|---|
void |
addDateSelectionListener(DateSelectionListener 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. |
protected WebLabel |
createTitleLabel()
Creates and returns title label. |
void |
fireDateSelected(java.util.Date date)
Informs about date selection change. |
java.awt.Color |
getCurrentMonthForeground()
Returns current month date buttons foreground. |
java.util.Date |
getDate()
Returns currently selected date. |
DateCustomizer |
getDateCustomizer()
Returns date buttons customizer. |
protected Direction |
getNextDirection(boolean ltr)
Returns next month transition direction. |
java.awt.Color |
getOtherMonthForeground()
Returns other month date buttons foreground. |
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. |
java.awt.Color |
getWeekendsForeground()
Returns weekends date buttons foreground. |
boolean |
isAnimate()
Returns whether should animate month transitions 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(DateSelectionListener 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 |
setCurrentMonthForeground(java.awt.Color color)
Sets current month date buttons foreground. |
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 |
setEnabled(boolean enabled)
|
void |
setHorizontalSlide(boolean horizontalSlide)
Sets whether should perform horizontal slide animation or not. |
void |
setOtherMonthForeground(java.awt.Color color)
Sets other month date buttons foreground. |
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. |
void |
setWeekendsForeground(java.awt.Color color)
Sets weekends date buttons foreground. |
protected void |
switchMonth(boolean animate)
Switches view to new displayed month. |
protected void |
switchTitleLabel()
Switches to new title label. |
protected void |
updateMonth(javax.swing.JPanel monthDays)
Updates displayed month date buttons. |
protected void |
updateTitleLabel()
Updates title label text. |
protected void |
updateWeekHeaders()
Updates week headers. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, update |
Methods inherited from class java.awt.Container |
---|
add, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, 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, hide, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public 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<DateSelectionListener> dateSelectionListeners
protected java.text.SimpleDateFormat titleFormat
protected boolean startWeekFromSunday
protected boolean animate
protected boolean horizontalSlide
protected java.awt.Color otherMonthForeground
protected java.awt.Color currentMonthForeground
protected java.awt.Color weekendsForeground
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 ComponentTransition titlePanel
protected WebLabel titleLabel
protected WebButton next
protected WebButton nextSkip
protected WebPanel weekHeaders
protected WebPanel monthDays
protected ComponentTransition monthDaysTransition
protected WebToggleButton lastSelectedDayButton
Constructor Detail |
---|
public WebCalendar()
public WebCalendar(java.util.Date date)
date
- selected dateMethod Detail |
---|
protected WebLabel createTitleLabel()
protected void switchTitleLabel()
protected void updateTitleLabel()
protected void changeMonth(int change)
change
- months change amountprotected void changeYear(int change)
change
- years change amountprotected WebPanel createMonthPanel()
protected void switchMonth(boolean animate)
animate
- whether should animate transition or notprotected void requestFocusToSelected()
protected Direction getNextDirection(boolean ltr)
ltr
- whether LTR orientation or not
protected Direction getPrevDirection(boolean ltr)
ltr
- whether LTR orientation or not
protected 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 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 java.awt.Color getOtherMonthForeground()
public void setOtherMonthForeground(java.awt.Color color)
color
- other month date buttons foregroundpublic java.awt.Color getCurrentMonthForeground()
public void setCurrentMonthForeground(java.awt.Color color)
color
- current month date buttons foregroundpublic java.awt.Color getWeekendsForeground()
public void setWeekendsForeground(java.awt.Color color)
color
- weekends date buttons foregroundpublic DateCustomizer getDateCustomizer()
public void setDateCustomizer(DateCustomizer dateCustomizer)
dateCustomizer
- date buttons customizerpublic void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
public void addDateSelectionListener(DateSelectionListener listener)
listener
- date selection listenerpublic void removeDateSelectionListener(DateSelectionListener listener)
listener
- date selection listenerpublic void fireDateSelected(java.util.Date date)
date
- new selected date
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |