Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.util
Class JRStyledText

    java.lang.Object
      net.sf.jasperreports.engine.util.JRStyledText

All Implemented Interfaces:
  java.lang.Cloneable

    public class JRStyledText

extends java.lang.Object
implements java.lang.Cloneable

Version:
  $Id: JRStyledText.java 3939 2010-08-20 09:52:00Z teodord $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)

Nested Class Summary
`static class` | `JRStyledText.Run`

Field Summary
`static java.lang.String` | `PROPERTY_AWT_IGNORE_MISSING_FONT`

Constructor Summary
`JRStyledText()`
`JRStyledText(java.util.Locale locale)`

Method Summary
`void` | `addRun(JRStyledText.Run run)`
`void` | `append(java.lang.String text)`
`protected java.lang.Object` | `clone()`
`protected static java.util.Map` | `cloneAttributesMap(java.util.Map attributes)`
`JRStyledText` | `cloneText()` Clones this object.
`java.text.AttributedString` | `getAttributedString()`
`java.text.AttributedString` | `getAwtAttributedString(boolean ignoreMissingFont)` Returns an attributed string that only contains standard Java text attributes; JasperReports specific text attributes of the styled text are ignored.
`java.util.Map` | `getGlobalAttributes()`
`java.util.Locale` | `getLocale()`
`java.util.List` | `getRuns()`
`java.lang.String` | `getText()`
`void` | `insert(java.lang.String str, short[] offsets)` Inserts a string at specified positions in the styled text.
`int` | `length()`
`void` | `setGlobalAttributes(java.util.Map attributes)`

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

Field Detail

### PROPERTY_AWT_IGNORE_MISSING_FONT

    public static final java.lang.String PROPERTY_AWT_IGNORE_MISSING_FONT

See Also:
  Constant Field Values

Constructor Detail

### JRStyledText

    public JRStyledText()

### JRStyledText

    public JRStyledText(java.util.Locale locale)

Method Detail

### append

    public void append(java.lang.String text)

### addRun

    public void addRun(JRStyledText.Run run)

### length

    public int length()

### getText

    public java.lang.String getText()

### getLocale

    public java.util.Locale getLocale()

### getAttributedString

    public java.text.AttributedString getAttributedString()

### getAwtAttributedString

    public java.text.AttributedString getAwtAttributedString(boolean ignoreMissingFont)

  Returns an attributed string that only contains standard Java text attributes; JasperReports specific text attributes of the styled text are ignored.

  Returns:
    an attributed string that only contains standard Java text attributes

### getRuns

    public java.util.List getRuns()

### setGlobalAttributes

    public void setGlobalAttributes(java.util.Map attributes)

### getGlobalAttributes

    public java.util.Map getGlobalAttributes()

### clone

    protected java.lang.Object clone()
                              throws java.lang.CloneNotSupportedException

  Overrides:
    `clone` in class `java.lang.Object`
  Throws:
    `java.lang.CloneNotSupportedException`

### cloneAttributesMap

    protected static java.util.Map cloneAttributesMap(java.util.Map attributes)

### cloneText

    public JRStyledText cloneText()

  Clones this object.

  Returns:
    a clone of this object

### insert

    public void insert(java.lang.String str,
                       short[] offsets)

  Inserts a string at specified positions in the styled text.

  The string is inserted in the style runs located at the insertion positions. If a style run finished right before the insertion position, the string will be part of this run (but not of the runs that start right after the insertion position).

  Parameters:
    `str` - the string to insert
    `offsets` - the incremental offsets of the positions at which to insert the string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com