|
||||||||||
| 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
gui.dialogs.calendar.JDayChooser
public class JDayChooser
JDayChooser is a bean for choosing a day.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, 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 | |
|---|---|
JDayChooser()
Default JDayChooser constructor. |
|
JDayChooser(boolean weekOfYearVisible)
JDayChooser constructor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
JDayChooser is the ActionListener for all day buttons. |
void |
focusGained(java.awt.event.FocusEvent e)
JDayChooser is the FocusListener for all day buttons. |
void |
focusLost(java.awt.event.FocusEvent e)
Does nothing. |
int |
getDay()
Returns the selected day. |
javax.swing.JPanel |
getDayPanel()
Returns the day panel. |
java.awt.Color |
getDecorationBackgroundColor()
Returns the color of the decoration (day names and weeks). |
java.util.Locale |
getLocale()
Returns the locale. |
int |
getMaxDayCharacters()
Gets the maximum number of characters of a day name or 0. |
java.util.Date |
getMaxSelectableDate()
Gets the maximum selectable date. |
java.util.Date |
getMinSelectableDate()
Gets the minimum selectable date. |
java.awt.Color |
getSundayForeground()
Returns the Sunday foreground. |
java.awt.Color |
getWeekdayForeground()
Returns the weekday foreground. |
boolean |
isDayBordersVisible()
|
boolean |
isDecorationBackgroundVisible()
The decoration background is the background color of the day titles and the weeks of the year. |
boolean |
isDecorationBordersVisible()
The decoration border is the button border of the day titles and the weeks of the year. |
boolean |
isWeekOfYearVisible()
In some Countries it is often usefull to know in which week of the year a date is. |
void |
keyPressed(java.awt.event.KeyEvent e)
JDayChooser is the KeyListener for all day buttons. |
void |
keyReleased(java.awt.event.KeyEvent e)
Does nothing. |
void |
keyTyped(java.awt.event.KeyEvent e)
Does nothing. |
static void |
main(java.lang.String[] s)
Creates a JFrame with a JDayChooser inside and can be used for testing. |
void |
setAlwaysFireDayProperty(boolean alwaysFire)
this is needed for JDateChooser. |
void |
setCalendar(java.util.Calendar calendar)
Sets a specific calendar. |
void |
setDay(int d)
Sets the day. |
void |
setDayBordersVisible(boolean dayBordersVisible)
|
void |
setDecorationBackgroundColor(java.awt.Color decorationBackgroundColor)
Sets the background of days and weeks of year buttons. |
void |
setDecorationBackgroundVisible(boolean decorationBackgroundVisible)
The decoration background is the background color of the day titles and the weeks of the year. |
void |
setDecorationBordersVisible(boolean decorationBordersVisible)
The decoration border is the button border of the day titles and the weeks of the year. |
void |
setEnabled(boolean enabled)
Enable or disable the JDayChooser. |
void |
setFocus()
Requests that the selected day also have the focus. |
void |
setFont(java.awt.Font font)
Sets the font property. |
void |
setForeground(java.awt.Color foreground)
Sets the foregroundColor color. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setMaxDayCharacters(int maxDayCharacters)
Sets the maximum number of characters per day in the day bar. |
java.util.Date |
setMaxSelectableDate(java.util.Date max)
Sets the maximum selectable date. |
java.util.Date |
setMinSelectableDate(java.util.Date min)
Sets the minimum selectable date. |
void |
setMonth(int month)
Sets a specific month. |
void |
setSelectableDateRange(java.util.Date min,
java.util.Date max)
Sets a valid date range for selectable dates. |
void |
setSundayForeground(java.awt.Color sundayForeground)
Sets the Sunday foreground. |
void |
setWeekdayForeground(java.awt.Color weekdayForeground)
Sets the weekday foreground. |
void |
setWeekOfYearVisible(boolean weekOfYearVisible)
In some Countries it is often usefull to know in which week of the year a date is. |
void |
setYear(int year)
Sets a specific year. |
void |
updateUI()
Updates the UI and sets the day button preferences. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JDayChooser()
public JDayChooser(boolean weekOfYearVisible)
weekOfYearVisible - true, if the weeks of a year shall be shown| Method Detail |
|---|
public java.util.Locale getLocale()
getLocale in class java.awt.ComponentsetLocale(java.util.Locale)public void setLocale(java.util.Locale locale)
setLocale in class java.awt.Componentlocale - the new locale valuegetLocale()public void setDay(int d)
d - the daygetDay()public void setAlwaysFireDayProperty(boolean alwaysFire)
alwaysFire - true, if day property shall be fired every time a day is
chosen.public int getDay()
setDay(int)public void setMonth(int month)
month - the new monthpublic void setYear(int year)
year - the new yearpublic void setCalendar(java.util.Calendar calendar)
calendar - the new calendarpublic void setFont(java.awt.Font font)
setFont in class javax.swing.JComponentfont - the new fontpublic void setForeground(java.awt.Color foreground)
setForeground in class javax.swing.JComponentforeground - the new foregroundColorpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - the ActionEventpublic void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenere - the FocusEventpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenere - the FocusEventpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenere - the KeyEventpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenere - the KeyEventpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenere - the KeyEventpublic void setEnabled(boolean enabled)
setEnabled in class javax.swing.JComponentenabled - The new enabled valuepublic boolean isWeekOfYearVisible()
public void setWeekOfYearVisible(boolean weekOfYearVisible)
weekOfYearVisible - true, if the weeks of the year shall be shownpublic javax.swing.JPanel getDayPanel()
public java.awt.Color getDecorationBackgroundColor()
public void setDecorationBackgroundColor(java.awt.Color decorationBackgroundColor)
decorationBackgroundColor - The background to setpublic java.awt.Color getSundayForeground()
public java.awt.Color getWeekdayForeground()
public void setSundayForeground(java.awt.Color sundayForeground)
sundayForeground - The sundayForeground to setpublic void setWeekdayForeground(java.awt.Color weekdayForeground)
weekdayForeground - The weekdayForeground to setpublic void setFocus()
public boolean isDecorationBackgroundVisible()
public void setDecorationBackgroundVisible(boolean decorationBackgroundVisible)
decorationBackgroundVisible - true, if the decoration background shall be painted.public boolean isDecorationBordersVisible()
public boolean isDayBordersVisible()
public void setDecorationBordersVisible(boolean decorationBordersVisible)
decorationBordersVisible - true, if the decoration border shall be painted.public void setDayBordersVisible(boolean dayBordersVisible)
public void updateUI()
updateUI in class javax.swing.JPanel
public void setSelectableDateRange(java.util.Date min,
java.util.Date max)
min - the minimum selectable date or null (then the minimum date is
set to 01\01\0001)max - the maximum selectable date or null (then the maximum date is
set to 01\01\9999)public java.util.Date setMaxSelectableDate(java.util.Date max)
max - the maximum selectable date
public java.util.Date setMinSelectableDate(java.util.Date min)
min - the minimum selectable date
public java.util.Date getMaxSelectableDate()
public java.util.Date getMinSelectableDate()
public int getMaxDayCharacters()
public void setMaxDayCharacters(int maxDayCharacters)
maxDayCharacters - the maximum number of characters of a day name.public static void main(java.lang.String[] s)
s - The command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||