|
||||||||||
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 org.gjt.sp.jedit.textarea.Gutter
The gutter is the component that displays folding triangles and line numbers to the left of the text area. The only methods in this class that should be called by plugins are those for adding and removing text area extensions.
addExtension(TextAreaExtension)
,
addExtension(int,TextAreaExtension)
,
removeExtension(TextAreaExtension)
,
TextAreaExtension
,
JEditTextArea
,
Serialized FormNested 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 |
DEFAULT_LAYER
Default extension layer. |
static int |
HIGHEST_LAYER
Highest possible layer. |
static int |
LOWEST_LAYER
The lowest possible layer. |
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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Gutter(View view,
JEditTextArea textArea)
|
Method Summary | |
void |
addExtension(int layer,
TextAreaExtension extension)
Adds a text area extension, which can perform custom painting and tool tip handling. |
void |
addExtension(TextAreaExtension extension)
Adds a text area extension, which can perform custom painting and tool tip handling. |
java.awt.Color |
getCurrentLineForeground()
|
TextAreaExtension[] |
getExtensions()
Returns an array of registered text area extensions. |
java.awt.Color |
getFoldColor()
|
java.awt.Color |
getHighlightedForeground()
Get the foreground color for highlighted line numbers |
int |
getHighlightInterval()
Sets the number of lines between highlighted line numbers. |
int |
getLineNumberAlignment()
Identifies whether the horizontal alignment of the line numbers. |
java.awt.Color |
getMarkerHighlightColor()
|
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
java.awt.Color |
getStructureHighlightColor()
Returns the structure highlight color. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent evt)
Returns the tool tip to display at the specified location. |
boolean |
isCurrentLineHighlightEnabled()
|
boolean |
isExpanded()
Identifies whether the gutter is collapsed or expanded. |
boolean |
isMarkerHighlightEnabled()
|
boolean |
isStructureHighlightEnabled()
Returns true if structure highlighting is enabled, false otherwise. |
void |
paintComponent(java.awt.Graphics _gfx)
|
void |
removeExtension(TextAreaExtension extension)
Removes a text area extension. |
void |
setBorder(javax.swing.border.Border border)
|
void |
setBorder(int width,
java.awt.Color color1,
java.awt.Color color2,
java.awt.Color color3)
Convenience method for setting a default matte border on the right with the specified border width and color |
void |
setCurrentLineForeground(java.awt.Color highlight)
|
void |
setCurrentLineHighlightEnabled(boolean enabled)
|
void |
setExpanded(boolean expanded)
Sets whether the gutter is collapsed or expanded and force the text area to update its layout if there is a change. |
void |
setFoldColor(java.awt.Color foldColor)
|
void |
setFont(java.awt.Font font)
|
void |
setHighlightedForeground(java.awt.Color highlight)
|
void |
setHighlightInterval(int interval)
Sets the number of lines between highlighted line numbers. |
void |
setLineNumberAlignment(int alignment)
Sets the horizontal alignment of the line numbers. |
void |
setMarkerHighlightColor(java.awt.Color markerHighlightColor)
|
void |
setMarkerHighlightEnabled(boolean markerHighlight)
|
void |
setStructureHighlightColor(java.awt.Color structureHighlightColor)
Sets the structure highlight color. |
void |
setStructureHighlightEnabled(boolean structureHighlight)
Enables or disables structure highlighting. |
void |
toggleExpanded()
Toggles whether the gutter is collapsed or expanded. |
void |
updateBorder()
Sets the border differently if the text area has focus or not. |
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, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, 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 |
public static final int LOWEST_LAYER
addExtension(int,TextAreaExtension)
,
Constant Field Valuespublic static final int DEFAULT_LAYER
public static final int HIGHEST_LAYER
Constructor Detail |
public Gutter(View view, JEditTextArea textArea)
Method Detail |
public void paintComponent(java.awt.Graphics _gfx)
public void addExtension(TextAreaExtension extension)
extension
- The extensionpublic void addExtension(int layer, TextAreaExtension extension)
layer
- The layer to add the extension to. Note that more than
extension can share the same layer.extension
- The extensionpublic void removeExtension(TextAreaExtension extension)
extension
- The extensionpublic TextAreaExtension[] getExtensions()
public java.lang.String getToolTipText(java.awt.event.MouseEvent evt)
evt
- The mouse eventpublic void setBorder(int width, java.awt.Color color1, java.awt.Color color2, java.awt.Color color3)
width
- The border width (in pixels)color1
- The focused border colorcolor2
- The unfocused border colorcolor3
- The gutter/text area gap colorpublic void updateBorder()
public void setBorder(javax.swing.border.Border border)
public void setFont(java.awt.Font font)
public java.awt.Color getHighlightedForeground()
public void setHighlightedForeground(java.awt.Color highlight)
public java.awt.Color getCurrentLineForeground()
public void setCurrentLineForeground(java.awt.Color highlight)
public java.awt.Color getFoldColor()
public void setFoldColor(java.awt.Color foldColor)
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public int getLineNumberAlignment()
public void setLineNumberAlignment(int alignment)
alignment
- Gutter.RIGHT, Gutter.CENTER, Gutter.LEFTpublic boolean isExpanded()
public void setExpanded(boolean expanded)
expanded
- true if the gutter is expanded,
false if it is collapsedpublic void toggleExpanded()
public int getHighlightInterval()
public void setHighlightInterval(int interval)
interval
- The number of lines between highlighted line numberspublic boolean isCurrentLineHighlightEnabled()
public void setCurrentLineHighlightEnabled(boolean enabled)
public final java.awt.Color getStructureHighlightColor()
public final void setStructureHighlightColor(java.awt.Color structureHighlightColor)
structureHighlightColor
- The structure highlight colorpublic final boolean isStructureHighlightEnabled()
public final void setStructureHighlightEnabled(boolean structureHighlight)
structureHighlight
- True if structure highlighting should be
enabled, false otherwisepublic java.awt.Color getMarkerHighlightColor()
public void setMarkerHighlightColor(java.awt.Color markerHighlightColor)
public boolean isMarkerHighlightEnabled()
public void setMarkerHighlightEnabled(boolean markerHighlight)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |