## org.apache.batik.bridge
Class TextUtilities

    java.lang.Object
      org.apache.batik.bridge.TextUtilities

All Implemented Interfaces:
  CSSConstants, ErrorConstants

public abstract class TextUtilities
extends java.lang.Object
implements CSSConstants, ErrorConstants

A collection of utility method for text.

Field Summary

Fields inherited from interface org.apache.batik.util.CSSConstants

`CSS_ACCUMULATE_VALUE, CSS_ACTIVEBORDER_VALUE, CSS_ACTIVECAPTION_VALUE, CSS_AFTER_EDGE_VALUE, CSS_ALICEBLUE_VALUE, CSS_ALIGNMENT_BASELINE_PROPERTY, CSS_ALL_VALUE, CSS_ALPHABETIC_VALUE, CSS_ANTIQUEWHITE_VALUE, CSS_APPWORKSPACE_VALUE, CSS_AQUA_VALUE, CSS_AQUAMARINE_VALUE, CSS_AUTO_VALUE, CSS_AUTOSENSE_SCRIPT_VALUE, CSS_AZURE_VALUE, CSS_BACKGROUND_VALUE, CSS_BASELINE_SHIFT_PROPERTY, CSS_BASELINE_VALUE, CSS_BEFORE_EDGE_VALUE, CSS_BEIGE_VALUE, CSS_BEVEL_VALUE, CSS_BIDI_OVERRIDE_VALUE, CSS_BISQUE_VALUE, CSS_BLACK_VALUE, CSS_BLANCHEDALMOND_VALUE, CSS_BLINK_VALUE, CSS_BLOCK_VALUE, CSS_BLUE_VALUE, CSS_BLUEVIOLET_VALUE, CSS_BOLD_VALUE, CSS_BOLDER_VALUE, CSS_BOTTOM_VALUE, CSS_BROWN_VALUE, CSS_BURLYWOOD_VALUE, CSS_BUTT_VALUE, CSS_BUTTONFACE_VALUE, CSS_BUTTONHIGHLIGHT_VALUE, CSS_BUTTONSHADOW_VALUE, CSS_BUTTONTEXT_VALUE, CSS_CADETBLUE_VALUE, CSS_CAPTIONTEXT_VALUE, CSS_CENTER_VALUE, CSS_CENTRAL_VALUE, CSS_CHARTREUSE_VALUE, CSS_CHOCOLATE_VALUE, CSS_CLIP_PATH_PROPERTY, CSS_CLIP_PROPERTY, CSS_CLIP_RULE_PROPERTY, CSS_COLLAPSE_VALUE, CSS_COLOR_INTERPOLATION_FILTERS_PROPERTY, CSS_COLOR_INTERPOLATION_PROPERTY, CSS_COLOR_PROFILE_PROPERTY, CSS_COLOR_PROPERTY, CSS_COLOR_RENDERING_PROPERTY, CSS_COMPACT_VALUE, CSS_CONDENSED_VALUE, CSS_CORAL_VALUE, CSS_CORNFLOWERBLUE_VALUE, CSS_CORNSILK_VALUE, CSS_CRIMSON_VALUE, CSS_CRISPEDGES_VALUE, CSS_CROSSHAIR_VALUE, CSS_CURRENTCOLOR_VALUE, CSS_CURSIVE_VALUE, CSS_CURSOR_PROPERTY, CSS_CYAN_VALUE, CSS_DARKBLUE_VALUE, CSS_DARKCYAN_VALUE, CSS_DARKGOLDENROD_VALUE, CSS_DARKGRAY_VALUE, CSS_DARKGREEN_VALUE, CSS_DARKGREY_VALUE, CSS_DARKKHAKI_VALUE, CSS_DARKMAGENTA_VALUE, CSS_DARKOLIVEGREEN_VALUE, CSS_DARKORANGE_VALUE, CSS_DARKORCHID_VALUE, CSS_DARKRED_VALUE, CSS_DARKSALMON_VALUE, CSS_DARKSEAGREEN_VALUE, CSS_DARKSLATEBLUE_VALUE, CSS_DARKSLATEGRAY_VALUE, CSS_DARKSLATEGREY_VALUE, CSS_DARKTURQUOISE_VALUE, CSS_DARKVIOLET_VALUE, CSS_DEEPPINK_VALUE, CSS_DEEPSKYBLUE_VALUE, CSS_DEFAULT_VALUE, CSS_DIMGRAY_VALUE, CSS_DIMGREY_VALUE, CSS_DIRECTION_PROPERTY, CSS_DISPLAY_PROPERTY, CSS_DODGERBLUE_VALUE, CSS_DOMINANT_BASELINE_PROPERTY, CSS_E_RESIZE_VALUE, CSS_EMBED_VALUE, CSS_ENABLE_BACKGROUND_PROPERTY, CSS_END_VALUE, CSS_EVENODD_VALUE, CSS_EXPANDED_VALUE, CSS_EXTRA_CONDENSED_VALUE, CSS_EXTRA_EXPANDED_VALUE, CSS_FANTASY_VALUE, CSS_FILL_OPACITY_PROPERTY, CSS_FILL_PROPERTY, CSS_FILL_RULE_PROPERTY, CSS_FILL_VALUE, CSS_FILLSTROKE_VALUE, CSS_FILTER_PROPERTY, CSS_FIREBRICK_VALUE, CSS_FLOOD_COLOR_PROPERTY, CSS_FLOOD_OPACITY_PROPERTY, CSS_FLORALWHITE_VALUE, CSS_FONT_FAMILY_PROPERTY, CSS_FONT_PROPERTY, CSS_FONT_SIZE_ADJUST_PROPERTY, CSS_FONT_SIZE_PROPERTY, CSS_FONT_STRETCH_PROPERTY, CSS_FONT_STYLE_PROPERTY, CSS_FONT_VARIANT_PROPERTY, CSS_FONT_WEIGHT_PROPERTY, CSS_FORESTGREEN_VALUE, CSS_FUCHSIA_VALUE, CSS_GAINSBORO_VALUE, CSS_GEOMETRICPRECISION_VALUE, CSS_GHOSTWHITE_VALUE, CSS_GLYPH_ORIENTATION_HORIZONTAL_PROPERTY, CSS_GLYPH_ORIENTATION_VERTICAL_PROPERTY, CSS_GOLD_VALUE, CSS_GOLDENROD_VALUE, CSS_GRAY_VALUE, CSS_GRAYTEXT_VALUE, CSS_GREEN_VALUE, CSS_GREENYELLOW_VALUE, CSS_GREY_VALUE, CSS_HANGING_VALUE, CSS_HELP_VALUE, CSS_HIDDEN_VALUE, CSS_HIGHLIGHT_VALUE, CSS_HIGHLIGHTTEXT_VALUE, CSS_HONEYDEW_VALUE, CSS_HOTPINK_VALUE, CSS_IDEOGRAPHIC_VALUE, CSS_IMAGE_RENDERING_PROPERTY, CSS_INACTIVEBORDER_VALUE, CSS_INACTIVECAPTION_VALUE, CSS_INACTIVECAPTIONTEXT_VALUE, CSS_INDIANRED_VALUE, CSS_INDIGO_VALUE, CSS_INFOBACKGROUND_VALUE, CSS_INFOTEXT_VALUE, CSS_INLINE_TABLE_VALUE, CSS_INLINE_VALUE, CSS_ITALIC_VALUE, CSS_IVORY_VALUE, CSS_KERNING_PROPERTY, CSS_KHAKI_VALUE, CSS_LARGE_VALUE, CSS_LARGER_VALUE, CSS_LAVENDER_VALUE, CSS_LAVENDERBLUSH_VALUE, CSS_LAWNGREEN_VALUE, CSS_LEMONCHIFFON_VALUE, CSS_LETTER_SPACING_PROPERTY, CSS_LIGHTBLUE_VALUE, CSS_LIGHTCORAL_VALUE, CSS_LIGHTCYAN_VALUE, CSS_LIGHTER_VALUE, CSS_LIGHTGOLDENRODYELLOW_VALUE, CSS_LIGHTGRAY_VALUE, CSS_LIGHTGREEN_VALUE, CSS_LIGHTGREY_VALUE, CSS_LIGHTING_COLOR_PROPERTY, CSS_LIGHTPINK_VALUE, CSS_LIGHTSALMON_VALUE, CSS_LIGHTSEAGREEN_VALUE, CSS_LIGHTSKYBLUE_VALUE, CSS_LIGHTSLATEGRAY_VALUE, CSS_LIGHTSLATEGREY_VALUE, CSS_LIGHTSTEELBLUE_VALUE, CSS_LIGHTYELLOW_VALUE, CSS_LIME_VALUE, CSS_LIMEGREEN_VALUE, CSS_LINE_HEIGHT_PROPERTY, CSS_LINE_THROUGH_VALUE, CSS_LINEARRGB_VALUE, CSS_LINEN_VALUE, CSS_LIST_ITEM_VALUE, CSS_LOWER_VALUE, CSS_LR_TB_VALUE, CSS_LR_VALUE, CSS_LTR_VALUE, CSS_MAGENTA_VALUE, CSS_MARKER_END_PROPERTY, CSS_MARKER_MID_PROPERTY, CSS_MARKER_PROPERTY, CSS_MARKER_START_PROPERTY, CSS_MARKER_VALUE, CSS_MAROON_VALUE, CSS_MASK_PROPERTY, CSS_MATHEMATICAL_VALUE, CSS_MEDIUM_VALUE, CSS_MEDIUMAQUAMARINE_VALUE, CSS_MEDIUMBLUE_VALUE, CSS_MEDIUMORCHID_VALUE, CSS_MEDIUMPURPLE_VALUE, CSS_MEDIUMSEAGREEN_VALUE, CSS_MEDIUMSLATEBLUE_VALUE, CSS_MEDIUMSPRINGGREEN_VALUE, CSS_MEDIUMTURQUOISE_VALUE, CSS_MEDIUMVIOLETRED_VALUE, CSS_MENU_VALUE, CSS_MENUTEXT_VALUE, CSS_MIDDLE_VALUE, CSS_MIDNIGHTBLUE_VALUE, CSS_MIME_TYPE, CSS_MINTCREAM_VALUE, CSS_MISTYROSE_VALUE, CSS_MITER_VALUE, CSS_MOCCASIN_VALUE, CSS_MONOSPACE_VALUE, CSS_MOVE_VALUE, CSS_N_RESIZE_VALUE, CSS_NARROWER_VALUE, CSS_NAVAJOWHITE_VALUE, CSS_NAVY_VALUE, CSS_NE_RESIZE_VALUE, CSS_NEW_VALUE, CSS_NO_CHANGE_VALUE, CSS_NONE_VALUE, CSS_NONZERO_VALUE, CSS_NORMAL_VALUE, CSS_NW_RESIZE_VALUE, CSS_OBLIQUE_VALUE, CSS_OLDLACE_VALUE, CSS_OLIVE_VALUE, CSS_OLIVEDRAB_VALUE, CSS_OPACITY_PROPERTY, CSS_OPTIMIZELEGIBILITY_VALUE, CSS_OPTIMIZEQUALITY_VALUE, CSS_OPTIMIZESPEED_VALUE, CSS_ORANGE_VALUE, CSS_ORANGERED_VALUE, CSS_ORCHID_VALUE, CSS_OVERFLOW_PROPERTY, CSS_OVERLINE_VALUE, CSS_PAINTED_VALUE, CSS_PALEGOLDENROD_VALUE, CSS_PALEGREEN_VALUE, CSS_PALETURQUOISE_VALUE, CSS_PALEVIOLETRED_VALUE, CSS_PAPAYAWHIP_VALUE, CSS_PEACHPUFF_VALUE, CSS_PERU_VALUE, CSS_PINK_VALUE, CSS_PLUM_VALUE, CSS_POINTER_EVENTS_PROPERTY, CSS_POINTER_VALUE, CSS_POWDERBLUE_VALUE, CSS_PURPLE_VALUE, CSS_RED_VALUE, CSS_RESET_SIZE_VALUE, CSS_RESET_VALUE, CSS_RL_TB_VALUE, CSS_RL_VALUE, CSS_ROSYBROWN_VALUE, CSS_ROUND_VALUE, CSS_ROYALBLUE_VALUE, CSS_RTL_VALUE, CSS_RUN_IN_VALUE, CSS_S_RESIZE_VALUE, CSS_SADDLEBROWN_VALUE, CSS_SALMON_VALUE, CSS_SANDYBROWN_VALUE, CSS_SANS_SERIF_VALUE, CSS_SCROLL_VALUE, CSS_SCROLLBAR_VALUE, CSS_SE_RESIZE_VALUE, CSS_SEAGREEN_VALUE, CSS_SEASHELL_VALUE, CSS_SEMI_CONDENSED_VALUE, CSS_SEMI_EXPANDED_VALUE, CSS_SERIF_VALUE, CSS_SHAPE_RENDERING_PROPERTY, CSS_SIENNA_VALUE, CSS_SILVER_VALUE, CSS_SKYBLUE_VALUE, CSS_SLATEBLUE_VALUE, CSS_SLATEGRAY_VALUE, CSS_SLATEGREY_VALUE, CSS_SMALL_CAPS_VALUE, CSS_SMALL_VALUE, CSS_SMALLER_VALUE, CSS_SNOW_VALUE, CSS_SPRINGGREEN_VALUE, CSS_SQUARE_VALUE, CSS_SRC_PROPERTY, CSS_SRGB_VALUE, CSS_START_VALUE, CSS_STEELBLUE_VALUE, CSS_STOP_COLOR_PROPERTY, CSS_STOP_OPACITY_PROPERTY, CSS_STROKE_DASHARRAY_PROPERTY, CSS_STROKE_DASHOFFSET_PROPERTY, CSS_STROKE_LINECAP_PROPERTY, CSS_STROKE_LINEJOIN_PROPERTY, CSS_STROKE_MITERLIMIT_PROPERTY, CSS_STROKE_OPACITY_PROPERTY, CSS_STROKE_PROPERTY, CSS_STROKE_VALUE, CSS_STROKE_WIDTH_PROPERTY, CSS_SUB_VALUE, CSS_SUPER_VALUE, CSS_SW_RESIZE_VALUE, CSS_TABLE_CAPTION_VALUE, CSS_TABLE_CELL_VALUE, CSS_TABLE_COLUMN_GROUP_VALUE, CSS_TABLE_COLUMN_VALUE, CSS_TABLE_FOOTER_GROUP_VALUE, CSS_TABLE_HEADER_GROUP_VALUE, CSS_TABLE_ROW_GROUP_VALUE, CSS_TABLE_ROW_VALUE, CSS_TABLE_VALUE, CSS_TAN_VALUE, CSS_TB_RL_VALUE, CSS_TB_VALUE, CSS_TEAL_VALUE, CSS_TEXT_AFTER_EDGE_VALUE, CSS_TEXT_ANCHOR_PROPERTY, CSS_TEXT_BEFORE_EDGE_VALUE, CSS_TEXT_BOTTOM_VALUE, CSS_TEXT_DECORATION_PROPERTY, CSS_TEXT_RENDERING_PROPERTY, CSS_TEXT_TOP_VALUE, CSS_TEXT_VALUE, CSS_THISTLE_VALUE, CSS_THREEDDARKSHADOW_VALUE, CSS_THREEDFACE_VALUE, CSS_THREEDHIGHLIGHT_VALUE, CSS_THREEDLIGHTSHADOW_VALUE, CSS_THREEDSHADOW_VALUE, CSS_TOMATO_VALUE, CSS_TOP_VALUE, CSS_TURQUOISE_VALUE, CSS_ULTRA_CONDENSED_VALUE, CSS_ULTRA_EXPANDED_VALUE, CSS_UNDERLINE_VALUE, CSS_UNICODE_BIDI_PROPERTY, CSS_USE_SCRIPT_VALUE, CSS_VIOLET_VALUE, CSS_VISIBILITY_PROPERTY, CSS_VISIBLE_VALUE, CSS_VISIBLEFILL_VALUE, CSS_VISIBLEFILLSTROKE_VALUE, CSS_VISIBLEPAINTED_VALUE, CSS_VISIBLESTROKE_VALUE, CSS_W_RESIZE_VALUE, CSS_WAIT_VALUE, CSS_WHEAT_VALUE, CSS_WHITE_VALUE, CSS_WHITESMOKE_VALUE, CSS_WIDER_VALUE, CSS_WINDOW_VALUE, CSS_WINDOWFRAME_VALUE, CSS_WINDOWTEXT_VALUE, CSS_WORD_SPACING_PROPERTY, CSS_WRITING_MODE_PROPERTY, CSS_X_LARGE_VALUE, CSS_X_SMALL_VALUE, CSS_XX_LARGE_VALUE, CSS_XX_SMALL_VALUE, CSS_YELLOW_VALUE, CSS_YELLOWGREEN_VALUE`

Fields inherited from interface org.apache.batik.bridge.ErrorConstants
`ERR_ATTRIBUTE_MISSING, ERR_ATTRIBUTE_VALUE_MALFORMED, ERR_CSS_LENGTH_NEGATIVE, ERR_CSS_URI_BAD_TARGET, ERR_LENGTH_NEGATIVE, ERR_URI_BAD_TARGET, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, MSG_BROKEN_LINK_TITLE`

Constructor Summary
`TextUtilities()`

Method Summary
`static java.lang.Object` `convertBaselineShift(org.w3c.dom.Element e)` Converts a baseline-shift CSS value to a value usable as a text attribute, or null.
`static java.lang.Float` `convertFontSize(org.w3c.dom.Element e)` Converts the font-size CSS value to a float value.
`static java.lang.Float` `convertFontStretch(org.w3c.dom.Element e)` Converts the font-stretch CSS value to a float value.
`static java.lang.Float` `convertFontStyle(org.w3c.dom.Element e)` Converts the font-style CSS value to a float value.
`static java.lang.Float` `convertFontWeight(org.w3c.dom.Element e)` Converts the font-weight CSS value to a float value.
`static java.lang.Float` `convertKerning(org.w3c.dom.Element e)` Converts a kerning CSS value to a value usable as a text attribute, or null.
`static java.lang.Float` `convertLetterSpacing(org.w3c.dom.Element e)` Converts a letter-spacing CSS value to a value usable as a text attribute, or null.
`static TextNode.Anchor` `convertTextAnchor(org.w3c.dom.Element e)` Converts the text-anchor CSS value to a TextNode.Anchor.
`static java.lang.Float` `convertWordSpacing(org.w3c.dom.Element e)` Converts a word-spacing CSS value to a value usable as a text attribute, or null.
`static java.lang.String` `getElementContent(org.w3c.dom.Element e)` Returns the content of the given element.
`static java.util.ArrayList` `svgHorizontalCoordinateArrayToUserSpace(org.w3c.dom.Element element, java.lang.String attrName, java.lang.String valueStr, BridgeContext ctx)` Returns the float list that represents a set of horizontal values or percentage.
`static java.util.ArrayList` `svgRotateArrayToFloats(org.w3c.dom.Element element, java.lang.String attrName, java.lang.String valueStr, BridgeContext ctx)`
`static java.util.ArrayList` `svgVerticalCoordinateArrayToUserSpace(org.w3c.dom.Element element, java.lang.String attrName, java.lang.String valueStr, BridgeContext ctx)` Returns the float list that represents a set of values or percentage.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextUtilities

    public TextUtilities()

