Package org.eclipse.draw2d.text
Class BlockFlowLayout
java.lang.Object
org.eclipse.draw2d.text.FlowFigureLayout
org.eclipse.draw2d.text.FlowContainerLayout
org.eclipse.draw2d.text.BlockFlowLayout
- All Implemented Interfaces:
- LayoutManager,- FlowContext
- Direct Known Subclasses:
- PageFlowLayout
The layout for 
BlockFlow figures.
 WARNING: This class is not intended to be subclassed by clients.
- Since:
- 2.1
- 
Constructor SummaryConstructorsConstructorDescriptionBlockFlowLayout(BlockFlow blockFlow) Creates a new BlockFlowLayout with the given BlockFlow.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidAlign the line horizontally and then commit it.voidaddLine(CompositeBox box) Adds an entire line into the context.voidMarks the blocks contents as changed.protected voidcleanup()Flush anything pending and free all temporary data used during layout.protected voidUsed by getCurrentLine().protected voidendBlock()Called by flush(), adds the BlockBox associated with this BlockFlowLayout to the current line and then ends the line.voidendLine()The current line should be committed if it is occupied, and then set tonull.protected voidflush()Called afterFlowContainerLayout.layoutChildren()when all children have been laid out.protected final BlockFlowReturns the BlockFlow associated with this BlockFlowLayoutbooleanThis method is used to convey layout state to different FlowFigures.voidgetWidthLookahead(FlowFigure child, int[] result) This method looks ahead for line-breaks.protected voidCalled before layoutChildren() to setup any necessary state.voidsetContinueOnSameLine(boolean value) This method is used to convey layout state to different FlowFigures.protected voidsets up the single block that contains all of the lines.Methods inherited from class org.eclipse.draw2d.text.FlowContainerLayoutaddToCurrentLine, getRemainingLineWidth, isCurrentLineOccupied, layout, layoutChildrenMethods inherited from class org.eclipse.draw2d.text.FlowFigureLayoutgetConstraint, getContext, getFlowFigure, getMinimumSize, getPreferredSize, invalidate, layout, remove, setConstraint, setFlowContext
- 
Constructor Details- 
BlockFlowLayoutCreates a new BlockFlowLayout with the given BlockFlow.- Parameters:
- blockFlow- the BlockFlow
 
 
- 
- 
Method Details- 
addCurrentLineprotected void addCurrentLine()Align the line horizontally and then commit it.
- 
addLineDescription copied from interface:FlowContextAdds an entire line into the context. If there is a previous line, it is ended.- Parameters:
- box- the line being added
- See Also:
 
- 
blockContentsChangedpublic void blockContentsChanged()Marks the blocks contents as changed. This means that children will be invalidated during validation.- Since:
- 3.1
 
- 
cleanupprotected void cleanup()Description copied from class:FlowContainerLayoutFlush anything pending and free all temporary data used during layout.- Overrides:
- cleanupin class- FlowContainerLayout
- See Also:
 
- 
createNewLineprotected void createNewLine()Description copied from class:FlowContainerLayoutUsed by getCurrentLine().- Specified by:
- createNewLinein class- FlowContainerLayout
- See Also:
 
- 
endBlockprotected void endBlock()Called by flush(), adds the BlockBox associated with this BlockFlowLayout to the current line and then ends the line.
- 
endLinepublic void endLine()Description copied from interface:FlowContextThe current line should be committed if it is occupied, and then set tonull. Otherwise, do nothing.- See Also:
 
- 
flushprotected void flush()Description copied from class:FlowContainerLayoutCalled afterFlowContainerLayout.layoutChildren()when all children have been laid out. This method exists to flush the last line.- Specified by:
- flushin class- FlowContainerLayout
- See Also:
 
- 
getBlockFlowReturns the BlockFlow associated with this BlockFlowLayout- Returns:
- the BlockFlow
 
- 
getContinueOnSameLinepublic boolean getContinueOnSameLine()Description copied from interface:FlowContextThis method is used to convey layout state to different FlowFigures. This state is cleared when a fragment is added to the current line and once the layout is complete.- Returns:
- trueif the next fragment should be placed on the current line
- See Also:
 
- 
getWidthLookaheadDescription copied from interface:FlowContextThis method looks ahead for line-breaks. When laying out, this method can be used to determine the next line-break across multiple figures.- Parameters:
- child- the search will occur starting from the figure after the given child
- result- the width before the next line-break (if one's found; all the width, otherwise) will be added on to the first int in the given array
- See Also:
 
- 
preLayoutprotected void preLayout()Description copied from class:FlowContainerLayoutCalled before layoutChildren() to setup any necessary state.- Specified by:
- preLayoutin class- FlowContainerLayout
- See Also:
 
- 
setContinueOnSameLinepublic void setContinueOnSameLine(boolean value) Description copied from interface:FlowContextThis method is used to convey layout state to different FlowFigures. This state is cleared when a fragment is added and once the layout is complete.- Parameters:
- value-- trueindicates that the first fragment of the next TextFlow should be laid out on the current line, and not a new one
- See Also:
 
- 
setupBlockprotected void setupBlock()sets up the single block that contains all of the lines.
 
-