|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
oracle.javatools.editor.gutter.LineGutterPlugin
oracle.ide.ceditor.CodeEditorGutter
public class CodeEditorGutter
The CodeEditorGutter interface is an extension of the editor's Gutter interface to integrate with the JDev environment and provide Context information for other Addins.
The CodeEditorGutter does have a ContextMenu available. Use CodeEditorGutter.getGutterContextMenu() in order to attach/detach as a ContextMenuListener. When the context menu is going to popup up, your listeners will be called with the context of the gutter - the view will be set to the specific CodeEditorGutter instance.
Note the contents of the Context to determine what to show in the ContextMenu. If the context menu was popped up by right-clicking on the CodeEditorGutter, the (1-based) line number will be stored in the extra data member with an Integer wrapper, or null if the user right-clicked on a non-existent line. If the context menu was popped up by left-clicking on on a clickable mark that wants the drop down menu, the extra data member will be set with that GutterMark.
When you get the context of this CodeEditorGutter, either by calling getContext() or by what is provided through the gutter's ContextMenu, the view returned in getView() will be the gutter itself, while the owner of the gutter view will be the associated CodeEditor instance.
When creating a GutterMark please use the defined mark order constants defined in this class. This makes it easier to order the marks relative to each other.
| Nested Class Summary | |
|---|---|
protected class |
CodeEditorGutter.CEColumnOur CEColumn class so that we can trap mark click events. |
class |
CodeEditorGutter.GutterView |
| Nested classes/interfaces inherited from class oracle.javatools.editor.gutter.LineGutterPlugin |
|---|
LineGutterPlugin.Column, LineGutterPlugin.MarkComparator |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected static java.awt.Polygon |
_triangle |
static java.lang.String |
COLUMN_NAME_BREAKPOINTThe column name for the debugger breakpoint and watchpoint column. |
static java.lang.String |
COLUMN_NAME_IPThe column name for the debugger instruction pointer column. |
static java.lang.String |
COLUMN_NAME_LIGHTBULBThe column name for the lightbulb column. |
static java.lang.String |
COLUMN_NAME_WATCHPOINTThe column name for the debugger breakpoint and watchpoint column. |
static int |
MARK_OPTION_CLICK_DROPS_MENUConstant for a mark option indicating that the created GutterMark will drop down a ContextMenu menu if the user left-clicks on the icon. |
static int |
MARK_ORDER_BOOKMARKThe mark order for a bookmark mark. |
static int |
MARK_ORDER_BREAKPOINTThe mark order for a breakpoint mark. |
static int |
MARK_ORDER_EXECUTIONThe mark order for an execution point (debugging) mark. |
static int |
MARK_ORDER_IMPLEMENTSThe mark order for an implements mark. |
static int |
MARK_ORDER_LIGHTBULBThe mark order for a light bulb mark. |
static int |
MARK_ORDER_OVERRIDESThe mark order for an overrides mark. |
static int |
MARK_ORDER_PROFILERThe mark order for a todo mark. |
static int |
MARK_ORDER_TODOThe mark order for a todo mark. |
static int |
MARK_ORDER_WATCHPOINT_ZEROThe mark order for a watchpoint mark. |
| Fields inherited from class oracle.javatools.editor.gutter.LineGutterPlugin |
|---|
_mouseInGutter, _mouseInMark, _scratchList, _showLineNumberFlag, MARK_COMPARATOR, SHOW_LINE_NUMBERS_ALWAYS, SHOW_LINE_NUMBERS_DEFAULT, SHOW_LINE_NUMBERS_NEVER |
| 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.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 |
| Method Summary | |
|---|---|
protected LineGutterPlugin.Column |
createGutterColumnImpl(java.lang.String columnName, GutterColumnListener listener)Creates the Column instance only. |
CodeEditor |
getCodeEditor()Fetch the code editor associated with this gutter. |
View |
getCodeEditorGutterView() |
Context |
getContext()Gets the current view context associated with this particular Code Editor and Gutter. |
static ContextMenu |
getGutterContextMenu()Fetch the ContextMenu instance that will be used for the CodeEditorGutter. |
static CodeEditorGutter |
getGutterFor(GutterColumn column)Utility routine to fetch the CodeEditorGutter instance from the given column. |
static CodeEditorGutter |
getGutterFor(GutterMark mark)Utility routine to fetch the CodeEditorGutter instance from the given mark. |
static int |
getLineForContext(Context context)Gets the gutter mark from a context associated with the code editor gutter context menu popping up. |
static GutterMark |
getMarkForContext(Context context)Gets the line number from a context associated with the code editor gutter context menu popping up. |
static boolean |
isMarkDroppingDown(Context context)Gets whether a context associated with the code editor gutter context menu popping up is really a gutter mark menu dropping down. |
void |
mouseClicked(java.awt.event.MouseEvent event)Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(java.awt.event.MouseEvent event)Override mouseDragged() to disable click-dragging for right-mouse button. |
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. |
protected java.awt.Rectangle |
paintRollover(java.awt.Graphics graphics, GutterMark mark, int iconX, int columnWidth, int rowY)Utility routine to paint the rollover effect for the given mark. |
protected void |
processMousePressed(java.awt.event.MouseEvent event, int line, GutterMark mark)Utility routine to handle firing a gutter click notification for the given mouse event. |
protected void |
showGutterContextMenu(java.awt.event.MouseEvent event, int line, GutterMark mark)Utility routine to show the context menu for the clicked line. |
void |
showMarkDropdownMenu(java.awt.event.MouseEvent event, GutterMark mark, int line)Utility routine to show the context menu for a specific mark. |
java.lang.String |
toString() |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COLUMN_NAME_LIGHTBULB
public static final java.lang.String COLUMN_NAME_BREAKPOINT
public static final java.lang.String COLUMN_NAME_WATCHPOINT
public static final java.lang.String COLUMN_NAME_IP
public static final int MARK_ORDER_BREAKPOINT
public static final int MARK_ORDER_WATCHPOINT_ZERO
public static final int MARK_ORDER_BOOKMARK
public static final int MARK_ORDER_PROFILER
public static final int MARK_ORDER_TODO
public static final int MARK_ORDER_IMPLEMENTS
public static final int MARK_ORDER_OVERRIDES
public static final int MARK_ORDER_LIGHTBULB
public static final int MARK_ORDER_EXECUTION
public static final int MARK_OPTION_CLICK_DROPS_MENU
GutterMark will drop down a ContextMenu menu if the user left-clicks on the icon. When the user hovers over the icon associated with this mark, a square and triangle drop-down will be rawn around it indicating that the mark drops a menu when clicked upon. The markClicked() notification will not be sent. Instead, the ContextMenu for this gutter will be popped up with the Context set to the GutterMark that was clicked on.
protected static java.awt.Polygon _triangle
| Method Detail |
|---|
public static ContextMenu getGutterContextMenu()
ContextMenu instance that will be used for the CodeEditorGutter.public void mousePressed(java.awt.event.MouseEvent event)
LineGutterPluginmousePressed in interface java.awt.event.MouseListenermousePressed in class LineGutterPluginpublic void mouseReleased(java.awt.event.MouseEvent event)
LineGutterPluginmouseReleased in interface java.awt.event.MouseListenermouseReleased in class LineGutterPluginpublic void mouseClicked(java.awt.event.MouseEvent event)
LineGutterPluginmouseClicked in interface java.awt.event.MouseListenermouseClicked in class LineGutterPluginpublic static CodeEditorGutter getGutterFor(GutterColumn column)
CodeEditorGutter instance from the given column.column - the column to fetch the gutter ofCodeEditorGutter instance that created the markjava.lang.ClassCastException - if the mark was not created through the CodeEditorGutter APIpublic static CodeEditorGutter getGutterFor(GutterMark mark)
CodeEditorGutter instance from the given mark.mark - the mark to fetch the gutter ofCodeEditorGutter instance that created the markjava.lang.ClassCastException - if the mark was not created through the CodeEditorGutter APIpublic static GutterMark getMarkForContext(Context context)
context - a context passed by a code editor gutter ContextMenu to its listeners.ContextMenu, ContextMenuListener.menuWillShow(ContextMenu)public static boolean isMarkDroppingDown(Context context)
context - a context passed by a code editor gutter ContextMenu to its listeners.ContextMenu, ContextMenuListener.menuWillShow(oracle.ide.controller.ContextMenu)public static int getLineForContext(Context context)
context - a context passed by a code editor gutter ContextMenu to its listeners.ContextMenu, ContextMenuListener.menuWillShow(oracle.ide.controller.ContextMenu)public Context getContext()
public CodeEditor getCodeEditor()
public View getCodeEditorGutterView()
protected LineGutterPlugin.Column createGutterColumnImpl(java.lang.String columnName,
GutterColumnListener listener)
createGutterColumnImpl in class LineGutterPluginpublic void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class LineGutterPluginevent - the mouse event
protected void processMousePressed(java.awt.event.MouseEvent event,
int line,
GutterMark mark)
processMousePressed in class LineGutterPluginevent - the mouse event
protected void showGutterContextMenu(java.awt.event.MouseEvent event,
int line,
GutterMark mark)
public void showMarkDropdownMenu(java.awt.event.MouseEvent event,
GutterMark mark,
int line)
protected java.awt.Rectangle paintRollover(java.awt.Graphics graphics,
GutterMark mark,
int iconX,
int columnWidth,
int rowY)
paintRollover in class LineGutterPlugingraphics - the graphics instancemark - the mark that should get the rollover effecticonX - the x location where the icon was paintedrowY - the y location of the top of the row being paintedpublic java.lang.String toString()
toString in class LineGutterPlugin
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||