|
|||||||||
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 |
Field Summary | |
protected int |
clickRow
|
protected java.util.ArrayList |
gutterListeners
|
static int |
GUTTERWIDTH
|
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 |
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 gutter events. |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
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)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
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)
|
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 listener for gutter events. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
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)
|
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,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintImmediately,
paintImmediately,
print,
printAll,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
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,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
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,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
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)
public EditorPane getEditor()
public void setFont(java.awt.Font f)
public void addGutterListener(GutterListener l)
public void removeGutterListener(GutterListener l)
public static void addStaticGutterListener(GutterListener l)
public static void removeStaticGutterListener(GutterListener l)
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()
protected void paintComponent(java.awt.Graphics g)
protected void paintMark(java.awt.Graphics g, int index)
public void stateChanged(javax.swing.event.ChangeEvent e)
public void insertUpdate(javax.swing.event.DocumentEvent e)
public void removeUpdate(javax.swing.event.DocumentEvent e)
public void changedUpdate(javax.swing.event.DocumentEvent e)
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
public void mouseClicked(java.awt.event.MouseEvent e)
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
public void propertyChange(java.beans.PropertyChangeEvent e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |