Modifier and Type | Field and Description |
---|---|
static String |
PROP_COMMENT
Comment property, fired when a comment change.
|
static String |
PROP_LINE
Line property, fired when a line change.
|
static String |
PROP_LOCATION
Location property, fired when a location change.
|
Constructor and Description |
---|
EditorPin(FileObject file,
int line,
Point location)
Create a new pin location in editor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a listener for property change events to this editor pin.
|
String |
getComment()
Get the comment of this pin.
|
FileObject |
getFile()
Get the file object associated with the editor containing the pin.
|
int |
getLine()
Get the line location of the pin.
|
Point |
getLocation()
Location of the pin in editor.
|
void |
move(int line,
Point location)
Move the pin to a different location in the editor pane.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for property change events from this editor pin.
|
void |
setComment(String comment)
Set a textual comment to this pin.
|
public static final String PROP_LINE
public static final String PROP_LOCATION
public static final String PROP_COMMENT
public EditorPin(FileObject file, int line, Point location)
file
- The editor's fileline
- The line location of the pinlocation
- Coordinates of the pin location in editorpublic int getLine()
public FileObject getFile()
public Point getLocation()
public void move(int line, Point location)
line
- A new linelocation
- Coordinates of the new locationpublic void setComment(String comment)
comment
- The user comment.public String getComment()
null
when no comment is set.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener