|
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 com.google.gwt.i18n.shared.SafeHtmlBidiFormatter
public class SafeHtmlBidiFormatter
A wrapper to BidiFormatter
whose methods return SafeHtml
instead of String
.
Nested Class Summary | |
---|---|
(package private) static class |
SafeHtmlBidiFormatter.Factory
|
Nested classes/interfaces inherited from class com.google.gwt.i18n.shared.BidiFormatterBase |
---|
BidiFormatterBase.Format |
Method Summary | |
---|---|
SafeHtml |
dirAttr(SafeHtml html)
|
SafeHtml |
dirAttr(java.lang.String str)
|
SafeHtml |
endEdge()
Returns "left" for RTL context direction. |
HasDirection.Direction |
estimateDirection(SafeHtml html)
|
static SafeHtmlBidiFormatter |
getInstance(boolean rtlContext)
Factory for creating an instance of SafeHtmlBidiFormatter given the context direction. |
static SafeHtmlBidiFormatter |
getInstance(boolean rtlContext,
boolean alwaysSpan)
Factory for creating an instance of SafeHtmlBidiFormatter given the context direction and the desired span wrapping behavior (see below). |
static SafeHtmlBidiFormatter |
getInstance(HasDirection.Direction contextDir)
Factory for creating an instance of SafeHtmlBidiFormatter given the context direction. |
static SafeHtmlBidiFormatter |
getInstance(HasDirection.Direction contextDir,
boolean alwaysSpan)
Factory for creating an instance of SafeHtmlBidiFormatter given the context direction and the desired span wrapping behavior (see below). |
static SafeHtmlBidiFormatter |
getInstanceForCurrentLocale()
Factory for creating an instance of SafeHtmlBidiFormatter whose context direction matches the current locale's direction. |
static SafeHtmlBidiFormatter |
getInstanceForCurrentLocale(boolean alwaysSpan)
Factory for creating an instance of SafeHtmlBidiFormatter whose context direction matches the current locale's direction, and given the desired span wrapping behavior (see below). |
SafeHtml |
knownDirAttr(HasDirection.Direction dir)
|
SafeHtml |
mark()
|
SafeHtml |
markAfter(SafeHtml html)
|
SafeHtml |
markAfter(java.lang.String str)
|
SafeHtml |
spanWrap(SafeHtml html)
|
SafeHtml |
spanWrap(SafeHtml html,
boolean dirReset)
|
SafeHtml |
spanWrap(java.lang.String str)
|
SafeHtml |
spanWrap(java.lang.String str,
boolean dirReset)
|
SafeHtml |
spanWrapWithKnownDir(HasDirection.Direction dir,
SafeHtml html)
|
SafeHtml |
spanWrapWithKnownDir(HasDirection.Direction dir,
SafeHtml html,
boolean dirReset)
|
SafeHtml |
spanWrapWithKnownDir(HasDirection.Direction dir,
java.lang.String str)
|
SafeHtml |
spanWrapWithKnownDir(HasDirection.Direction dir,
java.lang.String str,
boolean dirReset)
|
SafeHtml |
startEdge()
Returns "right" for RTL context direction. |
SafeHtml |
unicodeWrap(SafeHtml html)
|
SafeHtml |
unicodeWrap(SafeHtml html,
boolean dirReset)
|
SafeHtml |
unicodeWrap(java.lang.String str)
|
SafeHtml |
unicodeWrap(java.lang.String str,
boolean dirReset)
|
SafeHtml |
unicodeWrapWithKnownDir(HasDirection.Direction dir,
SafeHtml html)
|
SafeHtml |
unicodeWrapWithKnownDir(HasDirection.Direction dir,
SafeHtml html,
boolean dirReset)
|
SafeHtml |
unicodeWrapWithKnownDir(HasDirection.Direction dir,
java.lang.String str)
|
SafeHtml |
unicodeWrapWithKnownDir(HasDirection.Direction dir,
java.lang.String str,
boolean dirReset)
|
Methods inherited from class com.google.gwt.i18n.shared.BidiFormatterBase |
---|
dirAttrBase, endEdgeBase, estimateDirection, estimateDirection, getAlwaysSpan, getContextDir, isRtlContext, knownDirAttrBase, markAfterBase, markBase, spanWrapBase, spanWrapWithKnownDirBase, startEdgeBase, unicodeWrapBase, unicodeWrapWithKnownDirBase |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SafeHtmlBidiFormatter getInstance(boolean rtlContext)
spanWrap(com.google.gwt.safehtml.shared.SafeHtml)
and its variations is
set to avoid span wrapping unless it's necessary ('dir' attribute needs to
be set).
rtlContext
- Whether the context direction is RTL.
In one simple use case, the context direction would simply be the
locale direction, which can be retrieved using
LocaleInfo.getCurrentLocale().isRTL()
public static SafeHtmlBidiFormatter getInstance(boolean rtlContext, boolean alwaysSpan)
rtlContext
- Whether the context direction is RTL. See an example of
a simple use case at getInstance(boolean)
alwaysSpan
- Whether spanWrap(com.google.gwt.safehtml.shared.SafeHtml)
(and its variations) should
always use a 'span' tag, even when the input direction is neutral
or matches the context, so that the DOM structure of the output
does not depend on the combination of directionspublic static SafeHtmlBidiFormatter getInstance(HasDirection.Direction contextDir)
spanWrap(com.google.gwt.safehtml.shared.SafeHtml)
and its variations is
set to avoid span wrapping unless it's necessary ('dir' attribute needs to
be set).
contextDir
- The context direction. See an example of a simple use
case at getInstance(boolean)
. Note: Direction.DEFAULT
indicates unknown context direction. Try not to use it, since it
is impossible to reset the direction back to the context when it
is unknownpublic static SafeHtmlBidiFormatter getInstance(HasDirection.Direction contextDir, boolean alwaysSpan)
contextDir
- The context direction. See an example of a simple use
case at getInstance(boolean)
. Note: Direction.DEFAULT
indicates unknown context direction. Try not to use it, since it
is impossible to reset the direction back to the context when it
is unknownalwaysSpan
- Whether spanWrap(com.google.gwt.safehtml.shared.SafeHtml)
(and its variations) should
always use a 'span' tag, even when the input direction is neutral
or matches the context, so that the DOM structure of the output
does not depend on the combination of directionspublic static SafeHtmlBidiFormatter getInstanceForCurrentLocale()
spanWrap(com.google.gwt.safehtml.shared.SafeHtml)
and its variations is set to avoid span wrapping unless
it's necessary ('dir' attribute needs to be set).
public static SafeHtmlBidiFormatter getInstanceForCurrentLocale(boolean alwaysSpan)
alwaysSpan
- Whether spanWrap(com.google.gwt.safehtml.shared.SafeHtml)
(and its variations) should
always use a 'span' tag, even when the input direction is neutral
or matches the context, so that the DOM structure of the output
does not depend on the combination of directionspublic SafeHtml dirAttr(SafeHtml html)
html
- Html whose direction is to be estimated
BidiFormatter.dirAttr(String, boolean)
public SafeHtml dirAttr(java.lang.String str)
str
- String whose direction is to be estimated
BidiFormatter.dirAttr(java.lang.String)
public SafeHtml endEdge()
public HasDirection.Direction estimateDirection(SafeHtml html)
html
- Html whose direction is to be estimated
html
's estimated overall directionBidiFormatterBase.estimateDirection(String, boolean)
public SafeHtml knownDirAttr(HasDirection.Direction dir)
dir
- Given direction
BidiFormatter.knownDirAttr(com.google.gwt.i18n.client.HasDirection.Direction)
public SafeHtml mark()
BidiFormatter.mark()
public SafeHtml markAfter(SafeHtml html)
html
- Html after which the mark may need to appear
BidiFormatter.markAfter(java.lang.String)
public SafeHtml markAfter(java.lang.String str)
str
- String after which the mark may need to appear
BidiFormatter.markAfter(java.lang.String)
public SafeHtml spanWrap(SafeHtml html)
html
- The input html
BidiFormatter.spanWrap(String, boolean)
public SafeHtml spanWrap(SafeHtml html, boolean dirReset)
html
- The input htmldirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow html
BidiFormatter.spanWrap(String, boolean, boolean)
public SafeHtml spanWrap(java.lang.String str)
str
- The input string
BidiFormatter.spanWrap(String)
public SafeHtml spanWrap(java.lang.String str, boolean dirReset)
str
- The input stringdirReset
- 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)
public SafeHtml spanWrapWithKnownDir(HasDirection.Direction dir, SafeHtml html)
dir
- str
's directionhtml
- The input html
BidiFormatter.spanWrapWithKnownDir(
com.google.gwt.i18n.client.HasDirection.Direction, String, boolean)
public SafeHtml spanWrapWithKnownDir(HasDirection.Direction dir, SafeHtml html, boolean dirReset)
dir
- html
's directionhtml
- The input htmldirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow html
BidiFormatter.spanWrapWithKnownDir(
com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)
public SafeHtml spanWrapWithKnownDir(HasDirection.Direction dir, java.lang.String str)
dir
- str
's directionstr
- The input string
BidiFormatter.spanWrapWithKnownDir(
com.google.gwt.i18n.client.HasDirection.Direction, String)
public SafeHtml spanWrapWithKnownDir(HasDirection.Direction dir, java.lang.String str, boolean dirReset)
dir
- str
's directionstr
- The input stringdirReset
- 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(
com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)
public SafeHtml startEdge()
public SafeHtml unicodeWrap(SafeHtml html)
html
- The input html
BidiFormatter.unicodeWrap(String, boolean)
public SafeHtml unicodeWrap(SafeHtml html, boolean dirReset)
html
- The input htmldirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow html
BidiFormatter.unicodeWrap(String, boolean, boolean)
public SafeHtml unicodeWrap(java.lang.String str)
str
- The input string
BidiFormatter.unicodeWrap(String)
public SafeHtml unicodeWrap(java.lang.String str, boolean dirReset)
str
- The input stringdirReset
- 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)
public SafeHtml unicodeWrapWithKnownDir(HasDirection.Direction dir, SafeHtml html)
dir
- html
's directionhtml
- The input html
BidiFormatter.unicodeWrapWithKnownDir(
com.google.gwt.i18n.client.HasDirection.Direction, String, boolean)
public SafeHtml unicodeWrapWithKnownDir(HasDirection.Direction dir, SafeHtml html, boolean dirReset)
dir
- html
's directionhtml
- The input htmldirReset
- Whether to append a trailing unicode bidi mark matching the
context direction, when needed, to prevent the possible garbling
of whatever may follow html
BidiFormatter.unicodeWrapWithKnownDir(
com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)
public SafeHtml unicodeWrapWithKnownDir(HasDirection.Direction dir, java.lang.String str)
dir
- str
's directionstr
- The input string
BidiFormatter.unicodeWrapWithKnownDir(
com.google.gwt.i18n.client.HasDirection.Direction, String)
public SafeHtml unicodeWrapWithKnownDir(HasDirection.Direction dir, java.lang.String str, boolean dirReset)
dir
- str
's directionstr
- The input stringdirReset
- 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(
com.google.gwt.i18n.client.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 |