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

E13403-07

oracle.javatools.editor.gutter
Interface GutterColumn

All Known Implementing Classes:
CodeEditorGutter.CEColumn, LineGutterPlugin.Column

public interface GutterColumn

The GutterColumn interface describes the non-visual container that is used for creating GutterMark instances for displaying icons in a Gutter.

See Also:
Gutter, GutterColumnListener, GutterMark

Field Summary
static int LAYOUT_MERGE_RESERVED_WIDTHS
          Layout constraint indicating that the total reserved width for this column and the referenced column will be the maximum of their reserved widths.
static int LAYOUT_OVERLAY
          Layout constraint indicating that if icon(s) from this column and from the referenced column are both present on a line, only those from this column will be visible.
static int LAYOUT_UNCONSTRAINED
          Layout constraint indicating that the layout of this columns is not constrained.
 
Method Summary
 GutterMark addGutterMark(int line, javax.swing.Icon icon, HighlightStyle highlightStyle, int markOrder, int markOptions)
          Adds a new GutterMark to this column for the given line.
 void beginBlockAdd()
          Begins a block add.
 void endBlockAdd()
          Ends a block add.
 java.lang.String getColumnName()
          Fetch the name of this column.
 Gutter getGutter()
          Fetch the Gutter instance that this column is associated with.
 GutterMark[] lookupGutterMarks(int line)
          Fetch the GutterMark instances contained within this column for the specified line (if any).
 void removeAllGutterMarks()
          Removes all marks from this column.
 void removeGutterMark(GutterMark mark)
          Removes the mark from this column.
 void setLayoutConstraint(java.lang.String column, int constraint)
          Sets a layout constraint on this column.
 void setReservedWidth(int width)
          Sets the width reserved in the gutter for this column when no icon is displayed.
 

Field Detail

LAYOUT_UNCONSTRAINED

static final int LAYOUT_UNCONSTRAINED
Layout constraint indicating that the layout of this columns is not constrained.

See Also:
setLayoutConstraint(java.lang.String, int), Constant Field Values

LAYOUT_MERGE_RESERVED_WIDTHS

static final int LAYOUT_MERGE_RESERVED_WIDTHS
Layout constraint indicating that the total reserved width for this column and the referenced column will be the maximum of their reserved widths.

See Also:
setLayoutConstraint(java.lang.String, int), setReservedWidth(int), Constant Field Values

LAYOUT_OVERLAY

static final int LAYOUT_OVERLAY
Layout constraint indicating that if icon(s) from this column and from the referenced column are both present on a line, only those from this column will be visible. Additionally, the total reserved width for this column and the referenced column will be the maximum of their reserved widths.

See Also:
setLayoutConstraint(java.lang.String, int), setReservedWidth(int), Constant Field Values
Method Detail

setReservedWidth

void setReservedWidth(int width)
Sets the width reserved in the gutter for this column when no icon is displayed. By default, the reserved width is 0.

Parameters:
width - the width to reserve when no icon is displayed.

setLayoutConstraint

void setLayoutConstraint(java.lang.String column,
                         int constraint)
Sets a layout constraint on this column. The default is LAYOUT_UNCONSTRAINED.

Parameters:
column - the name of the column referenced by the constraint.
constraint - the constraint to establish, either LAYOUT_UNCONSTRAINED, LAYOUT_MERGE_RESERVED_WIDTHS, or LAYOUT_OVERLAY.
Throws:
java.lang.IllegalArgumentException - if the column name is the name of this column.

getGutter

Gutter getGutter()
Fetch the Gutter instance that this column is associated with.

Returns:
the gutter containing this column

getColumnName

java.lang.String getColumnName()
Fetch the name of this column.


addGutterMark

GutterMark addGutterMark(int line,
                         javax.swing.Icon icon,
                         HighlightStyle highlightStyle,
                         int markOrder,
                         int markOptions)
Adds a new GutterMark to this column for the given line. The provided icon will be displayed visually, and the highlight used to highlight the entire line. If there is a GutterColumnListener associated with this column, then it will receive notifications when the mark is moved, removed, or clicked upon.

Parameters:
line - the line (1-based) on which to create the GutterMark
icon - the icon to display visually on the given line of the gutter
highlightStyle - the highlight style to use for highlighting the line, or null for no highlight
markOrder - the ordering to use for this mark (in relation to other marks on the same line) for left-to-right positioning
markOptions - to affect user interaction with the mark, such as GutterMark.MARK_OPTION_SUPPORTS_CLICKS
Returns:
the newly created GutterMark or null if the line is invalid

beginBlockAdd

void beginBlockAdd()
Begins a block add. During a block add, display updates normally caused by adding a gutter mark are deferred until the endBlockAdd


endBlockAdd

void endBlockAdd()
Ends a block add. During a block add, display updates normally caused by adding a gutter mark are deferred until the endBlockAdd.


lookupGutterMarks

GutterMark[] lookupGutterMarks(int line)
Fetch the GutterMark instances contained within this column for the specified line (if any).

Parameters:
line - the line to lookup gutter marks for
Returns:
an array of marks (possibly zero-length) set for the given line of this column

removeGutterMark

void removeGutterMark(GutterMark mark)
Removes the mark from this column. This will also remove the icon and any associated highlight. There is no removal notification generated for this mark removal.

Parameters:
mark - the gutter mark to remove

removeAllGutterMarks

void removeAllGutterMarks()
Removes all marks from this column. There is no removal notification generated for these mark removals. of the marks in the column.


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

E13403-07

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