public class

StaticTextDocument

extends AbstractTextDocument
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.events.EventSource
     ↳ com.pnfsoftware.jeb.core.output.text.impl.AbstractTextDocument
       ↳ com.pnfsoftware.jeb.core.output.text.impl.StaticTextDocument

Class Overview

A simple text document. Such text document objects do not listen to unit changes events; in fact, they are unaware of the IUnit family of classes. They are ideal to distribute static, immutable contents. More complex text documents should implement ITextDocument and/or extend AbstractTextDocument.

In this simple implementation, a line maps to one anchor. Therefore, the "line" part of a coordinates becomes redundant within the default addressing scheme provided by AbstractTextDocument. The addressing scheme has been simplified to "anchorId,columnOffset".

Summary

[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.util.events.EventSource
Public Constructors
StaticTextDocument(List<ILine> lines)
StaticTextDocument(String text)
Public Methods
long getAnchorCount()
ITextDocumentPart getDocumentPart(long anchorId, int linesAfter, int linesBefore)
String toString()
Protected Methods
boolean useDisplayLineNumber()
Specify if coordinatesToAddress(ICoordinates, AddressConversionPrecision) and addressToCoordinates(String, CoordinatesConversionPrecision) will use the anchor inner value or should display as a text editor (where first line is line 1).
boolean useLineDelta()
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.output.text.impl.AbstractTextDocument
From class com.pnfsoftware.jeb.util.events.EventSource
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.output.IGenericDocument
From interface com.pnfsoftware.jeb.core.output.text.ITextDocument
From interface com.pnfsoftware.jeb.util.events.IEventSource

Public Constructors

public StaticTextDocument (List<ILine> lines)

public StaticTextDocument (String text)

Public Methods

public long getAnchorCount ()

public ITextDocumentPart getDocumentPart (long anchorId, int linesAfter, int linesBefore)

public String toString ()

Protected Methods

protected boolean useDisplayLineNumber ()

Specify if coordinatesToAddress(ICoordinates, AddressConversionPrecision) and addressToCoordinates(String, CoordinatesConversionPrecision) will use the anchor inner value or should display as a text editor (where first line is line 1). Line Delta and column offset are not modified.

protected boolean useLineDelta ()

Specify if coordinatesToAddress(ICoordinates, AddressConversionPrecision) and addressToCoordinates(String, CoordinatesConversionPrecision) will use the line Delta. Default is true, but implementations can decide to use only one line for an anchor.