Extension SDK 10.1.2

oracle.javatools.editor.gutter
Class LineGutterPlugin

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byoracle.javatools.editor.gutter.LineGutterPlugin
All Implemented Interfaces:
javax.swing.event.DocumentListener, EditorPlugin, java.util.EventListener, Gutter, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener, java.io.Serializable, TextBufferListener

public class LineGutterPlugin
extends javax.swing.JComponent
implements javax.swing.event.DocumentListener, EditorPlugin, Gutter, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, TextBufferListener

The LineGutterPlugin is a line gutter which also implements the Gutter interface that provides clients with the ability to add or remove icon marks in the gutter associated with an editor pane. Refer to the Gutter interface for more details about its use.

Note that this Gutter implementation is not currently defined to handle the case where the document for the editor is changed after the line gutter has been installed. Unpredictable results WILL happen in such cases.

See Also:
Gutter, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int SHARED_ICON_COLUMN_ALWAYS
          Constant indicating that icons should always be displayed in a shared column, regardless of the editor/global property for shared icon column.
static int SHARED_ICON_COLUMN_DEFAULT
          Constant indicating that whether the icons are displayed in a shared or their own columns will follow the editor/global property for shared icon column.
static int SHARED_ICON_COLUMN_NEVER
          Constant indicating that icons should always be displayed in their own columns, regardless of the editor/global property for shared icon column.
static int SHOW_LINE_NUMBERS_ALWAYS
          Constant indicating that line numbers should always be visible, regardless of the editor/global property for show line numbers.
static int SHOW_LINE_NUMBERS_DEFAULT
          Constant indicating that this line gutter instance will just follow the editor/global property for show line numbers.
static int SHOW_LINE_NUMBERS_NEVER
          Constant indicating that line numbers should never be visible, regardless of the editor/global property for show line numbers.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface oracle.javatools.editor.gutter.Gutter
DEFAULT_WIDTH, MAXIMUM_WIDTH, MINIMUM_WIDTH
 
Fields inherited from interface oracle.javatools.buffer.TextBufferListener
EOL_TYPE_ATTRIBUTE, MODIFIED_ATTRIBUTE, READ_ONLY_ATTRIBUTE, RELOAD_END_ATTRIBUTE, RELOAD_START_ATTRIBUTE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LineGutterPlugin()
          Constructs a new LineGutterPlugin.
 
Method Summary
 boolean addColumn(java.lang.String columnName, int pixelWidth, boolean firstColumn)
          Creates a new column that can contain GutterMarks for displaying icons in the Gutter.
 boolean addColumn(java.lang.String columnName, int pixelWidth, java.lang.String existingColumn, boolean insertBefore)
          Creates a new column that can contain GutterMarks for displaying icons in the Gutter.
 void addGutterClickListener(GutterClickListener listener)
          Registers a GutterClickListener to receive notifications of mouse clicks in this Gutter component.
 GutterMark addGutterMark(java.lang.String columnName, int line, javax.swing.Icon icon, HighlightStyle highlightStyle, GutterTrackingListener listener)
          Adds a new GutterMark to the specified column for the specified line.
protected static oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] allocMarkArray()
          Utility routine to get a shared Mark[] scratch array.
protected  boolean allowDragging()
          Utility routine to check whether click-dragging is enabled for making a selection in the editor.
 void attributeUpdate(int attribute)
          Provides notification regarding a change to one of the buffer attributes.
 void changedUpdate(javax.swing.event.DocumentEvent event)
          Gives notification that an attribute or set of attributes changed.
protected static void clearMarkArray(oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] arrayToClear)
          Utility routine to clear a given Mark[] array.
 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.
protected  void fireGutterClicked(java.awt.event.MouseEvent event)
          Utility routine to handle firing a gutter click notification for the given mouse event.
protected static void freeMarkArray(oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] arrayToFree)
          Utility routine to free a shared Mark[] scratch array.
protected  int getLineFromCoordinate(int x, int y)
          Private utility routine to calculate the line from a point.
protected static void insertMarkForZOrder(oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] markArray, oracle.javatools.editor.gutter.LineGutterPlugin.Mark markToInsert)
          Utility routine to insert a given mark into an array based on the priority level to use for Z-ordering.
 void insertUpdate(javax.swing.event.DocumentEvent event)
          Gives notification that there was an insert into the document.
 void insertUpdate(int offset, int count, char[] insertedData)
          Provides notification about an insertion into the text buffer.
 void install(BasicEditorPane editor)
          Called when this plugin is being installed into the BasicEditorPane.
 void mouseClicked(java.awt.event.MouseEvent event)
          Invoked when the mouse has been clicked on a component.
 void mouseDragged(java.awt.event.MouseEvent event)
          Invoked when a mouse button is pressed on a component and then dragged.
 void mouseEntered(java.awt.event.MouseEvent event)
          Invoked when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent event)
          Invoked when the mouse exits a component.
 void mouseMoved(java.awt.event.MouseEvent event)
          Invoked when the mouse button has been moved on a component (with no buttons no down).
 void mousePressed(java.awt.event.MouseEvent event)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(java.awt.event.MouseEvent event)
          Invoked when a mouse button has been released on a component.
