org.writersforge.catalan.layout
Class Markup

java.lang.Object
  extended byorg.writersforge.catalan.layout.Markup

public class Markup
extends java.lang.Object

Helper class to manage markup spans. The start and end indices determine exactly which text characters in a longer string the style applies to.

Author:
jsheets

Constructor Summary
Markup()
          Creates a new instance of Markup
Markup(FontStyle style, int start, int end)
          Creates a new instance of Markup with set values.
 
Method Summary
 int getEnd()
          Getter for property end, the index of the last text character in the style span.
 int getStart()
          Getter for property start, the index of the first text character in the style span.
 FontStyle getStyle()
          Getter for property style, the font for this markup section.
 void setEnd(int end)
          Setter for property end, the index of the last text character in the style span.
 void setStart(int start)
          Setter for property start, the index of the first text character in the style span.
 void setStyle(FontStyle style)
          Setter for property style, the font for this markup section.
 java.lang.String toString()
          Creates a String version of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Markup

public Markup()
Creates a new instance of Markup


Markup

public Markup(FontStyle style,
              int start,
              int end)
Creates a new instance of Markup with set values.

Parameters:
style - markup style
start - starting index of markup along the text
end - ending index of markup along the text
Method Detail

getStyle

public FontStyle getStyle()
Getter for property style, the font for this markup section.

Returns:
Value of property style.

setStyle

public void setStyle(FontStyle style)
Setter for property style, the font for this markup section.

Parameters:
style - New value of property style.

getStart

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

Returns:
Value of property start.

setStart

public void setStart(int start)
Setter for property start, the index of the first text character in the style span.

Parameters:
start - New 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.

setEnd

public void setEnd(int end)
Setter for property end, the index of the last text character in the style span.

Parameters:
end - New value of property end.

toString

public java.lang.String toString()
Creates a String version of this object

Returns:
a String representation of this object
See Also:
Object.toString()