|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freehep.application.studio.Plugin
org.freehep.jas.plugin.console.ConsolePlugin
public class ConsolePlugin
The main class of the console plugin
Constructor Summary | |
---|---|
ConsolePlugin()
|
Method Summary | |
---|---|
Console |
createConsole(String name,
Icon icon)
Create a new console. |
Console |
createConsole(String name,
Icon icon,
org.freehep.swing.popup.HasPopupItems popupItems)
Create a new console, with extra popup items. |
Console |
getConsole(String name)
Get a pointer to an existing console with a given name. |
ConsoleOutputStream |
getConsoleOutputStream(String name,
Icon icon)
Creates an output stream associated to a named console area. |
ConsoleOutputStream |
getConsoleOutputStream(String name,
Icon icon,
AttributeSet set)
Create an attributed output stream |
org.freehep.application.mdi.PageContext |
getPageContextForConsole(Console console)
Gets the page context corresponding to a given console. |
protected void |
init()
|
void |
redirectStandardOutputOnThreadToConsole(Thread thread,
ConsoleOutputStream out)
Redirects output to System.out for a specific thread to a given console |
void |
showConsole(Console console)
Requests that a given console be made visible |
Methods inherited from class org.freehep.application.studio.Plugin |
---|
addMenu, applicationVisible, canBeShutDown, getApplication, postInit, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConsolePlugin()
Method Detail |
---|
public Console getConsole(String name)
ConsoleService
getConsole
in interface ConsoleService
name
- The name to search for
null
if no console by this name
existspublic Console createConsole(String name, Icon icon)
ConsoleService
createConsole
in interface ConsoleService
name
- The name of the newly created consoleicon
- An icon to associate with the console, or null
for no icon.
public Console createConsole(String name, Icon icon, org.freehep.swing.popup.HasPopupItems popupItems)
ConsoleService
createConsole
in interface ConsoleService
name
- The name of the newly created consoleicon
- An icon to associate with the console, or null
for no icon.popupItems
- Allows extra popup items to be attached to console.
public ConsoleOutputStream getConsoleOutputStream(String name, Icon icon) throws IOException
ConsoleService
getConsoleOutputStream
in interface ConsoleService
name
- The name of the console.icon
- The Icon to be used if a new console is created,
or null
.
IOException
- If an IO error occurspublic ConsoleOutputStream getConsoleOutputStream(String name, Icon icon, AttributeSet set) throws IOException
ConsoleService
getConsoleOutputStream
in interface ConsoleService
name
- The name of the Consoleicon
- The icon to use if a new console is created,
or null
set
- The attributes for text created using this outputstream,
or null
for default attributes.
IOException
- If an IO error occursConsoleService.getConsoleOutputStream(String, Icon)
protected void init() throws SAXException, IOException
init
in class org.freehep.application.studio.Plugin
SAXException
IOException
public void redirectStandardOutputOnThreadToConsole(Thread thread, ConsoleOutputStream out)
ConsoleService
redirectStandardOutputOnThreadToConsole
in interface ConsoleService
thread
- The thread for which redirection should applyout
- The output stream to redirect topublic void showConsole(Console console)
ConsoleService
showConsole
in interface ConsoleService
console
- The console to be made visiblepublic org.freehep.application.mdi.PageContext getPageContextForConsole(Console console)
ConsoleService
getPageContextForConsole
in interface ConsoleService
console
- The console
null if the console has been closed).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |