Skip navigation links

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

E13403-06


oracle.javatools.editor.gutter
Class LineGutterPlugin.Column.Mark

java.lang.Object
  extended by oracle.javatools.editor.gutter.LineGutterPlugin.Column.Mark

All Implemented Interfaces:
FileOverviewMark, GutterMark
Enclosing class:
LineGutterPlugin.Column

public class LineGutterPlugin.Column.Mark
extends java.lang.Object
implements GutterMark, FileOverviewMark

This is our implementation of the GutterMark interface.


Field Summary

 

Fields inherited from interface oracle.javatools.editor.gutter.GutterMark
MARK_OPTION_NONE, MARK_OPTION_SHOW_IN_FILE_OVERVIEW_MARGIN, MARK_OPTION_STATIONARY, MARK_OPTION_SUPPORTS_CLICKS

 

Fields inherited from interface oracle.javatools.editor.FileOverviewMark
SEVERITY_ERROR, SEVERITY_NONE, SEVERITY_WARNING

 

Constructor Summary
protected LineGutterPlugin.Column.Mark(int line, int lineStart, javax.swing.Icon icon, HighlightStyle highlightStyle, int markOrder, int markOptions)
          Constructs a new Mark.

 

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.
protected  int getOffset()
          Fetches the offset that this GutterMark is tracking.
protected  int getOptions()
          Fetch the options for this mark.
 int getOrder()
          Fetch the ordering that this GutterMark is currently using.
 int getSelectionLength()
          Called when the FileOverviewMargin is preparing to navigate to this mark's location.
 int getSelectionStart()
          Called when the FileOverviewMargin is preparing to navigate to this mark's location.
 int getSeverity()
          Called when the FileOverviewMargin is preparing to update the summary block at the top.
 java.lang.String getToolTipText(java.awt.event.MouseEvent mouseEvent)
          Called when the FileOverviewMargin is preparing to show a tooltip for this mark.
 java.lang.Object getUserData()
          Fetch the user data object set by a prior call to setUserData() for this mark.
 boolean isOptionSet(int optionFlag)
          Fetch whether the given option is set or not.
 boolean isVisible()
          Fetch whether this mark should be visible.
protected  void removeHighlight()
          Utility routine to remove the highlight when the mark is removed.
 void setIcon(javax.swing.Icon icon)
          Sets the icon associated with this GutterMark.
protected  void setLine(int newLine)
          Changes the line that this GutterMark is tracking.
protected  void setOffset(int offset)
          Changes the offset that this GutterMark is tracking.
 void setUserData(java.lang.Object userData)
          Stores an opaque, user-defined object to be associated with this GutterMark instance.
 void setVisible(boolean visible)
          Sets whether this mark should be visible or not.
protected  void updateHighlight(LineMap lineMap)
          Utility routine to create or update the highlight when the mark is created or moved.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

LineGutterPlugin.Column.Mark

protected LineGutterPlugin.Column.Mark(int line,
                                       int lineStart,
                                       javax.swing.Icon icon,
                                       HighlightStyle highlightStyle,
                                       int markOrder,
                                       int markOptions)
Constructs a new Mark.

Method Detail

updateHighlight

protected void updateHighlight(LineMap lineMap)
Utility routine to create or update the highlight when the mark is created or moved.

removeHighlight

protected void removeHighlight()
Utility routine to remove the highlight when the mark is removed.

setLine

protected void setLine(int newLine)
Changes the line that this GutterMark is tracking. This is used for internal purposes to update the line when the document is modified.
Parameters:
newLine - the new line of the mark

getOffset

protected int getOffset()
Fetches the offset that this GutterMark is tracking.
Returns:
the offset for this mark

setOffset

protected void setOffset(int offset)
Changes the offset that this GutterMark is tracking. This is used for internal purposes to update the line when the document is modified.
Parameters:
offset - the new offset of the mark

isOptionSet

public boolean isOptionSet(int optionFlag)
Fetch whether the given option is set or not.
Parameters:
optionFlag - the option to check
Returns:
true if the option is set, false otherwise

getOptions

protected int getOptions()
Fetch the options for this mark.
Returns:
the options for this mark

getGutterColumn

public GutterColumn getGutterColumn()
Fetches the GutterColumn that this mark was created in
Specified by:
getGutterColumn in interface GutterMark
Returns:
the GutterColumn containing this mark

getGutter

public Gutter getGutter()
Fetches the Gutter that this mark has been created in.
Specified by:
getGutter in interface GutterMark
Returns:
the Gutter containing this mark

getIcon

public 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.
Specified by:
getIcon in interface GutterMark
Returns:
this icon for this mark

setIcon

public void setIcon(javax.swing.Icon icon)
Sets the icon associated with this GutterMark.
Specified by:
setIcon in interface GutterMark

getHighlightStyle

public 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.
Specified by:
getHighlightStyle in interface GutterMark
Returns:
the highlight style for this mark

getLine

public 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.
Specified by:
getLine in interface GutterMark
Returns:
the line for this mark

getOrder

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

setVisible

public void setVisible(boolean visible)
Sets whether this mark should be visible or not. By default, newly created marks are visible.
Specified by:
setVisible in interface GutterMark
Parameters:
visible - whether this mark should be visible

isVisible

public boolean isVisible()
Fetch whether this mark should be visible.
Specified by:
isVisible in interface GutterMark
Returns:
whether this mark should be visible

getUserData

public java.lang.Object getUserData()
Fetch the user data object set by a prior call to setUserData() for this mark.
Specified by:
getUserData in interface GutterMark
Returns:
the user data object associated with this mark that was set by the client

setUserData

public void setUserData(java.lang.Object 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.
Specified by:
setUserData in interface GutterMark
Parameters:
userData - the user data object to associate with this mark

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: FileOverviewMark
Called when the FileOverviewMargin is preparing to show a tooltip for this mark.
Specified by:
getToolTipText in interface FileOverviewMark
Returns:
the desired tooltip

getSelectionStart

public int getSelectionStart()
Description copied from interface: FileOverviewMark
Called when the FileOverviewMargin is preparing to navigate to this mark's location. If it is desirable to select text in the editor, this method should return the offset for the start of the selection. If it is not desirable to select text, this method should return -1.
Specified by:
getSelectionStart in interface FileOverviewMark
Returns:
the selection start offset >= 0

getSelectionLength

public int getSelectionLength()
Description copied from interface: FileOverviewMark
Called when the FileOverviewMargin is preparing to navigate to this mark's location. If it is desirable to select text in the editor, this method should return the length of the selection.
Specified by:
getSelectionLength in interface FileOverviewMark
Returns:
the selection length >= 0

getSeverity

public int getSeverity()
Description copied from interface: FileOverviewMark
Called when the FileOverviewMargin is preparing to update the summary block at the top. The severity can be SEVERITY_NONE, SEVERITY_WARNING, or SEVERITY_ERROR.
Specified by:
getSeverity in interface FileOverviewMark
Returns:
the severity constant associated with this mark: SEVERITY_NONE, SEVERITY_WARNING, or SEVERITY_ERROR

Skip navigation links

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

E13403-06


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