ReportMill 8.0 API

com.reportmill.text
Class RMXString.Run

java.lang.Object
  extended bycom.reportmill.base.RMObject
      extended bycom.reportmill.text.RMXString.Run
All Implemented Interfaces:
java.lang.Cloneable, com.reportmill.base.RMArchiver.Archiving
Enclosing class:
RMXString

public static class RMXString.Run
extends com.reportmill.base.RMObject

The Run inner class represents a range of characters in an xstring that share common attributes. This class makes a point to treat its attributes map as read-only so they can be shared among multiple runs.


Constructor Summary
RMXString.Run()
          Creates a new run.
RMXString.Run(java.util.Map attrs, int start, int length)
          Creates a new run for the given attributes map and character start index and character length.
 
Method Summary
 int end()
          Returns the end character index for this run.
 boolean equals(java.lang.Object anObj)
          Returns whether this run is equal to the given object.
 java.lang.Object get(java.lang.String aKey)
          Returns a specific attribute for the given key.
 java.util.Map getAttributes()
          Returns the attributes map.
 RMColor getColor()
          Returns the color for this run.
 RMFont getFont()
          Returns the font for this run.
 RMFormat getFormat()
          Returns the format for this run.
 RMXString.Outline getOutline()
          Returns the outline info for this run (null for none).
 RMParagraph getParagraph()
          Returns the paragraph for this run.
 int getScripting()
          Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).
 boolean isUnderlined()
          Returns whether this run is underlined.
 int length()
          Returns the length in characters for this run.
 void put(java.lang.String aKey, java.lang.Object aVal)
          Adds a specific attribute for the given key (will remove if attribute is null).
 void putAll(java.util.Map aMap)
          Adds a map of attributes to this run's attributes.
 void remove(java.lang.String aKey)
          Removes a specific attribute for the given key.
 int start()
          Returns the start character index for this run.
 java.lang.String toString(RMXString as)
          Returns a string representation of this run.
 
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMXString.Run

public RMXString.Run()
Creates a new run.


RMXString.Run

public RMXString.Run(java.util.Map attrs,
                     int start,
                     int length)
Creates a new run for the given attributes map and character start index and character length.

Method Detail

start

public int start()
Returns the start character index for this run.


end

public int end()
Returns the end character index for this run.


length

public int length()
Returns the length in characters for this run.


getAttributes

public java.util.Map getAttributes()
Returns the attributes map.


get

public java.lang.Object get(java.lang.String aKey)
Returns a specific attribute for the given key.


remove

public void remove(java.lang.String aKey)
Removes a specific attribute for the given key.


put

public void put(java.lang.String aKey,
                java.lang.Object aVal)
Adds a specific attribute for the given key (will remove if attribute is null).


putAll

public void putAll(java.util.Map aMap)
Adds a map of attributes to this run's attributes.


getFont

public RMFont getFont()
Returns the font for this run.


getColor

public RMColor getColor()
Returns the color for this run.


getParagraph

public RMParagraph getParagraph()
Returns the paragraph for this run.


isUnderlined

public boolean isUnderlined()
Returns whether this run is underlined.


getOutline

public RMXString.Outline getOutline()
Returns the outline info for this run (null for none).


getFormat

public RMFormat getFormat()
Returns the format for this run.


getScripting

public int getScripting()
Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).


equals

public boolean equals(java.lang.Object anObj)
Returns whether this run is equal to the given object.


toString

public java.lang.String toString(RMXString as)
Returns a string representation of this run.


ReportMill 8.0 API