|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.ui.AbstractConsoleController
edu.rice.cs.drjava.ui.InteractionsController
public class InteractionsController
This class installs listeners and actions between an InteractionsDocument (the model) and an InteractionsPane (the view). We may want to refactor this class into a different package.
(The PopupConsole was introduced in version 1.29 of this file and subsequently removed.)
| Nested Class Summary | |
|---|---|
static interface |
InteractionsController.ConsoleStateListener
A listener interface that allows for others outside the interactions controller to be notified when the input console is enabled in the interactions pane. |
| Field Summary | |
|---|---|
protected InputListener |
_inputListener
Listens for input requests from System.in, displaying an input box as needed. |
static String |
INPUT_BOX_STYLE
Style for System.in box |
static String |
INPUT_BOX_SYMBOL
The symbol used in the document for the input box. |
| Fields inherited from class edu.rice.cs.drjava.ui.AbstractConsoleController |
|---|
_defaultStyle, _interactionsDJDocument, _pane, _systemErrStyle, _systemOutStyle |
| Constructor Summary | |
|---|---|
InteractionsController(InteractionsModel model,
InteractionsDJDocument adapter)
Glue together the given model and a new view. |
|
InteractionsController(InteractionsModel model,
InteractionsDJDocument adapter,
InteractionsPane pane)
Glue together the given model and view. |
|
| Method Summary | |
|---|---|
protected void |
_addDocumentStyles()
Adds AttributeSets as named styles to the document adapter. |
protected void |
_setupModel()
Adds listeners to the model. |
protected void |
_setupView()
Adds actions to the view. |
protected void |
_updateStyles(AttributeSet newSet)
Updates all document styles with the attributes contained in newSet. |
void |
addConsoleStateListener(InteractionsController.ConsoleStateListener listener)
|
ConsoleDocument |
getConsoleDoc()
Allows the abstract superclass to use the document. |
InteractionsDocument |
getDocument()
Accessor method for the InteractionsDocument. |
InputListener |
getInputListener()
Gets the input listener for console input requests. |
InteractionsModel |
getInteractionsModel()
Accessor method for the InteractionsModel. |
void |
insertConsoleText(String input)
Inserts text into the console. |
void |
interruptConsoleInput()
Forces console input to complete without the user hitting |
void |
removeConsoleStateListener(InteractionsController.ConsoleStateListener listener)
|
| Methods inherited from class edu.rice.cs.drjava.ui.AbstractConsoleController |
|---|
_busy, _init, getDocumentAdapter, getPane, resetView, setDefaultFont, setDefaultFont, setDefaultFont, setNextPaneAction, setPrevPaneAction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String INPUT_BOX_STYLE
public static final String INPUT_BOX_SYMBOL
protected volatile InputListener _inputListener
| Constructor Detail |
|---|
public InteractionsController(InteractionsModel model,
InteractionsDJDocument adapter)
model - An InteractionsModeladapter - InteractionsDJDocument being used by the model's doc
public InteractionsController(InteractionsModel model,
InteractionsDJDocument adapter,
InteractionsPane pane)
model - An InteractionsModeladapter - InteractionsDJDocument being used by the model's docpane - An InteractionsPane| Method Detail |
|---|
public void addConsoleStateListener(InteractionsController.ConsoleStateListener listener)
public void removeConsoleStateListener(InteractionsController.ConsoleStateListener listener)
public InputListener getInputListener()
public void interruptConsoleInput()
UnsupportedOperationException - If the interactions pane is not receiving console inputpublic void insertConsoleText(String input)
input - The text to insert into the console input box
UnsupportedOperationException - If the the interactions pane is not receiving console inputpublic InteractionsModel getInteractionsModel()
public ConsoleDocument getConsoleDoc()
getConsoleDoc in class AbstractConsoleControllerpublic InteractionsDocument getDocument()
protected void _addDocumentStyles()
_addDocumentStyles in class AbstractConsoleControllerprotected void _updateStyles(AttributeSet newSet)
_updateStyles in class AbstractConsoleControllernewSet - Style containing new attributes to use.protected void _setupModel()
_setupModel in class AbstractConsoleControllerprotected void _setupView()
_setupView in class AbstractConsoleController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||