org.apache.poi.hwpf.model.types
Class FFDataBaseAbstractType

java.lang.Object
  extended by org.apache.poi.hwpf.model.types.FFDataBaseAbstractType
Direct Known Subclasses:
FFDataBase

@Internal
public abstract class FFDataBaseAbstractType
extends java.lang.Object

The FFData structure specifies form field data for a text box, check box, or drop-down list box.

Class and fields descriptions are quoted from [MS-DOC] -- v20121003 Word (.doc) Binary File Format; Copyright (c) 2012 Microsoft Corporation; Release: October 8, 2012

NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/types/definitions.

This class is internal. It content or properties may change without notice due to changes in our knowledge of internal Microsoft Word binary structures.

Author:
Sergey Vladimirov; according to [MS-DOC] -- v20121003 Word (.doc) Binary File Format; Copyright (c) 2012 Microsoft Corporation; Release: October 8, 2012

Field Summary
protected  long field_1_version
           
protected  short field_2_bits
           
protected  int field_3_cch
           
protected  int field_4_hps
           
static byte ITYPE_CHCK
          Specifies that the form field is a checkbox.
static byte ITYPE_DROP
          Specifies that the form field is a dropdown list box.
static byte ITYPE_TEXT
          Specifies that the form field is a textbox.
protected static byte ITYPETXT_CALC
          Specifies that the textbox value is calculated from an expression.
static byte ITYPETXT_CURDATE
          Specifies that the textbox value is the current date.
static byte ITYPETXT_CURTIME
          Specifies that the textbox value is the current time.
static byte ITYPETXT_DATE
          Specifies that the textbox value is a date or time.
static byte ITYPETXT_NUM
          Specifies that the textbox value is a number.
static byte ITYPETXT_REG
          Specifies that the textbox value is regular text.
 
Constructor Summary
protected FFDataBaseAbstractType()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
protected  void fillFields(byte[] data, int offset)
           
 short getBits()
          An FFDataBits that specifies the type and state of this form field.
 int getCch()
          An unsigned integer that specifies the maximum length, in characters, of the value of the textbox.
 int getHps()
          An unsigned integer.
 byte getIRes()
          An unsigned integer.
 byte getIType()
          An unsigned integer that specifies the type of the form field.
 byte getITypeTxt()
          An unsigned integer that specifies the type of the textbox.
static int getSize()
          Size of record
 long getVersion()
          An unsigned integer that MUST be 0xFFFFFFFF.
 int hashCode()
           
 boolean isFHasListBox()
          A bit that specifies that the form field has a list box.
 boolean isFOwnHelp()
          A bit that specifies whether the form field has custom help text in FFData.xstzHelpText.
 boolean isFOwnStat()
          A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText.
 boolean isFProt()
          A bit that specifies whether the form field is protected and its value cannot be changed.
 boolean isFRecalc()
          A bit that specifies whether the value of the field is automatically calculated after the field is modified.
 boolean isISize()
          A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located.
 byte[] serialize()
           
 void serialize(byte[] data, int offset)
           
 void setBits(short field_2_bits)
          An FFDataBits that specifies the type and state of this form field.
 void setCch(int field_3_cch)
          An unsigned integer that specifies the maximum length, in characters, of the value of the textbox.
 void setFHasListBox(boolean value)
          Sets the fHasListBox field value.
 void setFOwnHelp(boolean value)
          Sets the fOwnHelp field value.
 void setFOwnStat(boolean value)
          Sets the fOwnStat field value.
 void setFProt(boolean value)
          Sets the fProt field value.
 void setFRecalc(boolean value)
          Sets the fRecalc field value.
 void setHps(int field_4_hps)
          An unsigned integer.
 void setIRes(byte value)
          Sets the iRes field value.
 void setISize(boolean value)
          Sets the iSize field value.
 void setIType(byte value)
          Sets the iType field value.
 void setITypeTxt(byte value)
          Sets the iTypeTxt field value.
 void setVersion(long field_1_version)
          An unsigned integer that MUST be 0xFFFFFFFF.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

FFDataBaseAbstractType

protected FFDataBaseAbstractType()
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


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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.


Copyright 2014 The Apache Software Foundation or its licensors, as applicable.