java.lang.Object
de.grogra.pf.ui.swing.PanelSupport
de.grogra.pf.ui.swing.JConsole
- All Implemented Interfaces:
RegistryContext,Console,Context,Panel,Synchronizer.Callback,Disposable,ActionListener,KeyListener,MouseListener,PropertyChangeListener,EventListener
public class JConsole
extends PanelSupport
implements Console, KeyListener, MouseListener, ActionListener, PropertyChangeListener
A JFC/Swing based console for the BeanShell desktop.
This is a descendant of the old AWTConsole.
Improvements by: Mark Donszelmann invalid input: '<'Mark.Donszelmann@cern.ch>
including Cut invalid input: '&' Paste
Improvements by: Daniel Leuck
including Color and Image support, key press bug workaround
Adaptation for GroIMP by Ole Kniemeyer
Adaptation for GroIMP by mh
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.pf.ui.Console
Console.ConsoleWriter -
Field Summary
Fields inherited from class de.grogra.pf.ui.swing.PanelSupport
mapProducer, MIN_UNUSED_ACTION, sync, wsFields inherited from interface de.grogra.pf.ui.Console
USE_LAF_COLORFields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) voidclear()Clears the console.protected voidvoidEnterstextas if the user had typed this text.getErr()This method returns aConsoleWriterwhich is used to write to the console.getIn()This method returns aReaderwhich can be used to obtain the textual input from the user.getOut()This method returns aConsoleWriterwhich is used to write to the console.getStyle()voidvoidvoidvoidmouseClicked(MouseEvent event) voidmouseEntered(MouseEvent event) voidmouseExited(MouseEvent event) voidmousePressed(MouseEvent event) voidmouseReleased(MouseEvent event) voidvoidvoidvoidsetStyle(String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline) voidsetStyle(AttributeSet attributes) voidsetStyle(AttributeSet attributes, boolean overWrite) toString()Methods inherited from class de.grogra.pf.ui.swing.PanelSupport
checkClose, checkClose, configure, dispose, executeCheckClose, getComponent, getContent, getDecorator, getMenu, getPanel, getPanelId, getRegistry, getUIPropertyMap, getWindow, getWorkbench, hide, initDecorator, initialize, resolve, run, setContent, setCursor, setMenu, showMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanel, getWindow, getWorkbenchMethods inherited from interface de.grogra.util.Disposable
disposeMethods inherited from interface de.grogra.pf.ui.Panel
checkClose, getContent, getDecorator, getMenu, getPanelId, getUIPropertyMap, initDecorator, initialize, resolve, setContent, setCursor, setMenu, show
-
Constructor Details
-
JConsole
public JConsole()
-
-
Method Details
-
disposeImpl
protected void disposeImpl()- Overrides:
disposeImplin classPanelSupport
-
getIn
Description copied from interface:ConsoleThis method returns aReaderwhich can be used to obtain the textual input from the user. -
getOut
Description copied from interface:ConsoleThis method returns aConsoleWriterwhich is used to write to the console. It should be used for normal messages. -
getErr
Description copied from interface:ConsoleThis method returns aConsoleWriterwhich is used to write to the console. It should be used for error messages. Implementations should use a different color to highlight the characters which are written through this writer. -
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
enter
Description copied from interface:ConsoleEnterstextas if the user had typed this text. -
clear
public void clear()Description copied from interface:ConsoleClears the console. -
print
-
setStyle
-
setStyle
-
setStyle
-
setStyle
-
setStyle
public AttributeSet setStyle(String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline) -
setStyle
-
setStyle
-
getStyle
-
setFont
-
toString
- Overrides:
toStringin classPanelSupport
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
setNameCompletion
- Specified by:
setNameCompletionin interfaceConsole
-