Class FieldLocation
- All Implemented Interfaces:
- Comparable<FieldLocation>
Field locations within the field viewer.
 A field location represents a place within a Field. Fields live within a concept we call a layout. A layout represents an 'item', for example an address, along with a grouping of related information. Each layout will contain one or more Field objects. Further, each layout's fields may have varying shapes, such as single or multiple rows within the layout. Thusly, a layout could conceptually represent a single line of text or multiple groupings of text and images, similar to how a newspaper or web page is laid out.
A layout lives in a larger collection of layouts, which are laid out vertically. The index of a layout is its position within that larger list. This class contains the index of the layout within which it lives.
 A FieldSelection may be within a single layout or may cross multiple layouts.  To
 determine if a selection crosses multiple layouts, you can get the range of
 the selection.   You can then use the range's start and end locations to determine if the
 selection spans multiple layouts.   If the start and end indexes of the range are the same, then
 the selection is within a single layout; otherwise, the selection spans multiple layouts.
 
This location also contains row and column values. These values refer to the row and column of text within a single Field. Lastly, this class contains a field number, which represents the relative field number inside of the over layout, which may contain multiple fields.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionFieldLocation(int index) FieldLocation(int index, int fieldNum) FieldLocation(int index, int fieldNum, int row, int col) Construct a new FieldLocation with the given index,fieldNum,row, and col.Construct a new FieldLocation by copying from another FieldLocation.FieldLocation(BigInteger index) FieldLocation(BigInteger index, int fieldNum) FieldLocation(BigInteger index, int fieldNum, int row, int col) FieldLocation(org.jdom.Element child) 
- 
Method SummaryModifier and TypeMethodDescriptionintbooleanintgetCol()Returns the column within the Field for this location.org.jdom.ElementgetElement(String name) intReturns the number of the field for this location.getIndex()Returns the index for this location.intgetRow()Returns the row within the Field for this location.inthashCode()voidset(FieldLocation loc) voidsetIndex(BigInteger index) toString()
- 
Field Details- 
MAX
- 
fieldNumpublic int fieldNum
- 
rowpublic int row
- 
colpublic int col
 
- 
- 
Constructor Details- 
FieldLocationpublic FieldLocation()
- 
FieldLocationpublic FieldLocation(int index) 
- 
FieldLocationpublic FieldLocation(int index, int fieldNum) 
- 
FieldLocation
- 
FieldLocation
- 
FieldLocationpublic FieldLocation(int index, int fieldNum, int row, int col) Construct a new FieldLocation with the given index,fieldNum,row, and col.- Parameters:
- index- the index of the layout containing the location
- fieldNum- the index of the field in the layout containing the location
- row- the text row in the field containing the location.
- col- the character position the row containing the location.
 
- 
FieldLocation
- 
FieldLocationpublic FieldLocation(org.jdom.Element child) 
- 
FieldLocationConstruct a new FieldLocation by copying from another FieldLocation.- Parameters:
- loc- the FieldLocation to be copied.
 
 
- 
- 
Method Details- 
getIndexReturns the index for this location. The index corresponds to the layout that contains the field represented by this location. See the javadoc header for more details.- Returns:
- the index for this location.
 
- 
getFieldNumpublic int getFieldNum()Returns the number of the field for this location. This is the number of the field within a given layout. See the javadoc header for more details.- Returns:
- the number of the field for this location.
 
- 
getRowpublic int getRow()Returns the row within the Field for this location.- Returns:
- the row within the Field for this location.
 
- 
getColpublic int getCol()Returns the column within the Field for this location.- Returns:
- the column within the Field for this location.
 
- 
equals
- 
compareTo- Specified by:
- compareToin interface- Comparable<FieldLocation>
 
- 
hashCodepublic int hashCode()
- 
toString
- 
getElement
- 
set
- 
setIndex
 
-