Package cz.vutbr.fit.layout.bcs.impl
Class PageArea
- java.lang.Object
-
- cz.vutbr.fit.layout.bcs.impl.PageArea
-
public class PageArea extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNMENT_BOTTOM
static int
ALIGNMENT_COLUMN
static int
ALIGNMENT_LEFT
static int
ALIGNMENT_LINE
static int
ALIGNMENT_NONE
static int
ALIGNMENT_RIGHT
static int
ALIGNMENT_TOP
static double
MAX_DIFF_LAB
static double
MAX_DIFF_LCH
static double
MAX_DIFF_RGB
static int
SHAPE_BLOB
static int
SHAPE_COLUMN
static int
SHAPE_ROW
-
Method Summary
-
-
-
Field Detail
-
ALIGNMENT_NONE
public static final int ALIGNMENT_NONE
- See Also:
- Constant Field Values
-
ALIGNMENT_LINE
public static final int ALIGNMENT_LINE
- See Also:
- Constant Field Values
-
ALIGNMENT_COLUMN
public static final int ALIGNMENT_COLUMN
- See Also:
- Constant Field Values
-
ALIGNMENT_LEFT
public static final int ALIGNMENT_LEFT
- See Also:
- Constant Field Values
-
ALIGNMENT_RIGHT
public static final int ALIGNMENT_RIGHT
- See Also:
- Constant Field Values
-
ALIGNMENT_TOP
public static final int ALIGNMENT_TOP
- See Also:
- Constant Field Values
-
ALIGNMENT_BOTTOM
public static final int ALIGNMENT_BOTTOM
- See Also:
- Constant Field Values
-
SHAPE_BLOB
public static final int SHAPE_BLOB
- See Also:
- Constant Field Values
-
SHAPE_COLUMN
public static final int SHAPE_COLUMN
- See Also:
- Constant Field Values
-
SHAPE_ROW
public static final int SHAPE_ROW
- See Also:
- Constant Field Values
-
MAX_DIFF_RGB
public static final double MAX_DIFF_RGB
- See Also:
- Constant Field Values
-
MAX_DIFF_LAB
public static final double MAX_DIFF_LAB
- See Also:
- Constant Field Values
-
MAX_DIFF_LCH
public static final double MAX_DIFF_LCH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PageArea
public PageArea(Color c, Rectangular rect)
-
PageArea
public PageArea(PageArea a)
-
PageArea
public PageArea(PageArea a, boolean inheritChildren)
-
-
Method Detail
-
getId
public Integer getId()
-
setId
public void setId(int top, int left)
-
calculateId
public void calculateId()
-
contains
public boolean contains(PageArea obj)
-
overlaps
public boolean overlaps(PageArea obj)
-
getColor
public Color getColor()
-
setColor
public void setColor(Color color)
-
getLeft
public int getLeft()
-
setLeft
public void setLeft(int left)
-
getRight
public int getRight()
-
setRight
public void setRight(int right)
-
getTop
public int getTop()
-
setTop
public void setTop(int top)
-
getBottom
public int getBottom()
-
setBottom
public void setBottom(int bottom)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
addChild
public void addChild(PageArea child)
-
addChild
public void addChild(PageArea child, boolean tryout)
-
delChild
public void delChild(PageArea child)
-
reclaimChildren
public void reclaimChildren()
-
giveUpChildren
public void giveUpChildren()
-
getAreaCount
public int getAreaCount()
-
mergeWith
public void mergeWith(PageArea a)
-
setParent
public void setParent(PageArea parent)
-
getParent
public PageArea getParent()
-
getNeighbors
public HashMap<PageArea,PageAreaRelation> getNeighbors()
-
getNeighbor
public PageAreaRelation getNeighbor(PageArea a)
-
addNeighbor
public void addNeighbor(PageArea a, int direction, int cardinality)
-
addNeighbor
public void addNeighbor(PageAreaRelation rel)
-
delNeighbor
public void delNeighbor(PageArea a)
-
getMaxNeighborDistance
public int getMaxNeighborDistance()
-
setMaxNeighborDistance
public void setMaxNeighborDistance(int maxNeighborDistance)
-
getMeanNeighborDistance
public int getMeanNeighborDistance()
-
setMeanNeighborDistance
public void setMeanNeighborDistance(int meanNeighborDistance)
-
calculateNeighborDistances
public void calculateNeighborDistances()
-
getSimilarity
public double getSimilarity(PageArea a, int alignmentScore)
-
getSizeSimilarity
public double getSizeSimilarity(PageArea a)
-
getShapeSimilarity
public double getShapeSimilarity(PageArea a)
-
getColorSimilarity
public double getColorSimilarity(PageArea a)
-
getDistance
public double getDistance(PageArea a)
-
getDistanceNeighbor
public double getDistanceNeighbor(PageArea a)
-
getDistanceAbsolute
public int getDistanceAbsolute(PageArea a)
-
getAlignment
public int getAlignment(PageArea a)
-
getSideAlignment
public int getSideAlignment(PageArea a)
-
getRectangle
public com.infomatiq.jsi.Rectangle getRectangle()
-
resetRectangle
public void resetRectangle()
-
getVEdgeCount
public int getVEdgeCount()
-
getVRatio
public double getVRatio()
-
setVEdgeCount
public void setVEdgeCount(int vEdgeCount)
-
addVEdgeCount
public void addVEdgeCount(int vEdgeCount)
-
getHEdgeCount
public int getHEdgeCount()
-
getHRatio
public double getHRatio()
-
setHEdgeCount
public void setHEdgeCount(int hEdgeCount)
-
addHEdgeCount
public void addHEdgeCount(int hEdgeCount)
-
isRow
public boolean isRow()
-
isColumn
public boolean isColumn()
-
getShape
public int getShape()
-
isBlob
public boolean isBlob()
-
getNode
public Box getNode()
-
setNode
public void setNode(Box node)
-
-