|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.editor.LineMark
A LineMark is an object that represents a line position within a document. LineMarks are tracked by the document, and moved around as changes to the document occur. Someone interested in a LineMark can ask the mark for its markLine, which will return the line that it is on.
A LineMark can be constructed as a lightweight mark, in which case it does not store a reference to the document in which it exists, thus it cannot be asked what line it exists on. The purpose of a lightweight mark is to enable the same mark to exist in multiple places in the document (i.e. you can add a lightweight LineMark to the same document over and over again). The lightweight capability was originally created to display executable lines when running the debugger, but it can be used for other types of display-only markup as well.
EditorDocument
Constructor Summary | |
LineMark()
Create a new "heavyweight" LineMark. |
|
LineMark(boolean lightweight)
Create a new LineMark. |
|
LineMark(boolean lightweight,
javax.swing.text.Style style)
Create a new LineMark that paints using the specified style. |
|
LineMark(javax.swing.text.Style style)
Create a new "heavyweight" LineMark that paints using the specified style. |
Method Summary | |
int |
getDisplayPriority()
Describes the logical priority this mark belongs to for ordering purposes. |
protected EditorDocument |
getDocument()
Get the document that this mark is associated with. |
int |
getMarkLine()
Get the current location of this mark. |
javax.swing.text.Style |
getStyle()
Get the style to use when painting a line with this mark. |
boolean |
isLightweight()
Check to see if this is a lightweight mark or not. |
protected void |
setDisplayPriority(int priority)
Set the logical priority this mark belongs to for ordering purposes. |
void |
setDocument(EditorDocument doc)
This is called by the document when a mark is inserted. |
protected void |
setStyle(javax.swing.text.Style style)
Set the style to use when painting a line with this mark. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public LineMark()
public LineMark(boolean lightweight)
lightweight
- True if this is to be a lightweight mark.public LineMark(javax.swing.text.Style style)
style
- The style to use when painting a line with this mark.public LineMark(boolean lightweight, javax.swing.text.Style style)
style
- The style to use when painting a line with this mark.Method Detail |
public boolean isLightweight()
public javax.swing.text.Style getStyle()
protected void setStyle(javax.swing.text.Style style)
style
- The style.public int getDisplayPriority()
For reference, here are some of the defined priority values:
protected void setDisplayPriority(int priority)
priority
- An int value specifying the display priority of this mark.getDisplayPriority()
public void setDocument(EditorDocument doc)
protected EditorDocument getDocument()
This is provided so that subclasses can manage themselves, if desired. A subclasses can get access to the document it are associated with so that it can remove itself from that document before placing itself somewhere else.
public int getMarkLine()
-1
is
returned if this mark does not exist in a document, or if this
mark is lightweight.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |