Package org.eclipse.draw2d.text
Class ParagraphTextLayout
java.lang.Object
org.eclipse.draw2d.text.FlowFigureLayout
org.eclipse.draw2d.text.TextLayout
org.eclipse.draw2d.text.ParagraphTextLayout
- All Implemented Interfaces:
LayoutManager
The layout for
TextFlow
.- Since:
- 2.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Wrapping will ONLY occur at valid line breaksstatic final int
Wrapping will always occur at the end of the available space, breaking in the middle of a word.static final int
Wrapping will always occur at the end of available space, truncating a word if it doesn't fit. -
Constructor Summary
ConstructorsConstructorDescriptionParagraphTextLayout
(TextFlow flow) Constructs a new ParagraphTextLayout on the specified TextFlow.ParagraphTextLayout
(TextFlow flow, int style) Constructs the layout with the specified TextFlow and wrapping style. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
layout()
Called duringFlowFigureLayout.layout(IFigure)
.Methods inherited from class org.eclipse.draw2d.text.TextLayout
getFragment
Methods inherited from class org.eclipse.draw2d.text.FlowFigureLayout
getConstraint, getContext, getFlowFigure, getMinimumSize, getPreferredSize, invalidate, layout, remove, setConstraint, setFlowContext
-
Field Details
-
WORD_WRAP_HARD
public static final int WORD_WRAP_HARDWrapping will ONLY occur at valid line breaks- See Also:
-
WORD_WRAP_SOFT
public static final int WORD_WRAP_SOFTWrapping will always occur at the end of the available space, breaking in the middle of a word.- See Also:
-
WORD_WRAP_TRUNCATE
public static final int WORD_WRAP_TRUNCATEWrapping will always occur at the end of available space, truncating a word if it doesn't fit. Note that truncation is not supported across multiple figures and with BiDi. Undesired effects may result if that is the case.- See Also:
-
-
Constructor Details
-
ParagraphTextLayout
Constructs a new ParagraphTextLayout on the specified TextFlow.- Parameters:
flow
- the TextFlow
-
ParagraphTextLayout
Constructs the layout with the specified TextFlow and wrapping style. The wrapping style must be one of:- Parameters:
flow
- the textflowstyle
- the style of wrapping
-
-
Method Details
-
layout
protected void layout()Description copied from class:FlowFigureLayout
Called duringFlowFigureLayout.layout(IFigure)
.- Specified by:
layout
in classFlowFigureLayout
- See Also:
-