|
||||||||||
| 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.JTextArea
apps.SystemConsole
public class SystemConsole
Class to direct standard output and standard error to a JTextArea. This allows for easier clipboard operations etc.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Nested Class Summary | |
|---|---|
static class |
SystemConsole.Schemes
Class holding details of each scheme |
| Nested classes/interfaces inherited from class javax.swing.JTextArea |
|---|
JTextArea.AccessibleJTextArea |
| 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 |
| Field Summary | |
|---|---|
static int |
WRAP_STYLE_LINE
|
static int |
WRAP_STYLE_NONE
|
static int |
WRAP_STYLE_WORD
|
| 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 | |
|---|---|
SystemConsole()
|
|
| Method Summary | |
|---|---|
static JFrame |
getConsole()
Return the JFrame containing the console |
static int |
getFontSize()
Retrieve the current console font size (default 12 point) |
static int |
getFontStyle()
Retrieve the current console font style |
static int |
getScheme()
Retrieve the current console colour scheme |
static int |
getWrapStyle()
Retrieve the current console wrapping style |
static void |
init()
Initialise the system console ensuring both System.out and System.err streams are re-directed to the console's JTextArea |
static void |
setFontSize(int size)
Set the console font size |
static void |
setFontStyle(int style)
Set the console font style |
static void |
setScheme(int which)
Set the console colour scheme |
static void |
setWrapStyle(int style)
Set the console wrapping style to one of the following: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int WRAP_STYLE_NONE
public static final int WRAP_STYLE_LINE
public static final int WRAP_STYLE_WORD
| Constructor Detail |
|---|
public SystemConsole()
| Method Detail |
|---|
public static void init()
public static JFrame getConsole()
public static void setWrapStyle(int style)
style - one of the defined style attributes - one of
WRAP_STYLE_NONE No wrapping
WRAP_STYLE_LINE Wrap at end of line
WRAP_STYLE_WORD Wrap by word boundaries
public static int getWrapStyle()
WRAP_STYLE_NONE No wrapping
WRAP_STYLE_LINE Wrap at end of line
WRAP_STYLE_WORD Wrap by word boundaries (default)
public static void setFontSize(int size)
size - point size of font between 6 and 24 pointpublic static int getFontSize()
public static void setFontStyle(int style)
style - one of Font.BOLD, Font.ITALIC, Font.PLAIN (default)public static int getFontStyle()
Font.BOLD, Font.ITALIC, Font.PLAIN (default)public static void setScheme(int which)
which - the scheme to usepublic static int getScheme()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||