project35.desktopDeployment
Class DateTimeFieldView
java.lang.Object
project35.desktopDeployment.DataFieldView
project35.desktopDeployment.EditFieldView
project35.desktopDeployment.DateTimeFieldView
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, ContextHelpItem
public class DateTimeFieldView
- extends EditFieldView
Visualises a dateTime field. It sets the formatting of date and time
according to the locale set in the JRE.
Copyright (c) Kevin Garwood and University of Manchester 2007.
All rights reserved. Licensed under the Academic Free License
version 3.0. For more information on the terms and conditions,
please see the file "LICENSE" that is included in this distribution.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net),
code contributions from 2002 - September 30, 2007.
Methods inherited from class project35.desktopDeployment.EditFieldView |
actionPerformed, changeFont, choosePlugin, deregisterToolTipComponents, editFieldWithEditingComponent, getEditFieldEditingComponent, getModel, getValue, getValueSupplier, setUnits, setValueSupplier |
Methods inherited from class project35.desktopDeployment.DataFieldView |
enableContextHelp, getActivityArea, getFont, getHelpLink, getLabel, getName, hasFocus, indicateErrors, initialise, isContextHelpEnabled, isRequiredField, setActivityArea, setHelpLink, setName, setRequiredField |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateTimeFieldView
public DateTimeFieldView()
initialise
public void initialise(EditFieldModel editFieldModel,
Project35FormContext project35FormContext)
- Overrides:
initialise
in class EditFieldView
validate
public java.lang.String validate(boolean highlightErrors)
- Validates the entered data. As the JSpinner always keeps the dateTime
correct, this methods returns always an empty string.
- Parameters:
highlightErrors
- Flag if errors should be shown.
- Returns:
- null if there is no error or non-null if there an
error message was generated.
isDirty
public boolean isDirty()
- Specified by:
isDirty
in class EditFieldView
- Returns:
- whether there is a difference between the displayed value
and the value saved value contained in the underlying model component.
keepValue
public void keepValue()
- Commits the dateTime value to the underlying model component.
- Specified by:
keepValue
in class EditFieldView
restoreValue
public void restoreValue()
- Restores the value shown from the underlying model component.
- Specified by:
restoreValue
in class EditFieldView
setFieldValue
public void setFieldValue(java.lang.String value)
- Specified by:
setFieldValue
in class EditFieldView