|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.i18n.shared.BidiFormatterBase
public abstract class BidiFormatterBase
Base class for BidiFormatter
and SafeHtmlBidiFormatter
that
contains their common implementation.
Nested Class Summary | |
---|---|
protected static class |
BidiFormatterBase.Factory<T extends BidiFormatterBase>
Abstract factory class for BidiFormatterBase. |
(package private) static class |
BidiFormatterBase.Format
A container class for direction-related string constants, e.g. |
Constructor Summary | |
---|---|
protected |
BidiFormatterBase(HasDirection.Direction contextDir,
boolean alwaysSpan)
|
Method Summary | |
---|---|
protected java.lang.String |
dirAttrBase(java.lang.String str,
boolean isHtml)
|
protected java.lang.String |
endEdgeBase()
|
HasDirection.Direction |
estimateDirection(java.lang.String str)
Like estimateDirection(String, boolean) , but assumes isHtml is false. |
HasDirection.Direction |
estimateDirection(java.lang.String str,
boolean isHtml)
Estimates the direction of a string using the best known general-purpose method, i.e. |
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. |
HasDirection.Direction |
getContextDir()
Returns the context direction. |
boolean |
isRtlContext()
Returns whether the context direction is RTL. |
protected java.lang.String |
knownDirAttrBase(HasDirection.Direction dir)
|
protected java.lang.String |
markAfterBase(java.lang.String str,
boolean isHtml)
|
protected java.lang.String |
markBase()
|
protected java.lang.String |
spanWrapBase(java.lang.String str,
boolean isHtml,
boolean dirReset)
|
protected java.lang.String |
spanWrapWithKnownDirBase(HasDirection.Direction dir,
java.lang.String str,
boolean isHtml,
boolean dirReset)
|
protected java.lang.String |
startEdgeBase()
|
protected java.lang.String |
unicodeWrapBase(java.lang.String str,
boolean isHtml,
boolean dirReset)
|
protected java.lang.String |
unicodeWrapWithKnownDirBase(HasDirection.Direction dir,
java.lang.String str,
boolean isHtml,
boolean dirReset)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BidiFormatterBase(HasDirection.Direction contextDir, boolean alwaysSpan)
Method Detail |
---|
public HasDirection.Direction estimateDirection(java.lang.String str)
estimateDirection(String, boolean)
, but assumes isHtml
is false.
str
- String whose direction is to be estimated
str
's estimated overall directionpublic HasDirection.Direction estimateDirection(java.lang.String str, boolean isHtml)
str
- String whose direction is to be estimatedisHtml
- Whether str
is HTML / HTML-escaped
str
's estimated overall directionpublic boolean getAlwaysSpan()
public HasDirection.Direction getContextDir()
public boolean isRtlContext()
protected java.lang.String dirAttrBase(java.lang.String str, boolean isHtml)
str
- String whose direction is to be estimatedisHtml
- Whether str
is HTML / HTML-escaped
BidiFormatter.dirAttr(String, boolean)
protected java.lang.String endEdgeBase()
BidiFormatter.endEdge()
protected java.lang.String knownDirAttrBase(HasDirection.Direction dir)
dir
- Given direction
BidiFormatter.knownDirAttr(HasDirection.Direction)
protected java.lang.String markAfterBase(java.lang.String str, boolean isHtml)
str
- String after which the mark may need to appearisHtml
- Whether str
is HTML / HTML-escaped
BidiFormatter.markAfter(String, boolean)
protected java.lang.String markBase()
BidiFormatter.mark()
protected java.lang.String spanWrapBase(java.lang.String str, boolean isHtml, boolean dirReset)
str
- The input stringisHtml
- Whether str
is HTML / HTML-escapeddirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str
BidiFormatter.spanWrap(String, boolean, boolean)
protected java.lang.String spanWrapWithKnownDirBase(HasDirection.Direction dir, java.lang.String str, boolean isHtml, boolean dirReset)
dir
- str
's directionstr
- The input stringisHtml
- Whether str
is HTML / HTML-escapeddirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str
BidiFormatter.spanWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)
protected java.lang.String startEdgeBase()
BidiFormatter.startEdge()
protected java.lang.String unicodeWrapBase(java.lang.String str, boolean isHtml, boolean dirReset)
str
- The input stringisHtml
- Whether str
is HTML / HTML-escapeddirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str
BidiFormatter.unicodeWrap(String, boolean, boolean)
protected java.lang.String unicodeWrapWithKnownDirBase(HasDirection.Direction dir, java.lang.String str, boolean isHtml, boolean dirReset)
dir
- str
's directionstr
- The input stringisHtml
- Whether str
is HTML / HTML-escapeddirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow str
BidiFormatter.unicodeWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |