|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.gui.Console
hades.gui.JConsole
A Swing-based message console. Note: This class encapsulates calls to println(), message() and consoleMessage() into a wrapper to SwingUtilities.invokeLater() if necessary, in order to comply with the Swing single-thread rule.
Nested Class Summary | |
class |
JConsole.Timer
|
class |
JConsole.Updater
|
Nested classes inherited from class hades.gui.Console |
Console.LogManager, Console.WindowCloser |
Field Summary |
Fields inherited from class hades.gui.Console |
logManager, messagePopupLevel, MSG_ERROR, MSG_FATAL, MSG_INFO, MSG_UNKNOWN, MSG_WARNING, POPUP_ALWAYS, POPUP_ERROR, POPUP_FATAL, POPUP_INFO, POPUP_NEVER, POPUP_WARNING |
Constructor Summary | |
JConsole()
|
|
JConsole(java.lang.String title)
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
checkShouldSetVisible(java.lang.String s)
parse the first chars of message string 's' to check whether it is an info, warning, error, or fatal message: "-I-", "-W-", "-E-", "-F-" If the message level is greater than the 'popup level', make the console visible and bring in toFront(). |
void |
cleanup()
an utility method to limit the number of lines. |
void |
consoleMessage(java.lang.String msg)
|
int |
countLines()
count the number of lines in the console window. |
void |
destroy()
reset the reference to our singleton JConsole object, but keep the GUI and logging still alive for use by objects that have kept their reference. |
java.awt.Frame |
getFrame()
return a reference to the Frame window used by this JConsole. |
static JConsole |
getJConsole()
a singleton method: get a reference to a system-wide JConsole, which is created on the first call. |
void |
getJIcon()
load and set the icon image for this console window. |
java.lang.String |
getLogFileName()
|
int |
getMaxLines()
|
void |
initialize(java.lang.String s)
initialize JConsole position and size from a String in xywh format |
static void |
main(java.lang.String[] argv)
|
void |
message(java.lang.String s)
|
void |
println(java.lang.String s)
print a line of text to the console, involving black magic. |
void |
setDefaultLogFileNameAndEnable()
|
void |
setLogFileEnable(boolean b)
|
void |
setLogFileName(java.lang.String name)
|
void |
setMaxLines(int m)
|
void |
setMessagePopupLevel(int i)
|
void |
setText(java.lang.String s)
|
void |
show()
|
Methods inherited from class hades.gui.Console |
closeFlushLogStream, createNewConsole, enableFileLoggingGUI, finalize, getConsole, getIcon, openLogStream, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JConsole()
public JConsole(java.lang.String title)
Method Detail |
public static JConsole getJConsole()
public void destroy()
destroy
in class Console
public java.awt.Frame getFrame()
getFrame
in class Console
public void show()
show
in class Console
public void getJIcon()
public void initialize(java.lang.String s)
initialize
in class Console
public void setMaxLines(int m)
setMaxLines
in class Console
public int getMaxLines()
getMaxLines
in class Console
public java.lang.String getLogFileName()
getLogFileName
in class Console
public void setDefaultLogFileNameAndEnable()
setDefaultLogFileNameAndEnable
in class Console
public void setLogFileName(java.lang.String name)
setLogFileName
in class Console
public void setLogFileEnable(boolean b)
setLogFileEnable
in class Console
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class Console
public void println(java.lang.String s)
println
in class Console
public void consoleMessage(java.lang.String msg)
consoleMessage
in interface ConsoleMessage
consoleMessage
in class Console
public void message(java.lang.String s)
message
in class Console
public void checkShouldSetVisible(java.lang.String s)
checkShouldSetVisible
in class Console
public void setMessagePopupLevel(int i)
setMessagePopupLevel
in class Console
public void setText(java.lang.String s)
setText
in class Console
public void cleanup()
cleanup
in class Console
public int countLines()
countLines
in class Console
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |