|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.gjt.sp.jedit.textarea.Gutter
public class Gutter
Nested Class Summary |
---|
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 |
---|
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(JEditTextArea textArea,
TextAreaDefaults defaults)
|
Method Summary | |
---|---|
void |
addCustomHighlight(TextAreaHighlight highlight)
Adds a custom highlight painter. |
javax.swing.JPopupMenu |
getContextMenu()
|
int |
getGutterWidth()
Get the width of the expanded gutter |
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.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
java.lang.String |
getToolTipText(java.awt.event.MouseEvent evt)
|
boolean |
isCollapsed()
Identifies whether the gutter is collapsed or expanded. |
boolean |
isLineNumberingEnabled()
Identifies whether or not the line numbers are drawn in the gutter |
void |
paintComponent(java.awt.Graphics gfx)
|
protected void |
paintCustomHighlights(java.awt.Graphics gfx)
|
protected void |
paintLineNumbers(java.awt.Graphics gfx)
|
void |
setAnchorMark(java.awt.Color mark)
|
void |
setAntiAliasingEnabled(boolean on)
|
void |
setBorder(javax.swing.border.Border border)
|
void |
setBorder(int width,
java.awt.Color color)
Convenience method for setting a default matte border on the right with the specified border width and color |
void |
setCaretMark(java.awt.Color mark)
|
void |
setCollapsed(boolean collapsed)
Sets whether the gutter is collapsed or expanded and force the text area to update its layout if there is a change. |
void |
setContextMenu(javax.swing.JPopupMenu context)
|
void |
setFont(java.awt.Font font)
|
void |
setGutterWidth(int width)
Set the width of the expanded gutter |
void |
setHighlightedForeground(java.awt.Color highlight)
Set the foreground color for highlighted line numbers |
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 |
setLineNumberingEnabled(boolean enabled)
Turns the line numbering on or off and causes the gutter to be repainted. |
void |
setSelectionMark(java.awt.Color mark)
|
void |
toggleCollapsed()
Toggles whether the gutter is collapsed or expanded. |
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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, 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, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Gutter(JEditTextArea textArea, TextAreaDefaults defaults)
Method Detail |
---|
public void setAntiAliasingEnabled(boolean on)
public void paintComponent(java.awt.Graphics gfx)
paintComponent
in class javax.swing.JComponent
protected void paintLineNumbers(java.awt.Graphics gfx)
protected void paintCustomHighlights(java.awt.Graphics gfx)
public void addCustomHighlight(TextAreaHighlight highlight)
highlight
- The highlightpublic void setBorder(int width, java.awt.Color color)
width
- The border width (in pixels)color
- The border colorpublic void setBorder(javax.swing.border.Border border)
setBorder
in class javax.swing.JComponent
public void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent
public void setHighlightedForeground(java.awt.Color highlight)
highlight
- The highlight colorpublic java.awt.Color getHighlightedForeground()
public void setCaretMark(java.awt.Color mark)
public void setAnchorMark(java.awt.Color mark)
public void setSelectionMark(java.awt.Color mark)
public void setGutterWidth(int width)
width
- The gutter widthpublic int getGutterWidth()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public java.lang.String getToolTipText(java.awt.event.MouseEvent evt)
getToolTipText
in class javax.swing.JComponent
public boolean isLineNumberingEnabled()
public void setLineNumberingEnabled(boolean enabled)
enabled
- true if line numbers are drawn, false otherwisepublic int getLineNumberAlignment()
public void setLineNumberAlignment(int alignment)
alignment
- Gutter.RIGHT, Gutter.CENTER, Gutter.LEFTpublic boolean isCollapsed()
public void setCollapsed(boolean collapsed)
collapsed
- true if the gutter is collapsed,
false if it is expandedpublic void toggleCollapsed()
public int getHighlightInterval()
public void setHighlightInterval(int interval)
interval
- The number of lines between highlighted line numberspublic javax.swing.JPopupMenu getContextMenu()
public void setContextMenu(javax.swing.JPopupMenu context)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |