Package cz.vutbr.fit.layout.model
Interface Area
- 
- All Superinterfaces:
- ContentRect,- GenericTreeNode<Area>,- Rect,- Taggable
 - All Known Implementing Classes:
- DefaultArea,- RDFArea
 
 public interface Area extends ContentRect, GenericTreeNode<Area>, Taggable An area containing several visual boxes.- Author:
- burgetr
 
- 
- 
Field Summary- 
Fields inherited from interface cz.vutbr.fit.layout.model.ContentRectATTR_SAME_AS
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddBox(Box box)Adds a new box to the area.Areacopy()Creates a copy of the area and makes it a next sibling of the source area.AreacreateSuperArea(Rectangular gp, List<Area> selected, String name)Creates a new subarea from a specified region of the area and moves the selected child nodes to the new area.List<Box>getAllBoxes()Obtains all the boxes from this area and all the child areas.AreaTreegetAreaTree()Obtains the tree the node belongs to.List<Box>getBoxes()Returns the list of boxes that belong directly to this area.ColorgetEffectiveBackgroundColor()Obtains the effective background color visible under the area.RectangulargetGridPosition()Gets the grid position of this area within the parent topology.intgetLevel()Area grouping level.StringgetName()Obtains the area name.StringgetText()Returns the complete text contained in this area and its sub areas concatenated using the default concatenator defined byConcatenators.getDefaultAreaConcatenator().StringgetText(AreaConcatenator concatenator)Returns the complete text contained in this area and its sub areas concatenated using the specified concatenator.StringgetText(String separator)Deprecated.Deprecated in favor ofgetText(AreaConcatenator)AreaTopologygetTopology()Returns the topology of this area.voidinsertParent(Area newParent, Area child)Inserts a new area as a new parent of the given child area.booleanisExplicitlySeparated()When set to true, the area is considered to be separated from other areas explicitly, i.e. independently on its real borders or background.booleanisHorizontalSeparator()Checks whether the area can be interpreted as a horizontal separator.booleanisReplaced()Checks whether this area is formed by replaced boxes.booleanisSeparator()Checks whether the area can be interpreted as any kind of separator.booleanisVerticalSeparator()Checks whether the area can be interpreted as a vertical separator.voidsetAreaTree(AreaTree tree)voidsetBorderStyle(Border.Side side, Border style)Sets the style of the box border at the given side.voidsetExplicitlySeparated(boolean explicitlySeparated)When set to true, the area is considered to be separated from other areas explicitly, i.e. independently on its real borders or background.voidsetGridPosition(Rectangular gp)Sets the grid position of this area within the parent topology.voidsetLevel(int level)Sets the area level.voidsetName(String name)Sets the name of the area that may be later used for its identification usinggetName().voidupdateTopologies()Updates the topologies of the child areas.- 
Methods inherited from interface cz.vutbr.fit.layout.model.ContentRectaddUserAttribute, getBackgroundColor, getBackgroundImagePng, getBorderCount, getBorderStyle, getBottomBorder, getBounds, getId, getLeftBorder, getLine, getPageIri, getRightBorder, getTextStyle, getTopBorder, getUserAttribute, hasBackground, hasBottomBorder, hasLeftBorder, hasRightBorder, hasTopBorder, isBackgroundSeparated, setBackgroundSeparated, setBounds, setLine
 - 
Methods inherited from interface cz.vutbr.fit.layout.model.GenericTreeNodeappendChild, appendChildren, getDepth, getChildAt, getChildCount, getChildren, getIndex, getLeafCount, getNextSibling, getParent, getPreviousSibling, getRoot, childrenChanged, insertChild, isLeaf, isRoot, removeAllChildren, removeChild, removeChild, setParent, setRoot
 - 
Methods inherited from interface cz.vutbr.fit.layout.model.RectgetHeight, getWidth, getX1, getX2, getY1, getY2, move
 - 
Methods inherited from interface cz.vutbr.fit.layout.model.TaggableaddTag, getMostSupportedTag, getSupportedTags, getTags, getTagSupport, hasTag, hasTag, removeTag
 
- 
 
- 
- 
- 
Method Detail- 
setNamevoid setName(String name) Sets the name of the area that may be later used for its identification usinggetName().- Parameters:
- name- the name to be set
 
 - 
getNameString getName() Obtains the area name.- Returns:
- the area name set previously using setName(String)or a default name when nothing has been previously set.
 
 - 
getAreaTreeAreaTree getAreaTree() Obtains the tree the node belongs to.- Returns:
- the tree or nullwhen the node does not form part of any tree.
 
 - 
