Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.javatools.editor.plugins
Class LineHighlightPlugin

java.lang.Object
  extended by oracle.javatools.editor.plugins.LineHighlightPlugin
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, javax.swing.event.DocumentListener, EditorPlugin

public final class LineHighlightPlugin
extends java.lang.Object
implements javax.swing.event.CaretListener, javax.swing.event.DocumentListener, EditorPlugin

The LineHighlightPlugin is an editor plugin which applies a background highlight to the current caret line. This background highlight will always track the current line so if the user applies edits or moves the caret, the line highlight will move with it. Note that the line highlight is currently disabled by default.


Field Summary
static java.lang.String CARET_LINE_HIGHLIGHT
          The name of the line highlight.
static int DEFAULT_LINE_PRIORITY
          The default priority level given to the line highlight.
 
Constructor Summary
LineHighlightPlugin()
          Constructs a new LineHighlightPlugin instance that
 
Method Summary
 void caretUpdate(javax.swing.event.CaretEvent event)
          Called when the caret position is updated.
 void changedUpdate(javax.swing.event.DocumentEvent event)
          Gives notification that an attribute or set of attributes changed.
 void deinstall(BasicEditorPane editor)
          Called when the plugin is being removed from the BasicEditorPane (for example when the editor is closed.) This is used to notify plugins that they should unregister any listeners that were attached.
 void insertUpdate(javax.swing.event.DocumentEvent event)
          Gives notification that there was an insert into the document.
 void install(BasicEditorPane editor)
          Called when this plugin is being installed into the BasicEditorPane.
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when a bound property is changed.
static void registerHighlights()
           
 void removeUpdate(javax.swing.event.DocumentEvent event)
          Gives notification that a portion of the document has been removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LINE_PRIORITY

public static final int DEFAULT_LINE_PRIORITY
The default priority level given to the line highlight.

See Also:
Constant Field Values

CARET_LINE_HIGHLIGHT

public static final java.lang.String CARET_LINE_HIGHLIGHT
The name of the line highlight.

See Also:
Constant Field Values
Constructor Detail

LineHighlightPlugin

public LineHighlightPlugin()
Constructs a new LineHighlightPlugin instance that

Method Detail

install

public void install(BasicEditorPane editor)
Called when this plugin is being installed into the BasicEditorPane.

Specified by:
install in interface EditorPlugin
Parameters:
editor - the editor pane

deinstall

public void deinstall(BasicEditorPane editor)
Called when the plugin is being removed from the BasicEditorPane (for example when the editor is closed.) This is used to notify plugins that they should unregister any listeners that were attached.

Specified by:
deinstall in interface EditorPlugin
Parameters:
editor - the editor pane

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
This method gets called when a bound property is changed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - A PropertyChangeEvent object describing the event source and the property that has changed.

caretUpdate

public void caretUpdate(javax.swing.event.CaretEvent event)
Called when the caret position is updated.

Specified by:
caretUpdate in interface javax.swing.event.CaretListener
Parameters:
event - the caret event

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent event)
Gives notification that there was an insert into the document. The range given by the DocumentEvent bounds the freshly inserted region.

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Parameters:
event - the document event

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent event)
Gives notification that a portion of the document has been removed. The range is given in terms of what the view last saw (that is, before updating sticky positions).

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Parameters:
event - the document event

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent event)
Gives notification that an attribute or set of attributes changed.

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Parameters:
event - the document event

registerHighlights

public static void registerHighlights()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.