Package cz.vutbr.fit.layout.model
Interface TextChunk
-
- All Superinterfaces:
ContentRect
,Rect
,Taggable
- All Known Implementing Classes:
DefaultTextChunk
,RDFTextChunk
public interface TextChunk extends ContentRect, Taggable
An rectangular area representing a text chunk. The text of the chunk is not given by boxes; it is specified explicitly.- Author:
- burgetr
-
-
Field Summary
-
Fields inherited from interface cz.vutbr.fit.layout.model.ContentRect
ATTR_SAME_AS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Color
getColor()
Gets the text color of the chunk.Color
getEffectiveBackgroundColor()
Gets the efficient background color of the chunk.String
getFontFamily()
Gets the font family of the chunk.ChunkSet
getChunkSet()
Gets the chunk set the chunk belongs to.String
getName()
Gets a readable name of the chunk for listing purposes.Area
getSourceArea()
Gets the source area the chunk was extracted from.Box
getSourceBox()
Gets the source box the chunk was extracted from.String
getText()
Gets the complete text of the chunk.void
setName(String name)
Sets a readable name of the chunk for listing purposes.-
Methods inherited from interface cz.vutbr.fit.layout.model.ContentRect
addUserAttribute, 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.Rect
getHeight, getWidth, getX1, getX2, getY1, getY2, move
-
Methods inherited from interface cz.vutbr.fit.layout.model.Taggable
addTag, getMostSupportedTag, getSupportedTags, getTags, getTagSupport, hasTag, hasTag, removeTag
-
-
-
-
Method Detail
-
getChunkSet
ChunkSet getChunkSet()
Gets the chunk set the chunk belongs to.- Returns:
- the chunk set or
null
when the chunk does not belong to any set.
-
getText
String getText()
Gets the complete text of the chunk.- Returns:
- the text chunk.
-
getName
String getName()
Gets a readable name of the chunk for listing purposes.- Returns:
- the chunk name.
-
setName
void setName(String name)
Sets a readable name of the chunk for listing purposes.- Parameters:
name
- the chunk name
-
getSourceArea
Area getSourceArea()
Gets the source area the chunk was extracted from.- Returns:
- the source area
-
getSourceBox
Box getSourceBox()
Gets the source box the chunk was extracted from.- Returns:
- the source box
-
getFontFamily
String getFontFamily()
Gets the font family of the chunk.- Returns:
- the font family name
-
getColor
Color getColor()
Gets the text color of the chunk.- Returns:
- the text color
-
getEffectiveBackgroundColor
Color getEffectiveBackgroundColor()
Gets the efficient background color of the chunk.- Returns:
- the background color or
nul
when transparent.
-
-