Package org.eclipse.draw2d.text
Class BidiProcessor
java.lang.Object
org.eclipse.draw2d.text.BidiProcessor
A helper class for a BlockFlow that does Bidi evaluation of all the text in
that block.
WARNING: This class is for INTERNAL use only.
- Since:
- 3.1
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(FlowFigure fig, char c) Records a character contribution for this bidi context.void
add
(FlowFigure fig, String str) Records a String contribution for this bidi context.void
addControlChar
(char c) This methods allows FlowFigures to contribute text that may effect the bidi evaluation, but is not text that is visible on the screen.void
process()
Processes the contributed text, determines the Bidi levels, and assigns them to the FlowFigures that made thet contributions.void
setOrientation
(int newOrientation) Sets the paragraph embedding.
-
Field Details
-
INSTANCE
A singleton instance.
-
-
Method Details
-
add
Records a String contribution for this bidi context. Contributions are concatenated (in the order that they were contributed) to make the final String which will determine the bidi info for all contributors.- Parameters:
fig
- the figure that is contributing the given textstr
- the text contributed by the given figure- See Also:
-
add
Records a character contribution for this bidi context. Contributions are concatenated (in the order that they were contributed) to make the final String which will determine the bidi info for all contributors.- Parameters:
fig
- the figure that is contributing the given textc
- the character being added- See Also:
-
addControlChar
public void addControlChar(char c) This methods allows FlowFigures to contribute text that may effect the bidi evaluation, but is not text that is visible on the screen. The bidi level of such text is reported back to the contributing figure.- Parameters:
c
- the control character
-
process
public void process()Processes the contributed text, determines the Bidi levels, and assigns them to the FlowFigures that made thet contributions. This class is for INTERNAL use only. Shaping of visually contiguous Arabic characters that are split in different figures is also handled. This method will do nothing if the contributed text does not require Bidi evaluation. All contributions are discarded at the end of this method. -
setOrientation
public void setOrientation(int newOrientation) Sets the paragraph embedding. The given orientation will be used on TextLayout when determining the Bidi levels.- Parameters:
newOrientation
- SWT.LEFT_TO_RIGHT or SWT.RIGHT_TO_LEFT
-