|
||||||||||
| 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
lu.tudor.santec.jtimechooser.JTimeChooser
public class JTimeChooser
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Field Summary | |
|---|---|
static java.awt.Color |
DEFAULT_HIGHLIGHTING_COLOR
|
static java.util.Date |
MIDNIGHT
|
| 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 | |
|---|---|
JTimeChooser()
Builds a JTimeChooser initializing the time with 00:00. |
|
JTimeChooser(java.util.Date time)
Builds a JTimeChooser initializing the time of the given date. |
|
| Method Summary | |
|---|---|
void |
addTimeChangedListener(TimeChangedListener listener)
Adds the listener to the list of listener. |
java.util.Calendar |
getCalendarWithTime(java.util.Calendar calendar)
Creates a new Calendar with the data of the given Calendar, but replaces the time. |
java.util.Calendar |
getCalendarWithTime(java.util.Date date)
Creates a new Calendar with the data of the given Date, but replaces the time. |
java.util.Date |
getDateWithTime(java.util.Date date)
Creates a new Date with the data of the given Date, but replaces the time. |
java.lang.String |
getFormatedDate()
|
java.lang.String |
getFormatedDate(java.util.Locale l,
int style)
|
java.lang.String |
getFormatedDate(java.lang.String pattern)
|
java.lang.String |
getFormatedTime()
|
int |
getHours()
|
int |
getMinutes()
|
int |
getSeconds()
|
javax.swing.JFormattedTextField |
getTimeField()
|
boolean |
isEnabledWithDoubleClick()
The time field is disabled until it is double clicked. |
boolean |
isShowIcon()
Tells whether a small clock is shown or not. |
boolean |
isShowSeconds()
|
void |
removeTimeChangedListener(TimeChangedListener listener)
Removes the listener of the list of listener |
void |
setEnabledWithDoubleClick(boolean enabled)
This functionality disables the time field until it is double clicked. |
void |
setHighlightingColor(java.awt.Color c)
|
void |
setShowIcon(boolean show)
Defines whether a small clock shall be shown or not. |
void |
setShowSeconds(boolean showSeconds)
Defines whether the format of JTimeChooser should show seconds or not. |
void |
setTime(java.util.Date time)
You can manually set a new date / time |
void |
setTimeOnCalendar(java.util.Calendar cal)
Replaces the time in the given Calendar. |
void |
setTimeOnDate(java.util.Date date)
Replaces the time in the given Date. |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| 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, 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, 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Date MIDNIGHT
public static final java.awt.Color DEFAULT_HIGHLIGHTING_COLOR
| Constructor Detail |
|---|
public JTimeChooser()
public JTimeChooser(java.util.Date time)
time - this date provides the start value and is modified| Method Detail |
|---|
public javax.swing.JFormattedTextField getTimeField()
public void setHighlightingColor(java.awt.Color c)
c - Define the Color which is used to highlight the currently selected TimeUnit.public void setShowSeconds(boolean showSeconds)
showSeconds - Shall the seconds be shown?public boolean isShowSeconds()
public void setShowIcon(boolean show)
show - public boolean isShowIcon()
public int getHours()
public int getMinutes()
public int getSeconds()
public void setTime(java.util.Date time)
time - The new datepublic java.lang.String getFormatedTime()
public java.lang.String getFormatedDate()
public java.lang.String getFormatedDate(java.util.Locale l,
int style)
l - The locale to format the date.style - The style to format the date.
public java.lang.String getFormatedDate(java.lang.String pattern)
pattern - The pattern to format the date.
public void setTimeOnDate(java.util.Date date)
date - The Date to be changedpublic void setTimeOnCalendar(java.util.Calendar cal)
cal - The Calendar to be changedpublic java.util.Calendar getCalendarWithTime(java.util.Calendar calendar)
calendar - The Calendar, which data is used.
public java.util.Calendar getCalendarWithTime(java.util.Date date)
date - The Date, which data is used.
public java.util.Date getDateWithTime(java.util.Date date)
date - The Date, which data is used.
public void addTimeChangedListener(TimeChangedListener listener)
listener - The TimeChangedListenerpublic void removeTimeChangedListener(TimeChangedListener listener)
listener - public boolean isEnabledWithDoubleClick()
true if this functionality is enabled
and the field will be disabled after an entry,
false if the field is enabled all the time.public void setEnabledWithDoubleClick(boolean enabled)
true (disabled and becomes enabled
after a double click).
enabled - true to enable this functionality,
false to enable the field all the time.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||