public class ReferenceField extends Field
The advantage of entering a reference as a field is that you do not have to adjust the references manually every time you change the document. Just update the fields and the references in the document are updated too.
NOTE: Before the document is opened in any editor, the value of this field maybe invalid.
| Modifier and Type | Class and Description |
|---|---|
static class |
ReferenceField.DisplayType
A DisplayType specifies the information that a reference field should display.
|
Field.FieldType| Modifier and Type | Method and Description |
|---|---|
void |
appendReferenceTo(OdfElement odfEle,
ReferenceField.DisplayType type)
Append this reference field after the specifics OdfElement.
|
Field.FieldType |
getFieldType()
Return the type of this field.
|
String |
getName()
Get the name of this reference field.
|
OdfElement |
getOdfElement()
Return the instance of OdfElement which presents this structure.
|
void |
setName(String referenceName)
Set the name of this reference field.
|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponentpublic void setName(String referenceName)
referenceName - the name of this content.public String getName()
public void appendReferenceTo(OdfElement odfEle, ReferenceField.DisplayType type)
odfEle - the reference of odf element.type - the display type.public OdfElement getOdfElement()
ComponentgetOdfElement in class Componentpublic Field.FieldType getFieldType()
FieldgetFieldType in class FieldCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.