Package org.eclipse.draw2d.text
Class InlineFlowLayout
java.lang.Object
org.eclipse.draw2d.text.FlowFigureLayout
org.eclipse.draw2d.text.FlowContainerLayout
org.eclipse.draw2d.text.InlineFlowLayout
- All Implemented Interfaces:
- LayoutManager,- FlowContext
The layout manager for 
InlineFlow figures.
 WARNING: This class is not intended to be subclassed by clients.
- Since:
- 2.1
- 
Constructor SummaryConstructorsConstructorDescriptionInlineFlowLayout(FlowFigure flow) Creates a new InlineFlowLayout with the given FlowFigure.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddLine(CompositeBox box) Adds the given box as a line below the current line.protected voidUsed by getCurrentLine().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.booleanInlineFlowLayout gets this information from its context.protected InlineFlowvoidgetWidthLookahead(FlowFigure child, int[] result) This method looks ahead for line-breaks.booleanvoidClears out all fragments prior to the call to layoutChildren().voidsetContinueOnSameLine(boolean value) InlineFlow passes this information to its context.protected voidInitializes the given LineBox.Methods inherited from class org.eclipse.draw2d.text.FlowContainerLayoutaddToCurrentLine, cleanup, getRemainingLineWidth, layout, layoutChildrenMethods inherited from class org.eclipse.draw2d.text.FlowFigureLayoutgetConstraint, getContext, getMinimumSize, getPreferredSize, invalidate, layout, remove, setConstraint, setFlowContext
- 
Constructor Details- 
InlineFlowLayoutCreates a new InlineFlowLayout with the given FlowFigure.- Parameters:
- flow- The FlowFigure
 
 
- 
- 
Method Details- 
addLineAdds the given box as a line below the current line.- Parameters:
- box- the box to add
 
- 
createNewLineprotected void createNewLine()Description copied from class:FlowContainerLayoutUsed by getCurrentLine().- Specified by:
- createNewLinein class- FlowContainerLayout
- See Also:
 
- 
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:
 
- 
getFlowFigure- Overrides:
- getFlowFigurein class- FlowFigureLayout
- Returns:
- the FlowFigure
- Since:
- 3.15
 
- 
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:
 
- 
getContinueOnSameLinepublic boolean getContinueOnSameLine()InlineFlowLayout gets this information from its context.- 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:
 
- 
isCurrentLineOccupiedpublic boolean isCurrentLineOccupied()- Specified by:
- isCurrentLineOccupiedin interface- FlowContext
- Overrides:
- isCurrentLineOccupiedin class- FlowContainerLayout
- Returns:
- trueif the current line contains any fragments
- See Also:
 
- 
preLayoutpublic void preLayout()Clears out all fragments prior to the call to layoutChildren().- Specified by:
- preLayoutin class- FlowContainerLayout
 
- 
setContinueOnSameLinepublic void setContinueOnSameLine(boolean value) InlineFlow passes this information to its context.- 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:
 
- 
setupLineInitializes the given LineBox. Called by createNewLine().- Parameters:
- line- The LineBox to initialize.
 
 
-