Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.editor.gutter
Interface GutterMark<E>

All Known Implementing Classes:
LineGutterPlugin.Column.Mark

public interface GutterMark<E>

The GutterMark is used by the Gutter interface and implementations to mark a specific line in the Gutter with an Icon. The column containing the mark will receive notifications associated with the mark, such as if the mark moved, was removed, or was clicked on.

It is possible the underlying buffer may be reloaded from disk (or persistent storage), such as on an application switch, if the buffer was modified externally. In such cases, rather than removing all gutter marks (which in the case of a debugger, would mean removing all breakpoints), we will leave all gutter marks as they are (i.e., not moved) except in the case that the buffer gets shorter, in which case we will remove marks beyond the length of the buffer.

You can change the visibility of a Mark using the setVisible( boolean ) method. By default, newly created Marks are visible.

When creating a mark, clients can specify additional options, such as MARK_OPTION_SUPPORTS_CLICKS to affect the mark's behavior.

See Also:
Gutter, GutterColumn, GutterColumnListener

Field Summary
static int MARK_OPTION_NONE
          Constant indicating no mark options.
static int MARK_OPTION_SHOW_IN_FILE_OVERVIEW_MARGIN
          Constant for a mark option indicating that a corresponding mark should be placed in the file overview margin.
static int MARK_OPTION_STATIONARY
          Constant for a mark option indicating that the created GutterMark should be stationary (non-tracking).
static int MARK_OPTION_SUPPORTS_CLICKS
          Constant for a mark option indicating that the created GutterMark supports left-clicking to perform some client-defined action.

 

Method Summary
 Gutter getGutter()
          Fetches the Gutter that this mark has been created in.
 GutterColumn getGutterColumn()
          Fetches the GutterColumn that this mark was created in
 HighlightStyle getHighlightStyle()
          Fetches the HighlightStyle associated with this GutterMark when it was created.
 javax.swing.Icon getIcon()
          Gets the Icon that is associated with this GutterMark.
 int getLine()
          Fetches the line that this GutterMark is currently located on.
 int getOrder()
          Fetch the ordering that this GutterMark is currently using.
 E getUserData()
          Fetch the user data object set by a prior call to setUserData() for this mark.
 boolean isVisible()
          Fetch whether this mark should be visible.
 void setIcon(javax.swing.Icon icon)
          Sets the icon associated with this GutterMark.
 void setUserData(E userData)
          Stores an opaque, user-defined object to be associated with this GutterMark instance.
 void setVisible(boolean isVisible)
          Sets whether this mark should be visible or not.

 

Field Detail

MARK_OPTION_NONE

static final int MARK_OPTION_NONE
Constant indicating no mark options.
See Also:
Constant Field Values

MARK_OPTION_SUPPORTS_CLICKS

static final int MARK_OPTION_SUPPORTS_CLICKS
Constant for a mark option indicating that the created GutterMark supports left-clicking to perform some client-defined action. When the user hovers over the icon associated with this mark, a square will be drawn around it indicating that the mark is clickable. When the user left-clicks on the mark, the markClicked() notification will be sent to the containing column's GutterColumnListener.
See Also:
Constant Field Values

MARK_OPTION_STATIONARY

static final int MARK_OPTION_STATIONARY
Constant for a mark option indicating that the created GutterMark should be stationary (non-tracking). This means that mark will always remain in the same location regardless of text edits in the associated editor. Additionally, the markMoved() and markRemoved() notifications will not be sent to the containing column's GutterColumnListener.
See Also:
Constant Field Values

MARK_OPTION_SHOW_IN_FILE_OVERVIEW_MARGIN

static final int MARK_OPTION_SHOW_IN_FILE_OVERVIEW_MARGIN
Constant for a mark option indicating that a corresponding mark should be placed in the file overview margin.
See Also:
Constant Field Values

Method Detail

getGutterColumn

GutterColumn getGutterColumn()
Fetches the GutterColumn that this mark was created in
Returns:
the GutterColumn containing this mark

getGutter

Gutter getGutter()
Fetches the Gutter that this mark has been created in.
Returns:
the Gutter containing this mark

getIcon

javax.swing.Icon getIcon()
Gets the Icon that is associated with this GutterMark. This is the icon that is displayed in the Gutter to represent this mark.
Returns:
this icon for this mark

setIcon

void setIcon(javax.swing.Icon icon)
Sets the icon associated with this GutterMark.

getHighlightStyle

HighlightStyle getHighlightStyle()
Fetches the HighlightStyle associated with this GutterMark when it was created. This is the style used for highlighting the line for this mark.
Returns:
the highlight style for this mark

getLine

int getLine()
Fetches the line that this GutterMark is currently located on. If this mark is not tracking, then the line is the one the mark was created on.
Returns:
the line for this mark

getOrder

int getOrder()
Fetch the ordering that this GutterMark is currently using.
Returns:
the mark order that was specified when the mark was created

getUserData

E getUserData()
Fetch the user data object set by a prior call to setUserData() for this mark.
Returns:
the user data object associated with this mark that was set by the client

setUserData

void setUserData(E userData)
Stores an opaque, user-defined object to be associated with this GutterMark instance. This user-defined object will be returned by getUserData(). Note that if this mark is removed, this user object will become garbage-collectable unless a client holds an additional reference to it.
Parameters:
userData - the user data object to associate with this mark

setVisible

void setVisible(boolean isVisible)
Sets whether this mark should be visible or not. By default, newly created marks are visible.
Parameters:
isVisible - whether this mark should be visible

isVisible

boolean isVisible()
Fetch whether this mark should be visible.
Returns:
whether this mark should be visible

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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