|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.lavantech.gui.comp.CalendarPanel
CalendarPanel displays a given calendar. User can select a date. Unavailable dates are disabled for user selection.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
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 | |
CalendarPanel()
Constructs a CalendarPanel with the current date time. |
|
CalendarPanel(java.util.GregorianCalendar cal)
Constructs a CalendarPanel with the given GregorianCalendar. |
|
CalendarPanel(java.util.GregorianCalendar cal,
java.util.Locale locale)
Constructs a CalendarPanel with the given GregorianCalendar and locale. |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener lis)
Add an action listener that will be notified when the selected date is changed. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener. |
java.util.GregorianCalendar |
getCalendar()
Returns the current selected date. |
DateUnavailabilityModel |
getDateUnavailabilityModel()
Returns the DateUnavailabilityModel for this class. |
java.util.GregorianCalendar |
getMaxSelectableDate()
Returns the maximum date that can be selected in the calendar. |
java.util.GregorianCalendar |
getMinSelectableDate()
Returns the minimum date that can be selected in the calendar. |
java.awt.Color |
getSelectedDayColor()
Returns the color used to indicate the selected day in the calendar panel. |
java.awt.Color |
getUnavailableDayColor()
Returns the color used to indicate unavailable days in the calendar panel. |
boolean |
isEditable()
Returns whether the calendar date can be changed by the user or not. |
boolean |
isEnabled()
Returns whether the CalendarPanel is enabled or not. |
void |
removeActionListener(java.awt.event.ActionListener lis)
Remove an action listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a PropertyChangeListener. |
void |
setBackground(java.awt.Color bg)
Set the background color of this component. |
void |
setCalendar(java.util.GregorianCalendar cal)
Changes the selected date. |
void |
setDateUnavailabilityModel(DateUnavailabilityModel model)
Sets the DateUnavailabilityModel for the CalendarPanel. |
void |
setEditable(boolean edit)
Sets whether the calendar date can be changed by the user or not. |
void |
setEnabled(boolean enable)
Set the CalendarPanel to be enabled or not. |
void |
setFont(java.awt.Font font)
Set the font for this Calendar Panel. |
void |
setForeground(java.awt.Color fg)
Set the foreground color of this component. |
void |
setMaxSelectableDate(java.util.GregorianCalendar maxCal)
Set the maximum date that can be selected with the calendar. |
void |
setMinSelectableDate(java.util.GregorianCalendar minCal)
Set the minimum date that can be selected with the calendar. |
void |
setSelectedDayColor(java.awt.Color color)
Set the color for the selected day box in the Calendar panel. |
void |
setToolTipText(java.lang.String text)
Set the ToolTip Text for this component. |
void |
setUnavailableDayColor(java.awt.Color color)
Set the color for the unavailable days in the Calendar panel. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
Constructor Detail |
public CalendarPanel()
public CalendarPanel(java.util.GregorianCalendar cal)
cal
- The GregorianCalendar that needs to be edited.public CalendarPanel(java.util.GregorianCalendar cal, java.util.Locale locale)
cal
- The GregorianCalendar that needs to be edited.locale
- The Locale that will be used for month and day names.Method Detail |
public java.util.GregorianCalendar getMinSelectableDate()
public void setMinSelectableDate(java.util.GregorianCalendar minCal)
minCal
- Minimum date that can be selected in CalendarPanel. null
can be passed to remove minimum limit.
java.lang.IllegalArgumentException
- If minCal is greater than maxSelectableDatesetDateUnavailabilityModel(com.lavantech.gui.comp.DateUnavailabilityModel)
public java.util.GregorianCalendar getMaxSelectableDate()
public void setMaxSelectableDate(java.util.GregorianCalendar maxCal)
maxCal
- Maximum date that can be selected in CalendarPanel. null
can be passed to remove maximum limit.
java.lang.IllegalArgumentException
- If maxCal is less than minSelectableTimesetDateUnavailabilityModel(com.lavantech.gui.comp.DateUnavailabilityModel)
public boolean isEnabled()
public void setEnabled(boolean enable)
public boolean isEditable()
public void setEditable(boolean edit)
public DateUnavailabilityModel getDateUnavailabilityModel()
public void setDateUnavailabilityModel(DateUnavailabilityModel model)
public java.util.GregorianCalendar getCalendar()
public void setCalendar(java.util.GregorianCalendar cal)
public void setFont(java.awt.Font font)
font
- the desired Font for this componentpublic void setForeground(java.awt.Color fg)
fg
- the desired foreground Color.public void setBackground(java.awt.Color bg)
bg
- the desired background Color.public void setToolTipText(java.lang.String text)
text
- the desired ToolTip. If the text is null, the tooltip is turned off.public java.awt.Color getUnavailableDayColor()
public void setUnavailableDayColor(java.awt.Color color)
public java.awt.Color getSelectedDayColor()
public void setSelectedDayColor(java.awt.Color color)
public void addActionListener(java.awt.event.ActionListener lis)
public void removeActionListener(java.awt.event.ActionListener lis)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |