public abstract class Line extends Annotatable implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Line.Part
Representation of the part of the Line's text.
|
static class |
Line.Set
Object that represents a snapshot of lines at the time it was created.
|
static class |
Line.ShowOpenType
ShowOpenType and ShowVisibilityType is replacement for constants SHOW_TRY_SHOW, SHOW_SHOW,
SHOW_GOTO, SHOW_TOFRONT, SHOW_REUSE, SHOW_REUSE_NEW.
|
static class |
Line.ShowVisibilityType
ShowOpenType and ShowVisibilityType is replacement for constants SHOW_TRY_SHOW, SHOW_SHOW,
SHOW_GOTO, SHOW_TOFRONT, SHOW_REUSE, SHOW_REUSE_NEW.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_LINE_NUMBER
Property name of the line number
|
static int |
SHOW_GOTO
Deprecated.
Deprecated since 6.21. Use
Line.ShowOpenType.OPEN
and Line.ShowVisibilityType.FOCUS instead. |
static int |
SHOW_REUSE
Deprecated.
Deprecated since 6.21. Use
Line.ShowOpenType.REUSE
and Line.ShowVisibilityType.FOCUS instead. |
static int |
SHOW_REUSE_NEW
Deprecated.
Deprecated since 6.21. Use
Line.ShowOpenType.REUSE_NEW
and Line.ShowVisibilityType.FOCUS instead. |
static int |
SHOW_SHOW
Deprecated.
Deprecated since 6.21. Use
Line.ShowOpenType.OPEN
and Line.ShowVisibilityType.NONE instead. |
static int |
SHOW_TOFRONT
Deprecated.
Deprecated since 6.21. Use
Line.ShowOpenType.OPEN
and Line.ShowVisibilityType.FRONT instead. |
static int |
SHOW_TRY_SHOW
Deprecated.
Deprecated since 6.21. Use
Line.ShowOpenType.NONE
and Line.ShowVisibilityType.NONE instead. |
PROP_ANNOTATION_COUNT, PROP_DELETED, PROP_TEXT| Constructor and Description |
|---|
Line(Lookup context)
Create a new line object based on a given data object.
|
Line(Object source)
Create a new line object based on a given data object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeMarkedCurrent(int action,
Line previousLine)
Deprecated.
Deprecated since 1.20, as
markCurrentLine() is deprecated by Annotation.attach(org.openide.text.Annotatable). |
Line.Part |
createPart(int column,
int length)
Create object which represent part of the text on the line.
|
String |
getDisplayName()
Composes a human presentable name for the line.
|
abstract int |
getLineNumber()
Get the line number.
|
Lookup |
getLookup()
Provides access to the context passed into the line constructor.
|
String |
getText()
Get content of the annotatable.
|
abstract boolean |
isBreakpoint()
Deprecated.
Deprecated since 1.20. Use
Annotation instead. |
abstract void |
markCurrentLine()
Deprecated.
Deprecated since 1.20. Use
Annotation.attach(org.openide.text.Annotatable) instead. |
abstract void |
markError()
Deprecated.
Deprecated since 1.20. Use
Annotation.attach(org.openide.text.Annotatable) instead. |
abstract void |
setBreakpoint(boolean b)
Deprecated.
Deprecated since 1.20. Use
Annotation.attach(org.openide.text.Annotatable) instead. |
void |
show(int kind)
Deprecated.
Deprecated since 6.21. Use
show(ShowOpenType, ShowVisibilityType) instead. |
abstract void |
show(int kind,
int column)
Deprecated.
Deprecated since 6.21. Use
show(ShowOpenType, ShowVisibilityType, int) instead. |
void |
show(Line.ShowOpenType openType,
Line.ShowVisibilityType visibilityType)
Shows the line (at the first column).
|
void |
show(Line.ShowOpenType openType,
Line.ShowVisibilityType visibilityType,
int column)
Show the line.
|
abstract void |
unmarkCurrentLine()
Deprecated.
Deprecated since 1.20. Use
Annotation.detach() instead. |
abstract void |
unmarkError()
Deprecated.
Deprecated since 1.20. Use
Annotation.detach() instead. |
addAnnotation, addPropertyChangeListener, firePropertyChange, getAnnotationCount, isDeleted, removeAnnotation, removePropertyChangeListenerpublic static final String PROP_LINE_NUMBER
@Deprecated public static final int SHOW_TRY_SHOW
Line.ShowOpenType.NONE
and Line.ShowVisibilityType.NONE instead.show,
Constant Field Values@Deprecated public static final int SHOW_SHOW
Line.ShowOpenType.OPEN
and Line.ShowVisibilityType.NONE instead.show,
Constant Field Values@Deprecated public static final int SHOW_GOTO
Line.ShowOpenType.OPEN
and Line.ShowVisibilityType.FOCUS instead.show,
Constant Field Values@Deprecated public static final int SHOW_TOFRONT
Line.ShowOpenType.OPEN
and Line.ShowVisibilityType.FRONT instead.show,
TopComponent.toFront(),
Constant Field Values@Deprecated public static final int SHOW_REUSE
Line.ShowOpenType.REUSE
and Line.ShowVisibilityType.FOCUS instead.show,
Constant Field Values@Deprecated public static final int SHOW_REUSE_NEW
Line.ShowOpenType.REUSE_NEW
and Line.ShowVisibilityType.FOCUS instead.SHOW_REUSE but ignores
currently reusable editor.show,
Constant Field Valuespublic Line(Lookup context)
The context argument shall contain information about the
producer of the Line, that can be then extracted by getLookup() call.
context - the context for this linepublic Line(Object source)
source - the object that is producing the Linepublic String getDisplayName()
public final Lookup getLookup()
DataEditorSupport
provide DataObject as the content of the lookup.
One can use:
dataObjectOrNull = (DataObject)line.getLookup ().lookup (DataObject.class);to get the access.
public abstract int getLineNumber()
Line.Set lineSet =Line l = l.equals (lineSet.getCurrent (l.getLineNumber ()))
@Deprecated public abstract void show(int kind, int column)
show(ShowOpenType, ShowVisibilityType, int) instead.kind - one of SHOW_TRY_SHOW, SHOW_SHOW, or SHOW_GOTOcolumn - the column of this line which should be selected (starting at 0),
value -1 does not change previously selected column@Deprecated public void show(int kind)
show(ShowOpenType, ShowVisibilityType) instead.kind - one of SHOW_TRY_SHOW, SHOW_SHOW, SHOW_GOTO,
SHOW_REUSE or SHOW_REUSE_NEWshow(int, int)public void show(Line.ShowOpenType openType, Line.ShowVisibilityType visibilityType, int column)
openType - one of Line.ShowOpenType.NONE, Line.ShowOpenType.OPEN,
Line.ShowOpenType.REUSE or Line.ShowOpenType.REUSE_NEWvisibilityType - one of Line.ShowVisibilityType.NONE,
Line.ShowVisibilityType.FRONT or Line.ShowVisibilityType.FOCUScolumn - the column of this line which should be selected (starting at 0),
value -1 does not change previously selected columnpublic void show(Line.ShowOpenType openType, Line.ShowVisibilityType visibilityType)
openType - one of Line.ShowOpenType.NONE, Line.ShowOpenType.OPEN,
Line.ShowOpenType.REUSE or Line.ShowOpenType.REUSE_NEWvisibilityType - one of Line.ShowVisibilityType.NONE,
Line.ShowVisibilityType.FRONT or Line.ShowVisibilityType.FOCUSshow(ShowOpenType, ShowVisibilityType, int)@Deprecated public abstract void setBreakpoint(boolean b)
Annotation.attach(org.openide.text.Annotatable) instead.b - true to turn on@Deprecated public abstract boolean isBreakpoint()
Annotation instead.true is there is@Deprecated public abstract void markError()
Annotation.attach(org.openide.text.Annotatable) instead.@Deprecated public abstract void unmarkError()
Annotation.detach() instead.@Deprecated public abstract void markCurrentLine()
Annotation.attach(org.openide.text.Annotatable) instead.@Deprecated public abstract void unmarkCurrentLine()
Annotation.detach() instead.@Deprecated public boolean canBeMarkedCurrent(int action, Line previousLine)
markCurrentLine() is deprecated by Annotation.attach(org.openide.text.Annotatable).The default implementation simply returns true.
action - type of action that is trying to mark this line as current
one of constants (Debugger.ACTION_BREAKPOINT_HIT,
Debugger.ACTION_TRACE_OVER, etc.)previousLine - previous line (if any) or nullpublic Line.Part createPart(int column, int length)
column - starting column of the part of the text (starting at 0)length - length of the part of the textpublic String getText()
AnnotatablegetText in class AnnotatableBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.