org.writersforge.catalan.layout
Class StyledText.Span

java.lang.Object
  |
  +--org.writersforge.catalan.layout.StyledText.Span
Enclosing class:
StyledText

public static class StyledText.Span
extends java.lang.Object

A single homogeneous span of markup style. Encapsulates the starting and ending indices of markup within a larger String.

Author:
jsheets

Constructor Summary
StyledText.Span(int start, int end, Markup[] intersects)
          Creates a new instance of Span.
 
Method Summary
 int getEnd()
          Getter for property end, the index of the last text character in the style span.
 Markup[] getIntersects()
          Getter for property intersects, all Markup objects that overlap this Span.
 int getStart()
          Getter for property start, the index of the first text character in the style span.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyledText.Span

public StyledText.Span(int start,
                       int end,
                       Markup[] intersects)
Creates a new instance of Span.

Parameters:
start - the start String index
end - the end String index
intersects - an array of any Markup objects that lie within this span of text
Method Detail

getStart

public int getStart()
Getter for property start, the index of the first text character in the style span.

Returns:
Value of property start.

getEnd

public int getEnd()
Getter for property end, the index of the last text character in the style span.

Returns:
Value of property end.

getIntersects

public Markup[] getIntersects()
Getter for property intersects, all Markup objects that overlap this Span.

Returns:
all intersecting Markup objects