|
||||||||||
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
javax.swing.text.JTextComponent
javax.swing.JEditorPane
javax.swing.JTextPane
edu.rice.cs.drjava.ui.AbstractDJPane
public abstract class AbstractDJPane
This pane class for a SwingDocument.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JEditorPane |
---|
JEditorPane.AccessibleJEditorPane, JEditorPane.AccessibleJEditorPaneHTML, JEditorPane.JEditorPaneAccessibleHypertextSupport |
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
---|
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Nested classes/interfaces inherited from interface edu.rice.cs.drjava.config.OptionConstants |
---|
OptionConstants.AccessLevelChoices, OptionConstants.DefaultFont, OptionConstants.HeapSizeChoices, OptionConstants.LookAndFeels, OptionConstants.PlasticThemes, OptionConstants.VersionNotificationChoices |
Field Summary | |
---|---|
protected HighlightManager |
_highlightManager
|
protected HighlightManager.HighlightInfo |
_matchHighlight
Our current paren/brace/bracket matching highlight. |
protected CaretListener |
_matchListener
Looks for changes in the caret position to see if a paren/brace/bracket highlight is needed. |
protected static SwingDocument |
NULL_DOCUMENT
|
Fields inherited from class javax.swing.JEditorPane |
---|
HONOR_DISPLAY_PROPERTIES, W3C_LENGTH_UNITS |
Fields inherited from class javax.swing.text.JTextComponent |
---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
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 |
Method Summary | |
---|---|
protected void |
_addHighlight(int from,
int to)
Adds a highlight to the document. |
protected void |
_removePreviousHighlight()
Removes the previous highlight so document is cleared when caret position changes. |
static void |
disableAltCntlMetaChars(JTextComponent p)
Create a null default action for Cntl/Alt/Meta chars in the keymap for p. |
void |
dragEnter(DropTargetDragEvent dropTargetDragEvent)
User dragged something into the component. |
void |
dragExit(DropTargetEvent dropTargetEvent)
|
void |
dragOver(DropTargetDragEvent dropTargetDragEvent)
|
void |
drop(DropTargetDropEvent dropTargetDropEvent)
User dropped something on the component. |
void |
dropActionChanged(DropTargetDragEvent dropTargetDragEvent)
|
abstract DJDocument |
getDJDocument()
Returns the DJDocument held by the pane. |
int |
getScrollableUnitIncrement(Rectangle visibleRectangle,
int orientation,
int direction)
|
void |
indent()
Runs indent(int) with a default value of Indenter.IndentReason.OTHER |
void |
indent(Indenter.IndentReason reason)
Perform an indent either on the current line or on the given selected box of text. |
protected abstract void |
indentLines(int selStart,
int selEnd,
Indenter.IndentReason reason,
ProgressMonitor pm)
Indents the given selection, for the given reason, in the current document. |
protected abstract void |
matchUpdate(int offset)
Updates the document location and checks caret position to see if it needs to set or remove a highlight from the document. |
void |
setCaretPos(int pos)
A length checked version of setCaretPosition(int pos) that ensures pos is within the DJDocument. |
protected abstract boolean |
shouldIndent(int selStart,
int selEnd)
Returns true if the indent is to be performed. |
protected abstract void |
updateStatusField()
Updates status fields in the main frame (title bar, selected file name) when document is modified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile HighlightManager _highlightManager
protected final CaretListener _matchListener
protected volatile HighlightManager.HighlightInfo _matchHighlight
protected static final SwingDocument NULL_DOCUMENT
Method Detail |
---|
public static void disableAltCntlMetaChars(JTextComponent p)
protected void _addHighlight(int from, int to)
from
- start of highlightto
- end of highlightprotected abstract void matchUpdate(int offset)
offset
- the new offset of the caretprotected abstract void updateStatusField()
protected void _removePreviousHighlight()
public void setCaretPos(int pos)
public int getScrollableUnitIncrement(Rectangle visibleRectangle, int orientation, int direction)
getScrollableUnitIncrement
in interface Scrollable
getScrollableUnitIncrement
in class JTextComponent
public void indent()
public void indent(Indenter.IndentReason reason)
reason
- the action that spawned this indent action. Enter presses are special, so that stars are inserted
when lines in a multiline comment are broken up.protected abstract void indentLines(int selStart, int selEnd, Indenter.IndentReason reason, ProgressMonitor pm)
selStart
- - the selection startselEnd
- - the selection endreason
- - the reason for the indentpm
- - the ProgressMonitor used by the indenterprotected abstract boolean shouldIndent(int selStart, int selEnd)
selStart
- - the selection startselEnd
- - the selection endpublic abstract DJDocument getDJDocument()
public void dragEnter(DropTargetDragEvent dropTargetDragEvent)
dragEnter
in interface DropTargetListener
public void dragExit(DropTargetEvent dropTargetEvent)
dragExit
in interface DropTargetListener
public void dragOver(DropTargetDragEvent dropTargetDragEvent)
dragOver
in interface DropTargetListener
public void dropActionChanged(DropTargetDragEvent dropTargetDragEvent)
dropActionChanged
in interface DropTargetListener
public void drop(DropTargetDropEvent dropTargetDropEvent)
drop
in interface DropTargetListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |