Known Direct Subclasses
|
Summary
Nested Classes |
class |
BidiFormatterBase.Factory<T extends BidiFormatterBase> |
Abstract factory class for BidiFormatterBase. |
Protected Methods |
String
|
dirAttrBase(String str, boolean isHtml)
|
String
|
endEdgeBase()
|
String
|
knownDirAttrBase(HasDirection.Direction dir)
|
String
|
markAfterBase(String str, boolean isHtml)
|
String
|
markBase()
|
String
|
spanWrapBase(String str, boolean isHtml, boolean dirReset)
|
String
|
spanWrapWithKnownDirBase(HasDirection.Direction dir, String str, boolean isHtml, boolean dirReset)
|
String
|
startEdgeBase()
|
String
|
unicodeWrapBase(String str, boolean isHtml, boolean dirReset)
|
String
|
unicodeWrapWithKnownDirBase(HasDirection.Direction dir, String str, boolean isHtml, boolean dirReset)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Protected Constructors
Public Methods
Parameters
str
| String whose direction is to be estimated |
Returns
str
's estimated overall direction
Estimates the direction of a string using the best known general-purpose
method, i.e. using relative word counts. Direction.DEFAULT return value
indicates completely neutral input.
Parameters
str
| String whose direction is to be estimated |
isHtml
| Whether str is HTML / HTML-escaped |
Returns
str
's estimated overall direction
public
boolean
getAlwaysSpan
()
Returns whether the span structure added by the formatter should be stable,
i.e., spans added even when the direction does not need to be declared.
Returns the context direction.
public
boolean
isRtlContext
()
Returns whether the context direction is RTL.
Protected Methods
protected
String
dirAttrBase
(String str, boolean isHtml)
Parameters
str
| String whose direction is to be estimated |
isHtml
| Whether str is HTML / HTML-escaped |
Returns
- "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR text
in non-LTR context; else, the empty string.
protected
String
endEdgeBase
()
Returns
- "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR text
in non-LTR context; else, the empty string.
protected
String
markAfterBase
(String str, boolean isHtml)
Parameters
str
| String after which the mark may need to appear |
isHtml
| Whether str is HTML / HTML-escaped |
Returns
- LRM for RTL text in LTR context; RLM for LTR text in RTL context;
else, the empty string.
protected
String
spanWrapBase
(String str, boolean isHtml, boolean dirReset)
Parameters
str
| The input string |
isHtml
| Whether str is HTML / HTML-escaped |
dirReset
| Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str |
Returns
- Input string after applying the above processing.
protected
String
spanWrapWithKnownDirBase
(HasDirection.Direction dir, String str, boolean isHtml, boolean dirReset)
Parameters
dir
| str 's direction |
str
| The input string |
isHtml
| Whether str is HTML / HTML-escaped |
dirReset
| Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str |
Returns
- Input string after applying the above processing.
protected
String
startEdgeBase
()
protected
String
unicodeWrapBase
(String str, boolean isHtml, boolean dirReset)
Parameters
str
| The input string |
isHtml
| Whether str is HTML / HTML-escaped |
dirReset
| Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str |
Returns
- Input string after applying the above processing.
protected
String
unicodeWrapWithKnownDirBase
(HasDirection.Direction dir, String str, boolean isHtml, boolean dirReset)
Parameters
dir
| str 's direction |
str
| The input string |
isHtml
| Whether str is HTML / HTML-escaped |
dirReset
| Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str |
Returns
- Input string after applying the above processing.