setAreaTreevoid setAreaTree(AreaTree tree) 
 - 
addBoxvoid addBox(Box box) Adds a new box to the area.- Parameters:
- box- the box to add
 
 - 
getBoxesList<Box> getBoxes() Returns the list of boxes that belong directly to this area.- Returns:
- the list of boxes (possibly empty)
 
 - 
getAllBoxesList<Box> getAllBoxes() Obtains all the boxes from this area and all the child areas.- Returns:
- The list of boxes
 
 - 
getTextString getText() Returns the complete text contained in this area and its sub areas concatenated using the default concatenator defined byConcatenators.getDefaultAreaConcatenator().- Returns:
- A text string (possibly empty)
 
 - 
getTextString getText(String separator) Deprecated.Deprecated in favor ofgetText(AreaConcatenator)Returns the complete text contained in this area and its sub area. The individual areas are separated by the given string separator.- Parameters:
- separator- the string separating the individual areas
- Returns:
- A text string (possibly empty)
 
 - 
getTextString getText(AreaConcatenator concatenator) Returns the complete text contained in this area and its sub areas concatenated using the specified concatenator.- Parameters:
- concatenator- The concatenator to be used to join the areas (and boxes in leaf areas)
- Returns:
- A text string (possibly empty)
 
 - 
isReplacedboolean isReplaced() Checks whether this area is formed by replaced boxes.- Returns:
- trueif the area contains replaced boxes only
 
 - 
getLevelint getLevel() Area grouping level. Area level 0 corresponds to the areas formed by boxes, greater numbers represent greater level of grouping (artificial areas).- Returns:
- the area level
 
 - 
setLevelvoid setLevel(int level) Sets the area level. Area level 0 corresponds to the areas formed by boxes, greater numbers represent greater level of grouping (artificial areas).- Parameters:
- level- the new level to set.
 
 - 
setBorderStylevoid setBorderStyle(Border.Side side, Border style) Sets the style of the box border at the given side.- Parameters:
- side- the border side.
- style- the new border style
 
 - 
getTopologyAreaTopology getTopology() Returns the topology of this area.- Returns:
- The area topology.
 
 - 
setGridPositionvoid setGridPosition(Rectangular gp) Sets the grid position of this area within the parent topology.- Parameters:
- gp- the new grid position
 
 - 
getGridPositionRectangular getGridPosition() Gets the grid position of this area within the parent topology.- Returns:
- the grid position or a unit rectangle when there is no parent
 
 - 
updateTopologiesvoid updateTopologies() Updates the topologies of the child areas. This should be called when some nodes have been inserted, removed or changed in this area.
 - 
getEffectiveBackgroundColorColor getEffectiveBackgroundColor() Obtains the effective background color visible under the area.- Returns:
- The background color.
 
 - 
isHorizontalSeparatorboolean isHorizontalSeparator() Checks whether the area can be interpreted as a horizontal separator.- Returns:
- truewhen this area is a horizontal separator
 
 - 
isVerticalSeparatorboolean isVerticalSeparator() Checks whether the area can be interpreted as a vertical separator.- Returns:
- truewhen this area is a vertical separator
 
 - 
isSeparatorboolean isSeparator() Checks whether the area can be interpreted as any kind of separator.- Returns:
- truewhen this area is a separator
 
 - 
isExplicitlySeparatedboolean isExplicitlySeparated() When set to true, the area is considered to be separated from other areas explicitly, i.e. independently on its real borders or background. This is usually used for some new superareas.- Returns:
- true, if the area is explicitly separated
 
 - 
setExplicitlySeparatedvoid setExplicitlySeparated(boolean explicitlySeparated) When set to true, the area is considered to be separated from other areas explicitly, i.e. independently on its real borders or background. This is usually used for some new superareas.- Parameters:
- explicitlySeparated-- true, if the area should be explicitly separated
 
 - 
createSuperAreaArea createSuperArea(Rectangular gp, List<Area> selected, String name) Creates a new subarea from a specified region of the area and moves the selected child nodes to the new area.- Parameters:
- gp- the subarea bounds
- selected- nodes to be moved to the new area
- name- the name (identification) of the new area
- Returns:
- the new AreaNode created in the tree or null, if nothing was created
 
 - 
insertParentvoid insertParent(Area newParent, Area child) Inserts a new area as a new parent of the given child area. The given area is replaced by the new parent and it becomes a child area of the parent.- Parameters:
- newParent- the new parent area (replacement)
- child- the child area that should be replaced
 
 - 
copyArea copy() Creates a copy of the area and makes it a next sibling of the source area.- Returns:
- the new area
 
 
- 
 
-