static int numDigits(int number)
          Utility routine to compute the number of digits in the specified number.
 void paint(java.awt.Graphics graphics)
          Paint the component.
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when a bound property is changed.
 void removeAllColumns()
          Removes all existing columns from the Gutter.
 boolean removeColumn(java.lang.String columnName)
          Removes an existing column from the Gutter and all its marks and icons.
 void removeGutterClickListener(GutterClickListener listener)
          Deregisters a previously-registered GutterClickListener so that it no longer receives notifications of mouse clicks in this Gutter component.
 void removeGutterMark(GutterMark mark)
          Removes the mark from the Gutter.
 void removeUpdate(javax.swing.event.DocumentEvent event)
          Gives notification that a portion of the document has been removed.
 void removeUpdate(int offset, int count, char[] removedData)
          Provides notification about a removal from the text buffer.
 void setSharedIconColumn(int sharedFlag)
          Sets the "shared icon column" policy of this line gutter directly.
 void setShowLineNumbers(int showFlag)
          Sets the "show line numbers" policy of this line gutter directly.
protected  void setUI(javax.swing.plaf.ComponentUI newUI)
          Sets the look and feel delegate for this component.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHOW_LINE_NUMBERS_ALWAYS

public static final int SHOW_LINE_NUMBERS_ALWAYS
Constant indicating that line numbers should always be visible, regardless of the editor/global property for show line numbers.

See Also:
Constant Field Values

SHOW_LINE_NUMBERS_NEVER

public static final int SHOW_LINE_NUMBERS_NEVER
Constant indicating that line numbers should never be visible, regardless of the editor/global property for show line numbers.

See Also:
Constant Field Values

SHOW_LINE_NUMBERS_DEFAULT

public static final int SHOW_LINE_NUMBERS_DEFAULT
Constant indicating that this line gutter instance will just follow the editor/global property for show line numbers.

See Also:
Constant Field Values

SHARED_ICON_COLUMN_ALWAYS

public static final int SHARED_ICON_COLUMN_ALWAYS
Constant indicating that icons should always be displayed in a shared column, regardless of the editor/global property for shared icon column.

See Also:
Constant Field Values

SHARED_ICON_COLUMN_NEVER

public static final int SHARED_ICON_COLUMN_NEVER
Constant indicating that icons should always be displayed in their own columns, regardless of the editor/global property for shared icon column.

See Also:
Constant Field Values

SHARED_ICON_COLUMN_DEFAULT

public static final int SHARED_ICON_COLUMN_DEFAULT
Constant indicating that whether the icons are displayed in a shared or their own columns will follow the editor/global property for shared icon column.

See Also:
Constant Field Values
Constructor Detail

LineGutterPlugin

public LineGutterPlugin()
Constructs a new LineGutterPlugin.

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

setShowLineNumbers

public void setShowLineNumbers(int showFlag)
Sets the "show line numbers" policy of this line gutter directly. This will only affect this line gutter instance - if the showFlag is SHOW_LINE_NUMBERS_ALWAYS or SHOW_LINE_NUMBERS_NEVER, then this line gutter will not respond to editor/global property changes for "show line numbers".

Parameters:
showFlag - the show line numbers policy for this line gutter

setSharedIconColumn

public void setSharedIconColumn(int sharedFlag)
Sets the "shared icon column" policy of this line gutter directly. This will only affect this line gutter instance - if the showFlag is SHARED_ICON_COLUMN_ALWAYS or SHARED_ICON_COLUMN_NEVER, then this line gutter will not respond to editor/global property changes for "shared icon column".

Parameters:
sharedFlag - the shared icon column policy for this line gutter

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.

allocMarkArray

protected static oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] allocMarkArray()
Utility routine to get a shared Mark[] scratch array.

Returns:
a scratch Mark[] array we can use

freeMarkArray

protected static void freeMarkArray(oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] arrayToFree)
Utility routine to free a shared Mark[] scratch array.

Parameters:
arrayToFree - the Mark[] array to free up

clearMarkArray

protected static void clearMarkArray(oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] arrayToClear)
Utility routine to clear a given Mark[] array.

Parameters:
arrayToClear - the array to clear

insertMarkForZOrder

protected static void insertMarkForZOrder(oracle.javatools.editor.gutter.LineGutterPlugin.Mark[] markArray,
                                          oracle.javatools.editor.gutter.LineGutterPlugin.Mark markToInsert)
Utility routine to insert a given mark into an array based on the priority level to use for Z-ordering.

Parameters:
markArray - the array to insert into
markToInsert - the mark to insert

setUI

protected void setUI(javax.swing.plaf.ComponentUI newUI)
Sets the look and feel delegate for this component. We override this to set up our colors.

Parameters:
newUI - the component ui to set

paint

public void paint(java.awt.Graphics graphics)
Paint the component. This is called when the contents of the component have been changed, damaged, or resized.

