edu.rice.cs.drjava.ui
Class InteractionsPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.text.JTextComponent
                  extended by javax.swing.JEditorPane
                      extended by javax.swing.JTextPane
                          extended by edu.rice.cs.drjava.ui.AbstractDJPane
                              extended by edu.rice.cs.drjava.ui.InteractionsPane
All Implemented Interfaces:
OptionConstants, ClipboardOwner, DropTargetListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, Scrollable

public abstract class InteractionsPane
extends AbstractDJPane
implements OptionConstants, ClipboardOwner

The view component for repl interaction.

Version:
$Id: InteractionsPane.java 4691 2008-12-02 23:33:27Z dlsmith $
See Also:
Serialized Form

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 edu.rice.cs.drjava.config.OptionConstants
accessLevelChoices, ALLOW_PRIVATE_ACCESS, ALWAYS_COMPILE_BEFORE_JUNIT, ALWAYS_SAVE_BEFORE_COMPILE, ALWAYS_SAVE_BEFORE_DEBUG, ALWAYS_SAVE_BEFORE_JAVADOC, ALWAYS_SAVE_BEFORE_RUN, apiJavadocChoices, apiJavadocVersionChoices, AUTO_CLOSE_COMMENTS, BACKUP_FILES, BOOKMARK_COLOR, BROWSER_FILE, BROWSER_HISTORY_MAX_SIZE, BROWSER_STRING, choices, CLIPBOARD_HISTORY_SIZE, COMPILER_ERROR_COLOR, DEBUG_BREAKPOINT_COLOR, DEBUG_BREAKPOINT_DISABLED_COLOR, DEBUG_MESSAGE_COLOR, DEBUG_PANEL_HEIGHT, DEBUG_SOURCEPATH, DEBUG_STEP_DRJAVA, DEBUG_STEP_EXCLUDE, DEBUG_STEP_INTERPRETER, DEBUG_STEP_JAVA, DEBUG_THREAD_COLOR, DEFINITIONS_BACKGROUND_COLOR, DEFINITIONS_COMMENT_COLOR, DEFINITIONS_DOUBLE_QUOTED_COLOR, DEFINITIONS_KEYWORD_COLOR, DEFINITIONS_MATCH_COLOR, DEFINITIONS_NORMAL_COLOR, DEFINITIONS_NUMBER_COLOR, DEFINITIONS_SINGLE_QUOTED_COLOR, DEFINITIONS_TYPE_COLOR, DETACH_DEBUGGER, DETACH_TABBEDPANES, DIALOG_AUTOIMPORT_ENABLED, DIALOG_AUTOIMPORT_STATE, DIALOG_AUTOIMPORT_STORE_POSITION, DIALOG_CLIPBOARD_HISTORY_STATE, DIALOG_CLIPBOARD_HISTORY_STORE_POSITION, DIALOG_COMPLETE_JAVAAPI, DIALOG_COMPLETE_SCAN_CLASS_FILES, DIALOG_COMPLETE_WORD_STATE, DIALOG_COMPLETE_WORD_STORE_POSITION, DIALOG_DEBUGFRAME_STATE, DIALOG_DEBUGFRAME_STORE_POSITION, DIALOG_DRJAVA_ERROR_POPUP_ENABLED, DIALOG_DRJAVA_SURVEY_ENABLED, DIALOG_EDITEXTERNALPROCESS_STATE, DIALOG_EDITEXTERNALPROCESS_STORE_POSITION, DIALOG_EXTERNALPROCESS_STATE, DIALOG_EXTERNALPROCESS_STORE_POSITION, DIALOG_GOTOFILE_FULLY_QUALIFIED, DIALOG_GOTOFILE_STATE, DIALOG_GOTOFILE_STORE_POSITION, DIALOG_JAROPTIONS_STATE, DIALOG_JAROPTIONS_STORE_POSITION, DIALOG_LIGHTWEIGHT_PARSING_DELAY, DIALOG_OPENJAVADOC_STATE, DIALOG_OPENJAVADOC_STORE_POSITION, DIALOG_TABBEDPANES_STATE, DIALOG_TABBEDPANES_STORE_POSITION, DOC_LIST_WIDTH, DRJAVA_ERRORS_BUTTON_COLOR, DRJAVA_SURVEY_DAYS, DRJAVA_USE_FORCE_QUIT, EXTERNAL_SAVED_CMDLINES, EXTERNAL_SAVED_COUNT, EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES, EXTERNAL_SAVED_NAMES, EXTERNAL_SAVED_PREFIX, EXTERNAL_SAVED_WORKDIRS, EXTPROCESS_FILE_EXTENSION, EXTPROCESS_FILE_NAME_INSIDE_JAR, EXTRA_CLASSPATH, EXTRA_COMPILERS, FIND_ALL_DOCUMENTS, FIND_MATCH_CASE, FIND_NO_COMMENTS_STRINGS, FIND_NO_TEST_CASES, FIND_REPLACE_FOCUS_IN_DEFPANE, FIND_RESULTS_COLOR1, FIND_RESULTS_COLOR2, FIND_RESULTS_COLOR3, FIND_RESULTS_COLOR4, FIND_RESULTS_COLOR5, FIND_RESULTS_COLOR6, FIND_RESULTS_COLOR7, FIND_RESULTS_COLOR8, FIND_RESULTS_COLORS, FIND_SEARCH_BACKWARDS, FIND_WHOLE_WORD, FOLLOW_FILE_DELAY, FOLLOW_FILE_LINES, FONT_DOCLIST, FONT_LINE_NUMBERS, FONT_MAIN, FONT_TOOLBAR, FORCE_TEST_SUFFIX, heapSizeChoices, HISTORY_MAX_SIZE, INDENT_LEVEL, INTERACTIONS_ERROR_COLOR, INTERACTIONS_EXIT_PROMPT, INTERACTIONS_RESET_PROMPT, JAVAC_LOCATION, JAVADOC_1_3_LINK, JAVADOC_1_3_TEXT, JAVADOC_1_4_LINK, JAVADOC_1_4_TEXT, JAVADOC_1_5_LINK, JAVADOC_1_5_TEXT, JAVADOC_1_6_LINK, JAVADOC_1_6_TEXT, JAVADOC_ACCESS_LEVEL, JAVADOC_API_REF_VERSION, JAVADOC_AUTO_TEXT, JAVADOC_CUSTOM_PARAMS, JAVADOC_DESTINATION, JAVADOC_FROM_ROOTS, JAVADOC_LINK_VERSION, JAVADOC_NONE_TEXT, JAVADOC_PROMPT_FOR_DESTINATION, KEY_ABOUT, KEY_BACKWARD, KEY_BEGIN_DOCUMENT, KEY_BEGIN_LINE, KEY_BOOKMARKS_PANEL, KEY_BOOKMARKS_TOGGLE, KEY_BROWSE_BACK, KEY_BROWSE_FORWARD, KEY_CHECK_NEW_VERSION, KEY_CLEAR_CONSOLE, KEY_CLEAR_HISTORY, KEY_CLEAR_LINE, KEY_CLOSE_ALL_FILES, KEY_CLOSE_FILE, KEY_CLOSE_PROJECT, KEY_CLOSING_BRACE, KEY_COMMENT_LINES, KEY_COMPILE, KEY_COMPILE_ALL, KEY_COMPLETE_FILE, KEY_COPY, KEY_CUT, KEY_CUT_LINE, KEY_DEBUG_BREAKPOINT_PANEL, KEY_DEBUG_BREAKPOINT_TOGGLE, KEY_DEBUG_CLEAR_ALL_BREAKPOINTS, KEY_DEBUG_MODE_TOGGLE, KEY_DEBUG_RESUME, KEY_DEBUG_STEP_INTO, KEY_DEBUG_STEP_OUT, KEY_DEBUG_STEP_OVER, KEY_DELETE_NEXT, KEY_DELETE_PREVIOUS, KEY_DETACH_DEBUGGER, KEY_DETACH_TABBEDPANES, KEY_DOWN, KEY_DRJAVA_ERRORS, KEY_DRJAVA_SURVEY, KEY_END_DOCUMENT, KEY_END_LINE, KEY_EXEC_PROCESS, KEY_EXECUTE_HISTORY, KEY_EXPORT_OLD, KEY_FIND_NEXT, KEY_FIND_PREV, KEY_FIND_REPLACE, KEY_FOLLOW_FILE, KEY_FORCE_QUIT, KEY_FORWARD, KEY_GOTO_FILE, KEY_GOTO_FILE_UNDER_CURSOR, KEY_GOTO_LINE, KEY_HELP, KEY_JAVADOC_ALL, KEY_JAVADOC_CURRENT, KEY_LIFT_CURRENT_INTERACTION, KEY_LOAD_HISTORY_SCRIPT, KEY_NEW_FILE, KEY_NEW_TEST, KEY_NEXT_DOCUMENT, KEY_NEXT_PANE, KEY_NEXT_WORD, KEY_OPEN_FILE, KEY_OPEN_FOLDER, KEY_OPEN_JAVADOC, KEY_OPEN_JAVADOC_UNDER_CURSOR, KEY_OPEN_PROJECT, KEY_OPENING_BRACE, KEY_PAGE_DOWN, KEY_PAGE_SETUP, KEY_PAGE_UP, KEY_PASTE, KEY_PASTE_FROM_HISTORY, KEY_PREFERENCES, KEY_PREVIOUS_DOCUMENT, KEY_PREVIOUS_PANE, KEY_PREVIOUS_WORD, KEY_PRINT, KEY_PRINT_CONSOLE, KEY_PRINT_INTERACTIONS, KEY_PRINT_PREVIEW, KEY_QUICKSTART, KEY_QUIT, KEY_REDO, KEY_RENAME_FILE, KEY_RESET_INTERACTIONS, KEY_REVERT_FILE, KEY_RUN, KEY_RUN_MAIN, KEY_SAVE_ALL_FILES, KEY_SAVE_FILE, KEY_SAVE_FILE_AS, KEY_SAVE_HISTORY, KEY_SELECT_ALL, KEY_SHIFT_DELETE_NEXT, KEY_SHIFT_DELETE_PREVIOUS, KEY_TEST, KEY_TEST_ALL, KEY_UNCOMMENT_LINES, KEY_UNDO, KEY_UP, KEY_VIEW_INTERACTIONS_CLASSPATH, LANGUAGE_LEVEL, LAST_DIRECTORY, LAST_DRJAVA_SURVEY, LAST_DRJAVA_SURVEY_RESULT, LAST_INTERACTIONS_DIRECTORY, LAST_NEW_VERSION_NOTIFICATION, LIGHTWEIGHT_PARSING_ENABLED, LINEENUM_ENABLED, linkVersionChoices, LOOK_AND_FEEL, MASK, MASTER_JVM_ARGS, MASTER_JVM_XMX, NEW_VERSION_NOTIFICATION, NEW_VERSION_NOTIFICATION_CHOICES, NEW_VERSION_NOTIFICATION_DAYS, OLD_PROJECT_FILE_EXTENSION, OPEN_FOLDER_RECURSIVE, PLASTIC_THEMES, PROJECT_FILE_EXTENSION, PROMPT_BEFORE_CLEAN, QUIT_PROMPT, RECENT_FILES, RECENT_FILES_MAX_SIZE, RECENT_PROJECTS, REMOTE_CONTROL_ENABLED, REMOTE_CONTROL_PORT, RESET_CLEAR_CONSOLE, RUN_WITH_ASSERT, SHOW_CODE_PREVIEW_POPUPS, SHOW_DEBUG_CONSOLE, SHOW_DEPRECATION_WARNINGS, SHOW_FALLTHROUGH_WARNINGS, SHOW_FINALLY_WARNINGS, SHOW_PATH_WARNINGS, SHOW_SERIAL_WARNINGS, SHOW_SOURCE_WHEN_SWITCHING, SHOW_UNCHECKED_WARNINGS, SLAVE_JVM_ARGS, SLAVE_JVM_XMX, STICKY_INTERACTIONS_DIRECTORY, SYSTEM_ERR_COLOR, SYSTEM_IN_COLOR, SYSTEM_OUT_COLOR, TABS_HEIGHT, TEXT_ANTIALIAS, TOOLBAR_ENABLED, TOOLBAR_ICONS_ENABLED, TOOLBAR_TEXT_ENABLED, WARN_BREAKPOINT_OUT_OF_SYNC, WARN_CHANGE_LAF, WARN_CHANGE_THEME, WARN_DEBUG_MODIFIED_FILE, WARN_PATH_CONTAINS_POUND, WINDOW_HEIGHT, WINDOW_STATE, WINDOW_STORE_POSITION, WINDOW_WIDTH, WINDOW_X, WINDOW_Y
 
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 javax.swing.JEditorPane
addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitClassNameForContentType, getEditorKitForContentType, getHyperlinkListeners, getPage, getPreferredSize, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getStream, getText, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setContentType, setEditorKitForContentType, setPage, setPage, setText
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, 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, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_keymap

