Package cz.vutbr.fit.layout.segm.op
Class GroupAnalyzerByStyles
- java.lang.Object
-
- cz.vutbr.fit.layout.segm.op.GroupAnalyzer
-
- cz.vutbr.fit.layout.segm.op.GroupAnalyzerByStyles
-
public class GroupAnalyzerByStyles extends GroupAnalyzer
This group analyzer tries to expand the selected box to all directions stopping on whitespace separators. Only the areas with the same font properties are connected.- Author:
- burgetr
-
-
Field Summary
-
Fields inherited from class cz.vutbr.fit.layout.segm.op.GroupAnalyzer
parent
-
-
Constructor Summary
Constructors Constructor Description GroupAnalyzerByStyles(Area parent, int maxlevel, boolean matchstyles)
Creates a new area analyzer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Area
findSuperArea(Area sub, List<Area> selected)
Starts with a specified subarea and finds all the subareas that may be joined with the first one.-
Methods inherited from class cz.vutbr.fit.layout.segm.op.GroupAnalyzer
getParent, getTopology
-
-
-
-
Constructor Detail
-
GroupAnalyzerByStyles
public GroupAnalyzerByStyles(Area parent, int maxlevel, boolean matchstyles)
Creates a new area analyzer.- Parameters:
parent
- the area processed by the analyzermaxlevel
- maximal level of the areas that can be joined into a super areamatchstyles
- defines whether to compare the element styles while expanding
-
-
Method Detail
-
findSuperArea
public Area findSuperArea(Area sub, List<Area> selected)
Description copied from class:GroupAnalyzer
Starts with a specified subarea and finds all the subareas that may be joined with the first one. Returns an empty area and the vector of the areas inside. The subareas are not automatically added to the new area because this would cause their removal from the parent area.- Overrides:
findSuperArea
in classGroupAnalyzer
- Parameters:
sub
- the subnode to start withselected
- a vector that will be filled with the selected subnodes that should be contained in the new area- Returns:
- the new empty area
-
-