|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.equinox.bidi.StructuredTextProcessor
public final class StructuredTextProcessor
Provides methods to process bidirectional text with a specific structure. The methods in this class are the most straightforward way to add directional formatting characters to the source text to ensure correct presentation, or to remove those characters to restore the original text (for more explanations, please see the package documentation).
This class can be used without OSGi running (but only the structured text types declared
in StructuredTextTypeHandlerFactory
are available in that mode).
Method Summary | |
---|---|
static java.lang.String |
deprocess(java.lang.String str)
Removes directional formatting characters in the given string. |
static java.lang.String |
deprocessTyped(java.lang.String str,
java.lang.String textType)
Removes directional formatting characters in the given string. |
static java.lang.String |
getDefaultSeparators()
Returns a string containing all the default separator characters to be used to segment a given string. |
static java.lang.String |
process(java.lang.String str)
Processes the given (lean) text and returns a string with appropriate directional formatting characters (full text). |
static java.lang.String |
process(java.lang.String str,
java.lang.String separators)
Processes a string that has a particular semantic meaning to render it correctly on bidi locales. |
static java.lang.String |
processTyped(java.lang.String str,
java.lang.String textType)
Processes a string that has a particular semantic meaning to render it correctly on bidi locales. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String process(java.lang.String str)
process(String str, String separators)
with the default
set of separators.
The processing adds directional formatting characters so that presentation using the Unicode Bidirectional Algorithm will provide the expected result. The text is segmented according to the provided separators. Each segment has the Unicode Bidi Algorithm applied to it, but as a whole, the string is oriented left to right.
For example, a file path such as d:\myfolder\FOLDER\MYFILE.java (where capital letters indicate RTL text) should render as d:\myfolder\REDLOF\ELIFYM.java.
str
- the lean text to process.
deprocess(String)
public static java.lang.String process(java.lang.String str, java.lang.String separators)
process(String)
.
str
- the lean text to process.separators
- characters by which the string will be segmented.
deprocess(String)
public static java.lang.String processTyped(java.lang.String str, java.lang.String textType)
process(String)
.
str
- the lean text to process.textType
- an identifier for the structured text handler
appropriate for the type of the text submitted.
It may be one of the identifiers defined in
StructuredTextTypeHandlerFactory
or a type handler identifier
registered by a plug-in.
deprocessTyped(java.lang.String, java.lang.String)
public static java.lang.String deprocess(java.lang.String str)
str
- string with directional characters to remove (full text).
public static java.lang.String deprocessTyped(java.lang.String str, java.lang.String textType)
str
- string with directional characters to remove (full text).textType
- an identifier for the structured text handler
appropriate for the type of the text submitted.
It may be one of the identifiers defined in
StructuredTextTypeHandlerFactory
or a type handler identifier
registered by a plug-in.
processTyped(String, String)
public static java.lang.String getDefaultSeparators()
|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.