protected final Keymap _keymap
The custom keymap for the interactions pane.


_beep

protected Runnable _beep
A runnable object that causes the editor to beep.

Constructor Detail

InteractionsPane

public InteractionsPane(InteractionsDJDocument doc)
Creates an InteractionsPane with the given document. Uses default keymap name ("INTERACTIONS_KEYMAP")

Parameters:
doc - StyledDocument containing the interactions history.

InteractionsPane

public InteractionsPane(String keymapName,
                        InteractionsDJDocument doc)
Creates an InteractionsPane with the given document.

Parameters:
keymapName - the name of the keymap for this pane
doc - StyledDocument containing the interactions history.
Method Detail

getBeep

public Runnable getBeep()
Returns a runnable object that beeps to the user.


lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
We lost ownership of what we put in the clipboard.

Specified by:
lostOwnership in interface ClipboardOwner

processKeyEvent

public void processKeyEvent(KeyEvent e)
Widens the visibilitly of the processKeyEvent method; it is protected in the superclass.

Overrides:
processKeyEvent in class JComponent

addActionForKeyStroke

public void addActionForKeyStroke(KeyStroke stroke,
                                  Action action)
Assigns the given keystroke to the given action in this pane.

Parameters:
stroke - keystroke that triggers the action
action - Action to perform

