|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.ocr.docparser.fields.FieldPositionDef
public class FieldPositionDef
The file position definition call is used to dynamically find the location of a field based on references to other fields, marks, or predefined locations
Field Summary | |
---|---|
static int |
DIR_BETWEEN
|
static int |
DIR_DOWN
|
static int |
DIR_LEFT
|
static int |
DIR_RIGHT
|
static int |
DIR_UP
|
Constructor Summary | |
---|---|
FieldPositionDef(IReference ref,
int dist,
int dir)
defines a position |
Method Summary | |
---|---|
int |
getDirection()
in which direction (from the reference) is the field location? |
int |
getDistance()
how many words or lines is this field away from the reference |
IReference |
getReference1()
reference object |
IReference |
getReference2()
second reference (for the direction DIR_BETWEEN) |
boolean |
isFixedColumnPosition()
if true, the distance property will be the column (x) position of the field |
void |
load(org.w3c.dom.Node n,
SectionDef sec)
load from XML node |
void |
saveToXml(org.w3c.dom.Document document,
org.w3c.dom.Node n)
save to xml |
void |
setDirection(int direction)
|
void |
setDistance(int distance)
how many words or lines is this field away from the reference |
void |
setFixedColumnPosition(boolean fixedColumnPosition)
if true, the distance property will be the column (x) position of the field |
void |
setReference1(IReference reference1)
|
void |
setReference2(IReference reference2)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int DIR_RIGHT
public static int DIR_LEFT
public static int DIR_UP
public static int DIR_DOWN
public static int DIR_BETWEEN
Constructor Detail |
---|
public FieldPositionDef(IReference ref, int dist, int dir)
ref
- reference object, normally a labeldist
- distance to objectdir
- directionMethod Detail |
---|
public IReference getReference1()
public void setReference1(IReference reference1)
public IReference getReference2()
public void setReference2(IReference reference2)
public int getDistance()
public void setDistance(int distance)
distance
- public int getDirection()
public void setDirection(int direction)
public void saveToXml(org.w3c.dom.Document document, org.w3c.dom.Node n) throws java.lang.Exception
document
- root
-
java.lang.Exception
public void load(org.w3c.dom.Node n, SectionDef sec)
n
- public boolean isFixedColumnPosition()
public void setFixedColumnPosition(boolean fixedColumnPosition)
fixedColumnPossition
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |