com.ibm.dse.desktop
Class DateField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JTextField
                                |
                                +--com.ibm.dse.gui.SpTextField
                                      |
                                      +--com.ibm.dse.desktop.TextField
                                            |
                                            +--com.ibm.dse.desktop.DateField

public class DateField
extends TextField
implements java.lang.Runnable

The DateField class provides a TextField that displays the date according to the externalized pattern definition, which is based on the java.text.SimpleDateFormat.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JTextField
javax.swing.JTextField.AccessibleJTextField
 
Inner classes inherited from class javax.swing.text.JTextComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
protected  java.lang.Thread dateField
          dateField is the thread in which the date is running.
protected  java.lang.String pattern
          pattern used for the date.
protected  int timeOut
          time where the date is revised.
 
Fields inherited from class javax.swing.JTextField
notifyAction
 
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
 
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
 
Constructor Summary
DateField()
          This constructor creates a DateField object.
 
Method Summary
 java.lang.String formatField(java.util.Date aDate)
          Formats a date using the java.text.SimpleDatFormat class initialized with the date pattern.
 java.lang.String getPattern()
          Gets the date pattern of the DateField.
 void run()
          Runs the thread that displays the date.
 void setPattern(java.lang.Object o)
          Sets the date pattern of the DateField.
 
Methods inherited from class com.ibm.dse.desktop.TextField
actionPerformed, focusLostActions, getFocusTraversable, getHotKey, getRequestFocusEnabled, isFocusTraversable, setFocusTraversable, setHeight, setHorizontalAlignment, setHotKey, setId, setName, setOnInitialize, setText, setWidth, setX, setY
 
Methods inherited from class com.ibm.dse.gui.SpTextField
actionPerformed, addCoordinatedEventListener, addDataChangedListener, addErrorMessageListener, calculateValueInTargetCurrency, checkMaxCharIfNecessary, convertCurrency, convertFromEuros, convertToEuros, evaluateText, executeBeanReactions, fireCoordinationEvent, fireCoordinationEvent, fireHandleDataChanged, fireHandleDataChanged, fireHandleErrorMessage, focusGained, focusGainedActions, focusLost, getActivatedOkKey, getAllColors, getAlternativeDataName, getAutoClear, getAutoTab, getBeansReactions, getConverter, getConvertible, getDataDirection, getDataName, getDataToClear, getDataValue, getDSECoordinatedPanel, getErrorMessage, getErrorMessageFocusGained, getFormatter, getHelpID, getInError, getKeystroke, getMaxChars, getMinChars, getNavigationParameters, getRequired, getSourceValueForConversion, getSourceValueForConversion2, getSpPanel, getType, getUserInput, getValueInEMUCurrency, getValueInEuros, hasAlternativeDataName, isCursorKeyCode, isInError, isKeyedValue, isRequired, key, keyPressed, main, paint, processComponentKeyEvent, processKeyEvent, removeCoordinatedEventListener, removeDataChangedListener, removeErrorMessageListener, setActivatedOkKey, setAllColors, setAlternativeDataName, setAutoClear, setAutoTab, setBeansReactions, setColors, setConvertible, setDataDirection, setDataName, setDataToClear, setDataValue, setEditable, setEnabled, setErrorMessageFocusGained, setErrorMessageFocusGained, setFormatter, setHelpID, setInError, setKeystroke, setMaxChars, setMinChars, setNavigationParameters, setRequired, setType, setUserInput, setValueInEMUCurrency, setValueInEuros, setVisible, transferFocusIfNecessary, updateValues, vetoableChange
 
Methods inherited from class javax.swing.JTextField
addActionListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setActionCommand, setColumns, setFont, setHorizontalAlignment, setScrollOffset
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getUI, isEditable, isOpaque, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setOpaque, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processFocusEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dateField

protected java.lang.Thread dateField
dateField is the thread in which the date is running.

pattern

protected java.lang.String pattern
pattern used for the date.

timeOut

protected int timeOut
time where the date is revised.
Constructor Detail

DateField

public DateField()
This constructor creates a DateField object.
Method Detail

formatField

public java.lang.String formatField(java.util.Date aDate)
Formats a date using the java.text.SimpleDatFormat class initialized with the date pattern.
Parameters:
Date - aDate

getPattern

public java.lang.String getPattern()
Gets the date pattern of the DateField.
Returns:
java.lang.String

run

public void run()
Runs the thread that displays the date.
Specified by:
run in interface java.lang.Runnable

setPattern

public void setPattern(java.lang.Object o)
Sets the date pattern of the DateField.
Parameters:
o - java.lang.Object