public class JTimeStamp
extends javax.swing.JPanel
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor | Description |
---|---|
JTimeStamp() |
Initialization current date/time
|
JTimeStamp(boolean editable) |
Initialization current date/time if enable/disable editing upon startup
|
JTimeStamp(boolean editable,
java.util.Locale locale) |
Initialization current date/time if enable/disable editing upon startup and locale
|
JTimeStamp(java.lang.String gcs) |
Initialization with String text
|
JTimeStamp(java.lang.String gcs,
boolean editable) |
Initialization with String text and locale and enable/disable editing upon startup
|
JTimeStamp(java.lang.String gcs,
boolean editable,
java.util.Locale locale) |
Initialization with String text and locale, enable/disable editing upon startup, and locale
|
JTimeStamp(java.lang.String gcs,
java.util.Locale locale) |
Initialization with String text and locale
|
JTimeStamp(java.util.Date d) |
Initialization with Date
|
JTimeStamp(java.util.Date d,
boolean editable) |
Initialization with Date and enable/disable editing upon startup
|
JTimeStamp(java.util.Date d,
boolean editable,
java.util.Locale locale) |
Initialization with Date, enable/disable editing upon startup, and locale
|
JTimeStamp(java.util.Date d,
java.util.Locale locale) |
Initialization with Date and locale
|
JTimeStamp(java.util.GregorianCalendar c) |
Initialization with GregorianCalendar
|
JTimeStamp(java.util.GregorianCalendar c,
boolean editable) |
Initialization with GregorianCalendar and enable/disable editing upon startup
|
JTimeStamp(java.util.GregorianCalendar c,
boolean editable,
java.util.Locale locale) |
Initialization with GregorianCalendar, enable/disable editing upon startup, and locale
|
JTimeStamp(java.util.GregorianCalendar c,
java.util.Locale locale) |
Initialization with GregorianCalendar and locale
|
JTimeStamp(java.util.Locale locale) |
Initialization current date/time with local
|
Modifier and Type | Method | Description |
---|---|---|
int |
get(int type) |
Get value from internal GregorianCalendar.
Available Types from java.util.Calendar YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, MINUTE, SECOND |
java.util.GregorianCalendar |
getCalendar() |
Get cloned GregorianCalendar object.
|
java.lang.String |
getCalendarString() |
Get formated timestamp
|
java.lang.String |
getCalendarStringShort() |
Get unformatted timestamp
|
int |
getDay() |
Get day of month
|
int |
getHour() |
Get hour of the day (24 hour days)
|
int |
getMin() |
Get minute of the hour
|
int |
getMon() |
Get month (1-12)
|
int |
getSec() |
Get second of the minute
|
int |
getYear() |
Get year
|
void |
set(int type,
int value) |
Using java.util.Calendar types set values.
Available Types from java.util.Calendar YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, MINUTE, SECOND |
void |
setCalendar(java.lang.String gcs) |
Set the calendar using a String object
|
void |
setCalendar(java.util.Date d) |
Set the calendar using a Date object
|
void |
setCalendar(java.util.GregorianCalendar gc) |
Set the calendar using a GregorianCalendar object.
|
void |
setDay(int day) |
Set the day of the month
|
void |
setEditable(boolean editable) |
Enable/disable editing of the fields...
|
void |
setHour(int hour) |
Set the hour of the day (24 hour day)
|
void |
setMin(int min) |
Set the minute of the hour
|
void |
setMon(int mon) |
Set the month (1-12)
|
void |
setSec(int sec) |
Set the second of the minute
|
void |
setYear(int year) |
Set the year
|
void |
updateTSFields() |
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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
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, transferFocusDownCycle, validate
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, hide, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
public JTimeStamp()
public JTimeStamp(java.util.Locale locale)
locale
- public JTimeStamp(boolean editable)
editable
- public JTimeStamp(boolean editable, java.util.Locale locale)
editable
- locale
- public JTimeStamp(java.util.Date d)
d
- public JTimeStamp(java.util.Date d, java.util.Locale locale)
d
- locale
- public JTimeStamp(java.util.Date d, boolean editable)
d
- editable
- public JTimeStamp(java.util.Date d, boolean editable, java.util.Locale locale)
d
- editable
- locale
- public JTimeStamp(java.util.GregorianCalendar c)
c
- public JTimeStamp(java.util.GregorianCalendar c, java.util.Locale locale)
c
- locale
- public JTimeStamp(java.util.GregorianCalendar c, boolean editable)
c
- editable
- public JTimeStamp(java.util.GregorianCalendar c, boolean editable, java.util.Locale locale)
c
- editable
- locale
- public JTimeStamp(java.lang.String gcs)
gcs
- public JTimeStamp(java.lang.String gcs, java.util.Locale locale)
gcs
- locale
- public JTimeStamp(java.lang.String gcs, boolean editable)
gcs
- editable
- public JTimeStamp(java.lang.String gcs, boolean editable, java.util.Locale locale)
gcs
- editable
- locale
- public int get(int type)
type
- public java.util.GregorianCalendar getCalendar()
public java.lang.String getCalendarString()
public java.lang.String getCalendarStringShort()
public int getYear()
public int getMon()
public int getDay()
public int getHour()
public int getMin()
public int getSec()
public void set(int type, int value)
type
- value
- public void setCalendar(java.util.Date d)
d
- public void setCalendar(java.util.GregorianCalendar gc)
gc
- public void setCalendar(java.lang.String gcs)
gcs
- public void setYear(int year)
year
- public void setMon(int mon)
mon
- public void setDay(int day)
day
- public void setHour(int hour)
hour
- public void setMin(int min)
min
- public void setSec(int sec)
sec
- public void setEditable(boolean editable)
editable
- public void updateTSFields()