Method Detail

### getElementContent

    public static java.lang.String getElementContent(org.w3c.dom.Element e)

  Returns the content of the given element.

### svgHorizontalCoordinateArrayToUserSpace

    public static java.util.ArrayList svgHorizontalCoordinateArrayToUserSpace(org.w3c.dom.Element element,
                                                                              java.lang.String attrName,
                                                                              java.lang.String valueStr,
                                                                              BridgeContext ctx)

  Returns the float list that represents a set of horizontal values or percentage.

  Parameters:
    `element` - the element that defines the specified coordinates
    `attrName` - the name of the attribute (used by error handling)
    `valueStr` - the delimited string containing values of the coordinate
    `ctx` - the bridge context

### svgVerticalCoordinateArrayToUserSpace

    public static java.util.ArrayList svgVerticalCoordinateArrayToUserSpace(org.w3c.dom.Element element,
                                                                            java.lang.String attrName,
                                                                            java.lang.String valueStr,
                                                                            BridgeContext ctx)

  Returns the float list that represents a set of values or percentage.

  Parameters:
    `element` - the element that defines the specified coordinates
    `attrName` - the name of the attribute (used by error handling)
    `valueStr` - the delimited string containing values of the coordinate
    `ctx` - the bridge context

### svgRotateArrayToFloats

    public static java.util.ArrayList svgRotateArrayToFloats(org.w3c.dom.Element element,
                                                             java.lang.String attrName,
                                                             java.lang.String valueStr,
                                                             BridgeContext ctx)

