### org.jfree.layouting.renderer.model

# Class RenderableText

- `java.lang.Object`
- - `org.jfree.layouting.renderer.model.RenderNode`
  - - `org.jfree.layouting.renderer.model.RenderableText`

Implemented Interfaces:
  Cloneable

`public class RenderableText`
`extends RenderNode`

The renderable text is a text chunk, enriched with layouting information, such as break opportunities, character sizes, kerning information and spacing information.

Text is given as codepoints. Break opportunities are given as integer values, where zero forbids breaking, and higher values denote better breaks. Spacing and glyph sizes and kerning is given in micro-points; Spacing is the 'added' space between codepoints if text-justification is enabled.

The text is computed as grapheme clusters; this means that several unicode codepoints may result in a single /virtual/ glyph/codepoint/character. (Example: 'A' + accent symbols). If the font supports Lithurges, these lithurges may also be represented as a single grapheme cluster (and thus behave unbreakable).

Grapheme clusters with more than one unicode char have the size of that char added to the first codepoint, all subsequence codepoints of the same cluster have a size/kerning/etc of zero and are unbreakable.

This text chunk is perfectly suitable for horizontal text, going either from left-to-right or right-to-left. (Breaking mixed text is up to the textfactory).

Author:
  Thomas Morgner

  ## Field Summary

  ### Fields inherited from class org.jfree.layouting.renderer.model.RenderNode

  `HORIZONTAL_AXIS`, `VERTICAL_AXIS`

  ## Constructor Summary

  `RenderableText()`

  `RenderableText(ExtendedBaselineInfo baselineInfo, Glyph[] glyphs, int offset, int length, int script, boolean forceLinebreak)`

  ## Method Summary

  `ExtendedBaselineInfo`

  `getBaselineInfo()`
    Returns the baseline info for the given node.

  `Glyph[]`

  `getGlyphs()`

  `int`

  `getLength()`

  `long`

  `getMinimumWidth()`

  `int`

  `getOffset()`

  `long`

  `getPreferredWidth()`

  `String`

  `getRawText()`

  `int`

  `getScript()`

  `protected void`

  `initialize(Glyph[] glyphs, int offset, int length, ExtendedBaselineInfo baselineInfo, int script, boolean forceLinebreak)`

  `boolean`

  `isDiscardable()`

  `boolean`

  `isEmpty()`

  `boolean`

  `isForceLinebreak()`

  `boolean`

  `isLtr()`

  ### Methods inherited from class org.jfree.layouting.renderer.model.RenderNode

  `appyStyle`, `clone`, `derive`, `deriveFrozen`, `findNodeById`, `freeze`, `getAlignmentAdjust`, `getAlignmentAdjustResolved`, `getAlignmentBaseline`, `getBaselineShift`, `getBaselineShiftResolved`, `getChangeTracker`, `getComputedLayoutProperties`, `getDimension`, `getEffectiveMarginBottom`, `getEffectiveMarginTop`, `getHeight`, `getInstanceId`, `getLayoutContext`, `getLogicalPage`, `getMajorAxis`, `getMaximumBoxWidth`, `getMinimumChunkWidth`, `getMinorAxis`, `getNamespace`, `getNext`, `getNodeLayoutProperties`, `getNormalFlow`, `getPageContext`, `getParent`, `getParentBlockContext`, `getPosition`, `getPrev`, `getStickyMarker`, `getTagName`, `getVerticalAlignment`, `getVisibleNext`, `getVisiblePrev`, `getWidth`, `getX`, `getY`, `hibernate`, `isDirectionLTR`, `isDirty`, `isDiscardable`, `isEmpty`, `isFrozen`, `isHibernated`, `isIcmMetricsFinished`, `isIgnorableForRendering`, `isOpen`, `normalizeAlignment`, `setComputedLayoutProperties`, `setDimension`, `setDirty`, `setHeight`, `setHibernated`, `setIcmMetricsFinished`, `setMajorAxis`, `setMaximumBoxWidth`, `setMinimumChunkWidth`, `setMinorAxis`, `setNext`, `setParent`, `setPosition`, `setPrev`, `setStickyMarker`, `setWidth`, `setX`, `setY`, `updateChangeTracker`

## Constructor Details

### RenderableText

    protected RenderableText()

### RenderableText

    public RenderableText(ExtendedBaselineInfo baselineInfo,
                          Glyph[] glyphs,
                          int offset,
                          int length,
                          int script,
                          boolean forceLinebreak)

## Method Details

### getBaselineInfo

    public ExtendedBaselineInfo getBaselineInfo()

> Returns the baseline info for the given node. This can be null, if the node does not have any baseline info.
> Returns:

### getGlyphs

    public Glyph[] getGlyphs()

### getLength

    public int getLength()

### getMinimumWidth

    public long getMinimumWidth()

### getOffset

    public int getOffset()

### getPreferredWidth

    public long getPreferredWidth()

### getRawText

    public String getRawText()

### getScript

    public int getScript()

### initialize

    protected void initialize(Glyph[] glyphs,
                              int offset,
                              int length,
                              ExtendedBaselineInfo baselineInfo,
                              int script,
                              boolean forceLinebreak)

### isDiscardable

    public boolean isDiscardable()

> Overrides:
>   isDiscardable in interface RenderNode

### isEmpty

    public boolean isEmpty()

> Overrides:
>   isEmpty in interface RenderNode

### isForceLinebreak

    public boolean isForceLinebreak()

### isLtr

    public boolean isLtr()