Parameters:
graphics - the graphics context to draw to

getLineFromCoordinate

protected int getLineFromCoordinate(int x,
                                    int y)
Private utility routine to calculate the line from a point. This is typically done, for example, when the user clicks on a point, and we need to deliver a notification event. This returns a 1-based line number.

Parameters:
x - the x-coordinate to translate
y - the y-coordinate to translate
Returns:
the line corresponding to the given (x, y) pair, or -1 if it does not correspond with a line

numDigits

public static int numDigits(int number)
Utility routine to compute the number of digits in the specified number.

Parameters:
number - the number to calculate the number of digits for
Returns:
the number of digits in the specified number

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

insertUpdate

public void insertUpdate(int offset,
                         int count,
                         char[] insertedData)
Provides notification about an insertion into the text buffer.

Specified by:
insertUpdate in interface TextBufferListener
Parameters:
offset - the offset where the insert took place
count - the number of characters inserted (insertedData.length)
insertedData - the contents of the insertion

removeUpdate

public void removeUpdate(int offset,
                         int count,
                         char[] removedData)
Provides notification about a removal from the text buffer.

Specified by:
removeUpdate in interface TextBufferListener
Parameters:
offset - the offset where the removal took place
count - the number of characters removed (removedData.length)
removedData - the contents of the removal

attributeUpdate

public void attributeUpdate(int attribute)
Provides notification regarding a change to one of the buffer attributes. The possible attributes are defined in this interface.

Specified by:
attributeUpdate in interface TextBufferListener
Parameters:
attribute - the attribute that changed

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
event - the mouse event

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Invoked when the mouse button has been moved on a component (with no buttons no down).

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
event - the mouse event

allowDragging

protected boolean allowDragging()
Utility routine to check whether click-dragging is enabled for making a selection in the editor.

Returns:
true if dragging is allowed for making a selection

fireGutterClicked

protected void fireGutterClicked(java.awt.event.MouseEvent event)
Utility routine to handle firing a gutter click notification for the given mouse event.

Parameters:
event - the mouse event

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
Invoked when the mouse has been clicked on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Invoked when a mouse button has been pressed on a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
Invoked when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Invoked when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

addColumn

public boolean addColumn(java.lang.String columnName,
                         int pixelWidth,
                         boolean firstColumn)
Creates a new column that can contain GutterMarks for displaying icons in the Gutter.

Specified by:
addColumn in interface Gutter
Parameters:
columnName - columnName the name of the column to create
pixelWidth - the requested width of the column in pixels
firstColumn - true to create the column as the left-most (first) column, false to create the column as the right-most (last) column
Returns:
true if the column was created successfully, false if another column already exists with the same name

addColumn

public boolean addColumn(java.lang.String columnName,
                         int pixelWidth,
                         java.lang.String existingColumn,
                         boolean insertBefore)
Creates a new column that can contain GutterMarks for displaying icons in the Gutter.

Specified by:
addColumn in interface Gutter
Parameters:
columnName - columnName the name of the column to create
pixelWidth - the requested width of the column in pixels
existingColumn - the name of an existing column to place the new column next to
insertBefore - whether to insert the column before (true) the existing column, or after (false)
Returns:
true if the column was created successfully, false if the specified existing column doesn't exist

removeColumn

public boolean removeColumn(java.lang.String columnName)
Removes an existing column from the Gutter and all its marks and icons.

Specified by:
removeColumn in interface Gutter

removeAllColumns

public void removeAllColumns()
Removes all existing columns from the Gutter.

Specified by:
removeAllColumns in interface Gutter

addGutterMark

public GutterMark addGutterMark(java.lang.String columnName,
                                int line,
                                javax.swing.Icon icon,
                                HighlightStyle highlightStyle,
                                GutterTrackingListener listener)
Adds a new GutterMark to the specified column for the specified line.

Specified by:
addGutterMark in interface Gutter
Parameters:
line - the line on which to create the GutterMark
icon - the icon to display visually for this line in the Gutter
highlightStyle - the highlight style to use for highlighting the line, null for no highlight
listener - the tracking listener to associate with this mark for move or remove notifications (for tracking marks only)
Returns:
the newly created GutterMark, or null if the line is invalid

removeGutterMark

public void removeGutterMark(GutterMark mark)
Removes the mark from the Gutter.

Specified by:
removeGutterMark in interface Gutter
Parameters:
mark - the GutterMark to remove

addGutterClickListener

public void addGutterClickListener(GutterClickListener listener)
Registers a GutterClickListener to receive notifications of mouse clicks in this Gutter component.

Specified by:
addGutterClickListener in interface Gutter
Parameters:
listener - the listener to register

removeGutterClickListener

public void removeGutterClickListener(GutterClickListener listener)
Deregisters a previously-registered GutterClickListener so that it no longer receives notifications of mouse clicks in this Gutter component.

Specified by:
removeGutterClickListener in interface Gutter
Parameters:
listener - the listener to register

Extension SDK

 

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