setBeep

public void setBeep(Runnable beep)
Sets this pane's beep to be a different runnable object. Defaults to Toolkit.getDefaultToolkit().beep().

Parameters:
beep - Runnable command to notify the user

highlightError

public void highlightError(int offset,
                           int length)
Highlights the given text with error highlight.

Parameters:
offset - the offset in the text
length - the length of the error to highlight

createDefaultEditorKit

protected EditorKit createDefaultEditorKit()
Overriding this method ensures that all new documents created in this editor pane use our editor kit (and thus our model).

Overrides:
createDefaultEditorKit in class JTextPane

paintComponent

protected void paintComponent(Graphics g)
Enable anti-aliased text by overriding paintComponent.

Overrides:
paintComponent in class JComponent

getDJDocument

public DJDocument getDJDocument()
Returns the DJDocument held by the pane.

Specified by:
getDJDocument in class AbstractDJPane

matchUpdate

protected void matchUpdate(int offset)
Updates the current location and highlight (if one exists). Adds prompt position to prompt list. Assumes read lock and reduced locks on _doc are already held.

Specified by:
matchUpdate in class AbstractDJPane
Parameters:
offset - the new offset of the caret

updateStatusField

protected void updateStatusField()
Updates status fields in the main frame (title bar, selected file name) when document is modified.

Specified by:
updateStatusField in class AbstractDJPane

indentLines

protected void indentLines(int selStart,
                           int selEnd,
                           Indenter.IndentReason reason,
                           ProgressMonitor pm)
Indent the given selection, for the given reason, in the current document. Should only run in the event queuel

Specified by:
indentLines in class AbstractDJPane
Parameters:
selStart - - the selection start
selEnd - - the selection end
reason - - the reason for the indent
pm - - the ProgressMonitor used by the indenter

shouldIndent

protected boolean shouldIndent(int selStart,
                               int selEnd)
Returns true if the indent is to be performed. The code in the definitions pane prompts the user, but this requires a copy of mainframe, and a reason to do so. The user does not need to be prompted here. The cutoff in the definitions pane for the prompt is 10000 characters, which is unlikely to occur in the interactions pane very often if at all.

Specified by:
shouldIndent in class AbstractDJPane
Parameters:
selStart - - the selection start
selEnd - - the selection end

getPromptPos

public abstract int getPromptPos()
Gets the current prompt position