|
||||||||||
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
edu.rice.cs.drjava.ui.InteractionsPane
public abstract class InteractionsPane
The view component for repl interaction.
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 Runnable |
_beep
A runnable object that causes the editor to beep. |
protected Keymap |
_keymap
The custom keymap for the interactions pane. |
Fields inherited from class edu.rice.cs.drjava.ui.AbstractDJPane |
---|
_highlightManager, _matchHighlight, _matchListener, 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 |
Constructor Summary | |
---|---|
InteractionsPane(InteractionsDJDocument doc)
Creates an InteractionsPane with the given document. |
|
InteractionsPane(String keymapName,
InteractionsDJDocument doc)
Creates an InteractionsPane with the given document. |
Method Summary | |
---|---|
void |
addActionForKeyStroke(KeyStroke stroke,
Action action)
Assigns the given keystroke to the given action in this pane. |
protected EditorKit |
createDefaultEditorKit()
Overriding this method ensures that all new documents created in this editor pane use our editor kit (and thus our model). |
Runnable |
getBeep()
Returns a runnable object that beeps to the user. |
DJDocument |
getDJDocument()
Returns the DJDocument held by the pane. |
abstract int |
getPromptPos()
Gets the current prompt position |
void |
highlightError(int offset,
int length)
Highlights the given text with error highlight. |
protected void |
indentLines(int selStart,
int selEnd,
Indenter.IndentReason reason,
ProgressMonitor pm)
Indent the given selection, for the given reason, in the current document. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
We lost ownership of what we put in the clipboard. |
protected void |
matchUpdate(int offset)
Updates the current location and highlight (if one exists). |
protected void |
paintComponent(Graphics g)
Enable anti-aliased text by overriding paintComponent. |
void |
processKeyEvent(KeyEvent e)
Widens the visibilitly of the processKeyEvent method; it is protected in the superclass. |
void |
setBeep(Runnable beep)
Sets this pane's beep to be a different runnable object. |
protected boolean |
shouldIndent(int selStart,
int selEnd)
Returns true if the indent is to be performed. |
protected void |
updateStatusField()
Updates status fields in the main frame (title bar, selected file name) when document is modified. |
Methods inherited from class edu.rice.cs.drjava.ui.AbstractDJPane |
---|
_addHighlight, _removePreviousHighlight, disableAltCntlMetaChars, dragEnter, dragExit, dragOver, drop, dropActionChanged, getScrollableUnitIncrement, indent, indent, setCaretPos |
Methods inherited from class javax.swing.JTextPane |
---|
addStyle, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getStyle, getStyledDocument, getStyledEditorKit, getUIClassID, insertComponent, insertIcon, paramString, removeStyle, replaceSelection, setCharacterAttributes, setDocument, setEditorKit, setLogicalStyle, setParagraphAttributes, setStyledDocument |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Keymap _keymap
protected Runnable _beep
Constructor Detail |
---|
public InteractionsPane(InteractionsDJDocument doc)
doc
- StyledDocument containing the interactions history.public InteractionsPane(String keymapName, InteractionsDJDocument doc)
keymapName
- the name of the keymap for this panedoc
- StyledDocument containing the interactions history.Method Detail |
---|
public Runnable getBeep()
public void lostOwnership(Clipboard clipboard, Transferable contents)
lostOwnership
in interface ClipboardOwner
public void processKeyEvent(KeyEvent e)
processKeyEvent
in class JComponent
public void addActionForKeyStroke(KeyStroke stroke, Action action)
stroke
- keystroke that triggers the actionaction
- Action to performpublic void setBeep(Runnable beep)
beep
- Runnable command to notify the userpublic void highlightError(int offset, int length)
offset
- the offset in the textlength
- the length of the error to highlightprotected EditorKit createDefaultEditorKit()
createDefaultEditorKit
in class JTextPane
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
public DJDocument getDJDocument()
getDJDocument
in class AbstractDJPane
protected void matchUpdate(int offset)
matchUpdate
in class AbstractDJPane
offset
- the new offset of the caretprotected void updateStatusField()
updateStatusField
in class AbstractDJPane
protected void indentLines(int selStart, int selEnd, Indenter.IndentReason reason, ProgressMonitor pm)
indentLines
in class AbstractDJPane
selStart
- - the selection startselEnd
- - the selection endreason
- - the reason for the indentpm
- - the ProgressMonitor used by the indenterprotected boolean shouldIndent(int selStart, int selEnd)
shouldIndent
in class AbstractDJPane
selStart
- - the selection startselEnd
- - the selection endpublic abstract int getPromptPos()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |