|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wookie.w3c.util.FormattingUtils
public class FormattingUtils
i18n formatting utilities
The methods in this class can be used to obtain strings that have been processed for i18n content to be presented in different ways, for example using CSS styling or unicode control characters
The getFormattedXYZ methods generate i18n strings using CSS bidi properties for use in display. This involves inserting HTML <span> tags containing CSS styling properties for text direction
The getEncodedXYZ methods generate unicode Strings using unicode control characters, and remove any embedded <span> tags
| Field Summary | |
|---|---|
static java.lang.String |
END
|
static java.lang.String |
LRO
|
static java.lang.String |
LTR
|
static java.lang.String |
RLO
|
static java.lang.String |
RTL
|
| Constructor Summary | |
|---|---|
FormattingUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getEncoded(java.lang.String dir,
java.lang.String value)
|
protected static java.lang.String |
getFormatted(java.lang.String value)
Generates a CSS i18n string from a raw string. |
protected static java.lang.String |
getFormatted(java.lang.String dir,
java.lang.String value)
Generates a CSS i18n string using a given direction and value |
static java.lang.String |
getFormattedWidgetAuthor(IAuthor author)
Returns the CSS formatted i18n string for the widget author's name |
static java.lang.String |
getFormattedWidgetDescription(IDescription description)
Returns the CSS formatted i18n string for the widget description |
static java.lang.String |
getFormattedWidgetLicense(ILicense license)
Returns the CSS formatted i18n string for the widget license |
static java.lang.String |
getFormattedWidgetName(IName name)
Returns the CSS formatted i18n string for the widget name |
static java.lang.String |
getFormattedWidgetShortName(IName name)
Returns the CSS formatted i18n string for the widget short name |
static java.lang.String |
getFormattedWidgetVersion(W3CWidget widget)
Returns the CSS formatted i18n string for the widget version |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LTR
public static final java.lang.String RTL
public static final java.lang.String LRO
public static final java.lang.String RLO
public static final java.lang.String END
| Constructor Detail |
|---|
public FormattingUtils()
| Method Detail |
|---|
public static java.lang.String getFormattedWidgetName(IName name)
name - the Widget's Name entity
public static java.lang.String getFormattedWidgetShortName(IName name)
name - the Widget's Name entity
public static java.lang.String getFormattedWidgetVersion(W3CWidget widget)
widget - the Widget
public static java.lang.String getFormattedWidgetDescription(IDescription description)
description - the Widget's description entity
public static java.lang.String getFormattedWidgetAuthor(IAuthor author)
author - the Widget's author entity
public static java.lang.String getFormattedWidgetLicense(ILicense license)
license - the Widget's License entity
protected static java.lang.String getFormatted(java.lang.String value)
value -
protected static java.lang.String getFormatted(java.lang.String dir,
java.lang.String value)
dir - the text directionvalue - the value to modify
public static java.lang.String getEncoded(java.lang.String dir,
java.lang.String value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||