Package org.eclipse.draw2d.text
Class FlowContainerLayout
java.lang.Object
org.eclipse.draw2d.text.FlowFigureLayout
org.eclipse.draw2d.text.FlowContainerLayout
- All Implemented Interfaces:
LayoutManager
,FlowContext
- Direct Known Subclasses:
BlockFlowLayout
,InlineFlowLayout
A layout for FlowFigures with children.
WARNING: This class is not intended to be subclassed by clients.
- Since:
- 2.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCurrentLine
(FlowBox child) Adds the given box the current line and clears the context's state.protected void
cleanup()
Flush anything pending and free all temporary data used during layout.protected abstract void
Used by getCurrentLine().protected abstract void
flush()
Called afterlayoutChildren()
when all children have been laid out.int
This method can be used to query the amount of space left on the current line.boolean
protected void
layout()
Called duringFlowFigureLayout.layout(IFigure)
.protected void
Layout all children.protected abstract void
Called before layoutChildren() to setup any necessary state.Methods inherited from class org.eclipse.draw2d.text.FlowFigureLayout
getConstraint, getContext, getFlowFigure, getMinimumSize, getPreferredSize, invalidate, layout, remove, setConstraint, setFlowContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.draw2d.text.FlowContext
addLine, endLine, getContinueOnSameLine, getWidthLookahead, setContinueOnSameLine
-
Constructor Details
-
FlowContainerLayout
- See Also:
-
-
Method Details
-
addToCurrentLine
Adds the given box the current line and clears the context's state.- Specified by:
addToCurrentLine
in interfaceFlowContext
- Parameters:
child
- the FlowBox to add- See Also:
-
cleanup
protected void cleanup()Flush anything pending and free all temporary data used during layout. -
createNewLine
protected abstract void createNewLine()Used by getCurrentLine(). -
flush
protected abstract void flush()Called afterlayoutChildren()
when all children have been laid out. This method exists to flush the last line. -
getRemainingLineWidth
public int getRemainingLineWidth()Description copied from interface:FlowContext
This method can be used to query the amount of space left on the current line. It can help determine where to wrap during layout.- Specified by:
getRemainingLineWidth
in interfaceFlowContext
- Returns:
- the amount of space left on the current line
- See Also:
-
isCurrentLineOccupied
public boolean isCurrentLineOccupied()- Specified by:
isCurrentLineOccupied
in interfaceFlowContext
- Returns:
true
if the current line contains any fragments- See Also:
-
layout
protected void layout()Description copied from class:FlowFigureLayout
Called duringFlowFigureLayout.layout(IFigure)
.- Specified by:
layout
in classFlowFigureLayout
- See Also:
-
layoutChildren
protected void layoutChildren()Layout all children. -
preLayout
protected abstract void preLayout()Called before layoutChildren() to setup any necessary state.
-