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 <Mark.Donszelmann@cern.ch>
including Cut & 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, ws
Fields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) void
clear()
Clears the console.protected void
void
Enterstext
as if the user had typed this text.getErr()
This method returns aConsoleWriter
which is used to write to the console.getIn()
This method returns aReader
which can be used to obtain the textual input from the user.getOut()
This method returns aConsoleWriter
which is used to write to the console.getStyle()
void
void
void
void
mouseClicked
(MouseEvent event) void
mouseEntered
(MouseEvent event) void
mouseExited
(MouseEvent event) void
mousePressed
(MouseEvent event) void
mouseReleased
(MouseEvent event) void
void
void
void
setStyle
(String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline) void
setStyle
(AttributeSet attributes) void
setStyle
(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, show
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanel, getWindow, getWorkbench
Methods inherited from interface de.grogra.util.Disposable
dispose
Methods 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:
disposeImpl
in classPanelSupport
-
getIn
Description copied from interface:Console
This method returns aReader
which can be used to obtain the textual input from the user. -
getOut
Description copied from interface:Console
This method returns aConsoleWriter
which is used to write to the console. It should be used for normal messages. -
getErr
Description copied from interface:Console
This method returns aConsoleWriter
which 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:
keyPressed
in interfaceKeyListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
enter
Description copied from interface:Console
Enterstext
as if the user had typed this text. -
clear
public void clear()Description copied from interface:Console
Clears 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:
toString
in classPanelSupport
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
setNameCompletion
- Specified by:
setNameCompletion
in interfaceConsole
-