arlut.csd.JDataComponent
Class JcalendarField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--arlut.csd.JDataComponent.JcalendarField
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, JsetValueCallback, java.awt.MenuContainer, java.io.Serializable

public class JcalendarField
extends javax.swing.JPanel
implements JsetValueCallback

This class defines a date input field object.

See Also:
Serialized Form

Field Summary
private  java.text.SimpleDateFormat _dateformat
           
protected  java.util.GregorianCalendar _myCalendar
           
protected  java.util.TimeZone _myTimeZone
           
private  boolean allowCallback
           
private  arlut.csd.JDataComponent.JsetValueCallback callback
           
private  boolean changed
           
(package private) static boolean debug
           
private  boolean iseditable
           
private  boolean limited
           
private  java.util.Date maxDate
           
private  java.util.Date minDate
           
protected  java.util.Date my_date
           
protected  java.util.Date old_date
           
private  arlut.csd.JCalendar.JpanelCalendar pCal
           
private  boolean unset
           
 
Fields inherited from class javax.swing.JPanel
 
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.Container
 
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
JcalendarField()
          Minimal Constructor for JcalendarField.
JcalendarField(java.util.Date date, boolean iseditable, boolean islimited, java.util.Date minDate, java.util.Date maxDate)
          Contructor that creates a JcalendarField based on the date it is given.
JcalendarField(java.util.Date date, boolean iseditable, boolean islimited, java.util.Date minDate, java.util.Date maxDate, arlut.csd.JDataComponent.JsetValueCallback parent)
          Contructor that creates a JcalendarField based on the Date object it is given.
 
Method Summary
 java.util.Date getDate()
          returns the date associated with this JcalendarField
 void setCallback(arlut.csd.JDataComponent.JsetValueCallback callback)
          sets the parent of this component for callback purposes
 void setDate(java.util.Date d)
          sets the date value of this JcalendarField
 void setDate(java.util.Date d, boolean checkLimits)
          sets the date value of this JcalendarField
 boolean setValuePerformed(arlut.csd.JDataComponent.JValueObject valueObj)
          This is the callback that the JentryField uses to notify us if the user entered something in the text field.
 void unregister()
          This method is to be called when the containerPanel holding this date field is being closed down.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, 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, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, 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, isEnabled, 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
 

Field Detail

debug

static final boolean debug
See Also:
Constant Field Values

allowCallback

private boolean allowCallback

changed

private boolean changed

limited

private boolean limited

unset

private boolean unset

iseditable

private boolean iseditable

callback

private arlut.csd.JDataComponent.JsetValueCallback callback

my_date

protected java.util.Date my_date

old_date

protected java.util.Date old_date

maxDate

private java.util.Date maxDate

minDate

private java.util.Date minDate

pCal

private arlut.csd.JCalendar.JpanelCalendar pCal

_myCalendar

protected java.util.GregorianCalendar _myCalendar

_myTimeZone

protected java.util.TimeZone _myTimeZone

_dateformat

private java.text.SimpleDateFormat _dateformat
Constructor Detail

JcalendarField

public JcalendarField()
Minimal Constructor for JcalendarField. This will construct a JcalendarField with no value.


JcalendarField

public JcalendarField(java.util.Date date,
                      boolean iseditable,
                      boolean islimited,
                      java.util.Date minDate,
                      java.util.Date maxDate,
                      arlut.csd.JDataComponent.JsetValueCallback parent)
Contructor that creates a JcalendarField based on the Date object it is given. This constructor can be used if the JcalendarField will be making callbacks to pass its data to the appropriate container.

Parameters:
parent - the container which implements the callback function for this JcalendarField
date - the Date object to use
iseditable - true if the datefield can be edited by the user
islimited - true if there is to be a restriction on the range of dates
minDate - the oldest possible date that can be entered into this JcalendarField
maxDate - the newest possible date that can be entered into this JcalendarField

JcalendarField

public JcalendarField(java.util.Date date,
                      boolean iseditable,
                      boolean islimited,
                      java.util.Date minDate,
                      java.util.Date maxDate)
Contructor that creates a JcalendarField based on the date it is given. It is also possible to set restrictions on the range of dates for this JcalendarField when using this constructor

Parameters:
date - the Date object to use
islimited - true if there is to be a restriction on the range of dates
minDate - the oldest possible date that can be entered into this JcalendarField
maxDate - the newest possible date that can be entered into this JcalendarField
Method Detail

getDate

public java.util.Date getDate()
returns the date associated with this JcalendarField


setDate

public void setDate(java.util.Date d)
sets the date value of this JcalendarField

Parameters:
d - the date to use

setDate

public void setDate(java.util.Date d,
                    boolean checkLimits)
sets the date value of this JcalendarField

Parameters:
d - the date to use

unregister

public void unregister()
This method is to be called when the containerPanel holding this date field is being closed down. This method is responsible for popping down any connected calendar panel.


setCallback

public void setCallback(arlut.csd.JDataComponent.JsetValueCallback callback)
sets the parent of this component for callback purposes


setValuePerformed

public boolean setValuePerformed(arlut.csd.JDataComponent.JValueObject valueObj)
This is the callback that the JentryField uses to notify us if the user entered something in the text field.

Specified by:
setValuePerformed in interface JsetValueCallback
Returns:
true if the callback accepted the change and the GUI component should go ahead and display the change made by the user.