Package org.apache.poi.hwpf.model.types
Class FFDataBaseAbstractType
- java.lang.Object
-
- org.apache.poi.hwpf.model.types.FFDataBaseAbstractType
-
- Direct Known Subclasses:
FFDataBase
@Internal public abstract class FFDataBaseAbstractType extends Object
The FFData structure specifies form field data for a text box, check box, or drop-down list box.
-
-
Field Summary
Fields Modifier and Type Field Description protected longfield_1_versionprotected shortfield_2_bitsprotected intfield_3_cchprotected intfield_4_hpsstatic byteITYPE_CHCKSpecifies that the form field is a checkbox.static byteITYPE_DROPSpecifies that the form field is a dropdown list box.static byteITYPE_TEXTSpecifies that the form field is a textbox.protected static byteITYPETXT_CALCSpecifies that the textbox value is calculated from an expression.static byteITYPETXT_CURDATESpecifies that the textbox value is the current date.static byteITYPETXT_CURTIMESpecifies that the textbox value is the current time.static byteITYPETXT_DATESpecifies that the textbox value is a date or time.static byteITYPETXT_NUMSpecifies that the textbox value is a number.static byteITYPETXT_REGSpecifies that the textbox value is regular text.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFFDataBaseAbstractType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)protected voidfillFields(byte[] data, int offset)shortgetBits()An FFDataBits that specifies the type and state of this form field.intgetCch()An unsigned integer that specifies the maximum length, in characters, of the value of the textbox.intgetHps()An unsigned integer.bytegetIRes()An unsigned integer.bytegetIType()An unsigned integer that specifies the type of the form field.bytegetITypeTxt()An unsigned integer that specifies the type of the textbox.static intgetSize()Size of recordlonggetVersion()An unsigned integer that MUST be 0xFFFFFFFF.inthashCode()booleanisFHasListBox()A bit that specifies that the form field has a list box.booleanisFOwnHelp()A bit that specifies whether the form field has custom help text in FFData.xstzHelpText.booleanisFOwnStat()A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText.booleanisFProt()A bit that specifies whether the form field is protected and its value cannot be changed.booleanisFRecalc()A bit that specifies whether the value of the field is automatically calculated after the field is modified.booleanisISize()A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located.byte[]serialize()voidserialize(byte[] data, int offset)voidsetBits(short field_2_bits)An FFDataBits that specifies the type and state of this form field.voidsetCch(int field_3_cch)An unsigned integer that specifies the maximum length, in characters, of the value of the textbox.voidsetFHasListBox(boolean value)Sets the fHasListBox field value.voidsetFOwnHelp(boolean value)Sets the fOwnHelp field value.voidsetFOwnStat(boolean value)Sets the fOwnStat field value.voidsetFProt(boolean value)Sets the fProt field value.voidsetFRecalc(boolean value)Sets the fRecalc field value.voidsetHps(int field_4_hps)An unsigned integer.voidsetIRes(byte value)Sets the iRes field value.voidsetISize(boolean value)Sets the iSize field value.voidsetIType(byte value)Sets the iType field value.voidsetITypeTxt(byte value)Sets the iTypeTxt field value.voidsetVersion(long field_1_version)An unsigned integer that MUST be 0xFFFFFFFF.StringtoString()
-
-
-
Field Detail
-
field_1_version
protected long field_1_version
-
field_2_bits
protected short field_2_bits
-
ITYPE_TEXT
public static final byte ITYPE_TEXT
Specifies that the form field is a textbox.- See Also:
- Constant Field Values
-
ITYPE_CHCK
public static final byte ITYPE_CHCK
Specifies that the form field is a checkbox.- See Also:
- Constant Field Values
-
ITYPE_DROP
public static final byte ITYPE_DROP
Specifies that the form field is a dropdown list box.- See Also:
- Constant Field Values
-
ITYPETXT_REG
public static final byte ITYPETXT_REG
Specifies that the textbox value is regular text.- See Also:
- Constant Field Values
-
ITYPETXT_NUM
public static final byte ITYPETXT_NUM
Specifies that the textbox value is a number.- See Also:
- Constant Field Values
-
ITYPETXT_DATE
public static final byte ITYPETXT_DATE
Specifies that the textbox value is a date or time.- See Also:
- Constant Field Values
-
ITYPETXT_CURDATE
public static final byte ITYPETXT_CURDATE
Specifies that the textbox value is the current date.- See Also:
- Constant Field Values
-
ITYPETXT_CURTIME
public static final byte ITYPETXT_CURTIME
Specifies that the textbox value is the current time.- See Also:
- Constant Field Values
-
ITYPETXT_CALC
protected static final byte ITYPETXT_CALC
Specifies that the textbox value is calculated from an expression. The expression is given by FFData.xstzTextDef.- See Also:
- Constant Field Values
-
field_3_cch
protected int field_3_cch
-
field_4_hps
protected int field_4_hps
-
-
Method Detail
-
fillFields
protected void fillFields(byte[] data, int offset)
-
serialize
public void serialize(byte[] data, int offset)
-
serialize
public byte[] serialize()
-
getSize
public static int getSize()
Size of record
-
getVersion
@Internal public long getVersion()
An unsigned integer that MUST be 0xFFFFFFFF.
-
setVersion
@Internal public void setVersion(long field_1_version)
An unsigned integer that MUST be 0xFFFFFFFF.
-
getBits
@Internal public short getBits()
An FFDataBits that specifies the type and state of this form field.
-
setBits
@Internal public void setBits(short field_2_bits)
An FFDataBits that specifies the type and state of this form field.
-
getCch
@Internal public int getCch()
An unsigned integer that specifies the maximum length, in characters, of the value of the textbox. This value MUST NOT exceed 32767. A value of 0 means there is no maximum length of the value of the textbox. If bits.iType is not iTypeText (0), this value MUST be 0..
-
setCch
@Internal public void setCch(int field_3_cch)
An unsigned integer that specifies the maximum length, in characters, of the value of the textbox. This value MUST NOT exceed 32767. A value of 0 means there is no maximum length of the value of the textbox. If bits.iType is not iTypeText (0), this value MUST be 0..
-
getHps
@Internal public int getHps()
An unsigned integer. If bits.iType is iTypeChck (1), hps specifies the size, in half-points, of the checkbox and MUST be between 2 and 3168, inclusive. If bits.iType is not iTypeChck (1), hps is undefined and MUST be ignored..
-
setHps
@Internal public void setHps(int field_4_hps)
An unsigned integer. If bits.iType is iTypeChck (1), hps specifies the size, in half-points, of the checkbox and MUST be between 2 and 3168, inclusive. If bits.iType is not iTypeChck (1), hps is undefined and MUST be ignored..
-
setIType
@Internal public void setIType(byte value)
Sets the iType field value. An unsigned integer that specifies the type of the form field.
-
getIType
@Internal public byte getIType()
An unsigned integer that specifies the type of the form field.- Returns:
- the iType field value.
-
setIRes
@Internal public void setIRes(byte value)
Sets the iRes field value. An unsigned integer. If iType is iTypeText (0), then iRes MUST be 0. If iType is iTypeChck (1), iRes specifies the state of the checkbox and MUST be 0 (unchecked), 1 (checked), or 25 (undefined). Undefined checkboxes are treated as unchecked. If iType is iTypeDrop (2), iRes specifies the current selected list box item. A value of 25 specifies the selection is undefined. Otherwise, iRes is a zero-based index into FFData.hsttbDropList.
-
getIRes
@Internal public byte getIRes()
An unsigned integer. If iType is iTypeText (0), then iRes MUST be 0. If iType is iTypeChck (1), iRes specifies the state of the checkbox and MUST be 0 (unchecked), 1 (checked), or 25 (undefined). Undefined checkboxes are treated as unchecked. If iType is iTypeDrop (2), iRes specifies the current selected list box item. A value of 25 specifies the selection is undefined. Otherwise, iRes is a zero-based index into FFData.hsttbDropList.- Returns:
- the iRes field value.
-
setFOwnHelp
@Internal public void setFOwnHelp(boolean value)
Sets the fOwnHelp field value. A bit that specifies whether the form field has custom help text in FFData.xstzHelpText. If fOwnHelp is 0, FFData.xstzHelpText contains an empty or auto-generated string.
-
isFOwnHelp
@Internal public boolean isFOwnHelp()
A bit that specifies whether the form field has custom help text in FFData.xstzHelpText. If fOwnHelp is 0, FFData.xstzHelpText contains an empty or auto-generated string.- Returns:
- the fOwnHelp field value.
-
setFOwnStat
@Internal public void setFOwnStat(boolean value)
Sets the fOwnStat field value. A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText. If fOwnStat is 0, FFData.xstzStatText contains an empty or auto-generated string.
-
isFOwnStat
@Internal public boolean isFOwnStat()
A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText. If fOwnStat is 0, FFData.xstzStatText contains an empty or auto-generated string.- Returns:
- the fOwnStat field value.
-
setFProt
@Internal public void setFProt(boolean value)
Sets the fProt field value. A bit that specifies whether the form field is protected and its value cannot be changed.
-
isFProt
@Internal public boolean isFProt()
A bit that specifies whether the form field is protected and its value cannot be changed.- Returns:
- the fProt field value.
-
setISize
@Internal public void setISize(boolean value)
Sets the iSize field value. A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located. This value MUST be 0 if iType is not iTypeChck (1).
-
isISize
@Internal public boolean isISize()
A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located. This value MUST be 0 if iType is not iTypeChck (1).- Returns:
- the iSize field value.
-
setITypeTxt
@Internal public void setITypeTxt(byte value)
Sets the iTypeTxt field value. An unsigned integer that specifies the type of the textbox. If iType is not iTypeText (0), iTypeTxt MUST be 0 and MUST be ignored.
-
getITypeTxt
@Internal public byte getITypeTxt()
An unsigned integer that specifies the type of the textbox. If iType is not iTypeText (0), iTypeTxt MUST be 0 and MUST be ignored.- Returns:
- the iTypeTxt field value.
-
setFRecalc
@Internal public void setFRecalc(boolean value)
Sets the fRecalc field value. A bit that specifies whether the value of the field is automatically calculated after the field is modified.
-
isFRecalc
@Internal public boolean isFRecalc()
A bit that specifies whether the value of the field is automatically calculated after the field is modified.- Returns:
- the fRecalc field value.
-
setFHasListBox
@Internal public void setFHasListBox(boolean value)
Sets the fHasListBox field value. A bit that specifies that the form field has a list box. This value MUST be 1 if iType is iTypeDrop (2). Otherwise, this value MUST be 0.
-
isFHasListBox
@Internal public boolean isFHasListBox()
A bit that specifies that the form field has a list box. This value MUST be 1 if iType is iTypeDrop (2). Otherwise, this value MUST be 0.- Returns:
- the fHasListBox field value.
-
-