|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
System
Applet.
public class System
run main in a simulated terminal.
As long as there is no static or explicit reference to System
this will spoof standard i/o to and from a text area.
The applet should be a singleton because the i/o connections are static. It is assumed that the AWT components are thread-safe.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JApplet |
|---|
JApplet.AccessibleJApplet |
| Nested classes/interfaces inherited from class java.applet.Applet |
|---|
Applet.AccessibleApplet |
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
Panel.AccessibleAWTPanel |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JTextField |
commandLine
Deprecated. command line field. |
protected String |
commandLineText
Deprecated. command line text. |
static PrintStream |
err
Deprecated. spoof System.err. |
static InputStream |
in
Deprecated. spoof System.in. |
protected Runnable |
main
Deprecated. client body. |
protected String |
mainClass
Deprecated. fully qualified main class name. |
static PrintStream |
out
Deprecated. spoof System.out. |
protected JButton |
startStop
Deprecated. start/stop button. |
protected JTextArea |
textArea
Deprecated. terminal screen. |
protected Thread |
thread
Deprecated. client thread. |
| Fields inherited from class javax.swing.JApplet |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| 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 | |
|---|---|
System()
Deprecated. |
|
| Method Summary | |
|---|---|
static void |
arraycopy(Object src,
int srcPos,
Object dest,
int destPos,
int length)
Deprecated. delegated. |
static long |
currentTimeMillis()
Deprecated. delegated. |
static void |
exit(int code)
Deprecated. |
static void |
gc()
Deprecated. delegated. |
static String |
getenv(String s)
Deprecated. deprecated, returns null. |
protected int |
getInteger(String key,
int fallback)
Deprecated. get a defaulted integer parameter value. |
static Properties |
getProperties()
Deprecated. delegated. |
static String |
getProperty(String s)
Deprecated. delegated. |
static String |
getProperty(String s,
String d)
Deprecated. delegated. |
static SecurityManager |
getSecurityManager()
Deprecated. delegated. |
protected String |
getString(String key,
String fallback)
Deprecated. get a defaulted string parameter value. |
static int |
identityHashCode(Object o)
Deprecated. delegated. |
void |
init()
Deprecated. configure, establish control layer. |
static void |
load(String s)
Deprecated. delegated. |
static void |
loadLibrary(String s)
Deprecated. delegated. |
static String |
mapLibraryName(String s)
Deprecated. delegated. |
void |
run()
Deprecated. (re)connect and (re)start execution. |
static void |
runFinalization()
Deprecated. delegated. |
static void |
runFinalizersOnExit(boolean b)
Deprecated. deprecated, ignored. |
void |
running(boolean state)
Deprecated. change running state. |
static void |
setErr(PrintStream err)
Deprecated. spoofed. |
static void |
setIn(InputStream in)
Deprecated. spoofed. |
static void |
setOut(PrintStream out)
Deprecated. spoofed. |
static void |
setProperties(Properties p)
Deprecated. delegated. |
static String |
setProperty(String s,
String v)
Deprecated. delegated. |
static void |
setSecurityManager(SecurityManager sm)
Deprecated. delegated. |
void |
start()
Deprecated. try to focus on command line. |
void |
stop()
Deprecated. close page, disconnect (and try to stop execution). |
| Methods inherited from class javax.swing.JApplet |
|---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
|---|
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static InputStream in
System.in.
public static PrintStream out
System.out.
public static PrintStream err
System.err.
protected String mainClass
protected JTextField commandLine
protected String commandLineText
protected JButton startStop
protected JTextArea textArea
protected Thread thread
run() to restart, else call stop() to stop.
protected Runnable main
| Constructor Detail |
|---|
public System()
| Method Detail |
|---|
public void init()
init in class Appletpublic void start()
start in class Appletpublic void run()
main if possible; connection must exist first
in case there are static references to System.
This is called from the event thread only.
public void running(boolean state)
state - true: starting main, false: stopping main.public void stop()
stop in class Applet
protected int getInteger(String key,
int fallback)
protected String getString(String key,
String fallback)
public static void setIn(InputStream in)
public static void setOut(PrintStream out)
public static void setErr(PrintStream err)
public static void setSecurityManager(SecurityManager sm)
public static SecurityManager getSecurityManager()
public static long currentTimeMillis()
public static void arraycopy(Object src,
int srcPos,
Object dest,
int destPos,
int length)
public static int identityHashCode(Object o)
public static Properties getProperties()
public static void setProperties(Properties p)
public static String getProperty(String s)
public static String getProperty(String s,
String d)
public static String setProperty(String s,
String v)
public static String getenv(String s)
public static void exit(int code)
{@link - java.lang.ThreadDeath} to kill the current thread.public static void gc()
public static void runFinalization()
public static void runFinalizersOnExit(boolean b)
public static void load(String s)
public static void loadLibrary(String s)
public static String mapLibraryName(String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||