org.odftoolkit.simple.common.field
Class TimeField

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.common.field.Field
          extended by org.odftoolkit.simple.common.field.TimeField

public class TimeField
extends Field

TimeField displays a time, by default this is the current time.

Since:
0.5

Nested Class Summary
 
Nested classes/interfaces inherited from class org.odftoolkit.simple.common.field.Field
Field.FieldType
 
Method Summary
 void formatTime(String formatString)
          Set the format of this time field.
 Field.FieldType getFieldType()
          Return the type of this field.
 TextTimeElement getOdfElement()
          Return an instance of TextTimeElement which represents this feature.
 void setFixed(boolean isFixed)
          Set whether the time value of this field is fixed.
 
Methods inherited from class org.odftoolkit.simple.Component
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

formatTime

public void formatTime(String formatString)
Set the format of this time field. Time format pattern is the same as SimpleDateFormat.

Parameters:
formatString - the format string of this time.
See Also:
SimpleDateFormat

setFixed

public void setFixed(boolean isFixed)
Set whether the time value of this field is fixed.

Parameters:
isFixed - if true, the time value shall be preserved, otherwise it may be replaced with a new value in future edits.

getOdfElement

public TextTimeElement getOdfElement()
Return an instance of TextTimeElement which represents this feature.

Specified by:
getOdfElement in class Component
Returns:
an instance of TextTimeElement

getFieldType

public Field.FieldType getFieldType()
Description copied from class: Field
Return the type of this field.

Specified by:
getFieldType in class Field
Returns:
the type of this field.


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.