|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.borland.primetime.editor.Gutter
The Gutter is a panel which sits on the left edge of a TextView. It displays special marks and such that are associated with the document currently viewed in the editor.
TextView
, Serialized FormInner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected int |
clickRow
|
protected java.util.ArrayList |
gutterListeners
|
static int |
GUTTERWIDTH
The width of the gutter, by default set to 20. |
protected static java.util.ArrayList |
staticGutterListeners
|
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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Gutter()
Create a new Gutter object. |
Method Summary | |
void |
addGutterListener(GutterListener l)
Add a listener for gutter events. |
void |
addMark(int row,
LineMark mark)
Add a mark to the gutter. |
static void |
addStaticGutterListener(GutterListener l)
Add a listener for static gutter events. |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
Part of the DocumentListener interface. |
protected void |
fireLineClicked(int line,
java.awt.event.MouseEvent e)
This method is called when the mouse was clicked on a particular row. |
protected void |
fireLinesChanged()
This method is called when the number of lines has changed in the document of the attached editor. |
EditorPane |
getEditor()
Return the editor associated with this gutter. |
int |
getMarkLine(LineMark mark)
Get the current location of a mark. |
LineMark[] |
getMarks(int lineNumber)
This method is returns an array of the marks on a particular line. |
java.awt.Dimension |
getPreferredSize()
This method is overridden because this component's actual size should always be its preferred size. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
Part of the DocumentListener interface. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Part of the MouseListener interface. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Part of the MouseListener interface. |
void |
mouseExited(java.awt.event.MouseEvent e)
Part of the MouseListener interface. |
void |
mousePressed(java.awt.event.MouseEvent e)
Part of the MouseListener interface. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Part of the MouseListener interface. |
protected void |
paintComponent(java.awt.Graphics g)
|
protected void |
paintMark(java.awt.Graphics g,
int index)
Paint the mark for a particular index |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Implementation of the PropertyChangeListener interface. |
void |
removeGutterListener(GutterListener l)
Remove a listener for gutter events. |
void |
removeMark(LineMark mark)
Remove a mark from the gutter. |
static void |
removeStaticGutterListener(GutterListener l)
Remove a static listener for gutter events. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
Part of the DocumentListener interface. |
void |
setEditor(EditorPane editor)
Set the editor to associate with this gutter. |
void |
setFont(java.awt.Font f)
This is only used to remain synchronized with the font height of the associated editor. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
This is the implementation of the ChangeListener interface. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.ArrayList gutterListeners
protected static java.util.ArrayList staticGutterListeners
public static int GUTTERWIDTH
protected int clickRow
Constructor Detail |
public Gutter()
Method Detail |
public void setEditor(EditorPane editor)
editor
- The editor associated with this gutter.public EditorPane getEditor()
public void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
f
- The new font.public void addGutterListener(GutterListener l)
l
- the new listener.public void removeGutterListener(GutterListener l)
l
- the listener that should be removed.public static void addStaticGutterListener(GutterListener l)
l
- The new static listener.public static void removeStaticGutterListener(GutterListener l)
l
- The static listener that wants to be removed.protected void fireLineClicked(int line, java.awt.event.MouseEvent e)
line
- The 1-based index of the row that was clicked on.e
- The MouseEvent that caused the click.protected void fireLinesChanged()
public int getMarkLine(LineMark mark)
mark
- The mark of interest.public void addMark(int row, LineMark mark)
row
- The 1-based row at which to add the mark.mark
- The mark to add.public void removeMark(LineMark mark)
mark
- The mark to remove.public LineMark[] getMarks(int lineNumber)
lineNumber
- The 1-based index of the line of interest.public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
protected void paintMark(java.awt.Graphics g, int index)
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- The event describing what has changed.public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
e
- The event that describes the insert changes.public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
e
- The event that describes the remove changes.public void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
e
- The event that describes the changedUpdate changes.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- The event that describes the mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- The event that describes the mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- The event that describes the mouse event.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- The event that describes the mouse event.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- The event that describes the mouse event.public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- The event that describes the property change.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |