Interface ILayouter
-
- All Known Implementing Classes:
DefaultLayouter
public interface ILayouter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Point
getInitialOffset(Word word, Rectangle cloudArea)
Calculates the initial offset of the given word, within the bounds of the specified rectangle.boolean
layout(Point initial, Word word, Rectangle cloudArea, CloudMatrix cloudMatrix)
Places the given word within the defined rectangle, starting at the initial position.void
setOption(java.lang.String optionName, java.lang.Object object)
Set Layouter-specific options.
-
-
-
Method Detail
-
layout
boolean layout(Point initial, Word word, Rectangle cloudArea, CloudMatrix cloudMatrix)
Places the given word within the defined rectangle, starting at the initial position.- Parameters:
initial
-word
-cloudArea
-cloudMatrix
-- Returns:
- whether the given word could be placed or not
-
getInitialOffset
Point getInitialOffset(Word word, Rectangle cloudArea)
Calculates the initial offset of the given word, within the bounds of the specified rectangle. The layout algorithm will try to find a matching position around the initial offset.- Parameters:
word
-cloudArea
-- Returns:
- the initial offset for the given word
-
setOption
void setOption(java.lang.String optionName, java.lang.Object object)
Set Layouter-specific options. SeeDefaultLayouter
as an example.- Parameters:
optionName
-object
-
-
-