### convertFontSize

    public static java.lang.Float convertFontSize(org.w3c.dom.Element e)

  Converts the font-size CSS value to a float value.

  Parameters:
    `e` - the element

### convertFontStyle

    public static java.lang.Float convertFontStyle(org.w3c.dom.Element e)

  Converts the font-style CSS value to a float value.

  Parameters:
    `e` - the element

### convertFontStretch

    public static java.lang.Float convertFontStretch(org.w3c.dom.Element e)

  Converts the font-stretch CSS value to a float value.

  Parameters:
    `e` - the element

### convertFontWeight

    public static java.lang.Float convertFontWeight(org.w3c.dom.Element e)

  Converts the font-weight CSS value to a float value.

  Parameters:
    `e` - the element

### convertTextAnchor

    public static TextNode.Anchor convertTextAnchor(org.w3c.dom.Element e)

  Converts the text-anchor CSS value to a TextNode.Anchor.

  Parameters:
    `e` - the element

### convertBaselineShift

    public static java.lang.Object convertBaselineShift(org.w3c.dom.Element e)

  Converts a baseline-shift CSS value to a value usable as a text attribute, or null.

  Parameters:
    `e` - the element

### convertKerning

    public static java.lang.Float convertKerning(org.w3c.dom.Element e)

  Converts a kerning CSS value to a value usable as a text attribute, or null.

  Parameters:
    `e` - the element

### convertLetterSpacing

    public static java.lang.Float convertLetterSpacing(org.w3c.dom.Element e)

  Converts a letter-spacing CSS value to a value usable as a text attribute, or null.

  Parameters:
    `e` - the element

### convertWordSpacing

    public static java.lang.Float convertWordSpacing(org.w3c.dom.Element e)

  Converts a word-spacing CSS value to a value usable as a text attribute, or null.

  Parameters:
    `e` - the element

Copyright © 2004 Apache Software Foundation. All Rights Reserved.