Package com.reportmill.text
Class RMXStringRun
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.text.RMXStringRun
- All Implemented Interfaces:
RMArchiver.Archiving
,Cloneable
The Run 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
ConstructorsConstructorDescriptionCreates a new run.RMXStringRun
(Map attrs, int start, int length) Creates a new run for the given attributes map and character start index and character length. -
Method Summary
Modifier and TypeMethodDescriptionint
end()
Returns the end character index for this run.boolean
Returns whether this run is equal to the given object.Returns a specific attribute for the given key.Returns the attributes map.getColor()
Returns the color for this run.getFont()
Returns the font for this run.Returns the format for this run.Returns the outline info for this run (null for none).Returns the paragraph for this run.int
Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).boolean
Returns whether this run is underlined.int
length()
Returns the length in characters for this run.void
Adds a specific attribute for the given key (will remove if attribute is null).void
Adds a map of attributes to this run's attributes.void
Removes a specific attribute for the given key.int
start()
Returns the start character index for this run.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
-
Constructor Details
-
RMXStringRun
public RMXStringRun()Creates a new run. -
RMXStringRun
Creates a new run for the given attributes map and character start index and character length.
-
-
Method Details
-
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
Returns the attributes map. -
get
Returns a specific attribute for the given key. -
remove
Removes a specific attribute for the given key. -
put
Adds a specific attribute for the given key (will remove if attribute is null). -
putAll
Adds a map of attributes to this run's attributes. -
getFont
Returns the font for this run. -
getColor
Returns the color for this run. -
getParagraph
Returns the paragraph for this run. -
isUnderlined
public boolean isUnderlined()Returns whether this run is underlined. -
getOutline
Returns the outline info for this run (null for none). -
getFormat
Returns the format for this run. -
getScripting
public int getScripting()Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none). -
equals
Returns whether this run is equal to the given object. -
toString
Returns a string representation of this run.
-