Class System

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by System
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

Deprecated. Replaced by Applet.

public class System
extends JApplet

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.

See Also:
Serialized Form

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.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

in

public static InputStream in
Deprecated. 
spoof System.in.


out

public static PrintStream out
Deprecated. 
spoof System.out.


err

public static PrintStream err
Deprecated. 
spoof System.err.


mainClass

protected String mainClass
Deprecated. 
fully qualified main class name.


commandLine

protected JTextField commandLine
Deprecated. 
command line field.


commandLineText

protected String commandLineText
Deprecated. 
command line text.


startStop

protected JButton startStop
Deprecated. 
start/stop button.


textArea

protected JTextArea textArea
Deprecated. 
terminal screen.


thread

protected Thread thread
Deprecated. 
client thread. Invariant, monitored by this: if null, call run() to restart, else call stop() to stop.


main

protected Runnable main
Deprecated. 
client body.

Constructor Detail

System

public System()
Deprecated. 
Method Detail

init

public void init()
Deprecated. 
configure, establish control layer. This is called from the event thread only.

Overrides:
init in class Applet

start

public void start()
Deprecated. 
try to focus on command line.

Overrides:
start in class Applet

run

public void run()
Deprecated. 
(re)connect and (re)start execution. Create main if possible; connection must exist first in case there are static references to System. This is called from the event thread only.


running

public void running(boolean state)
Deprecated. 
change running state. This is forced into the event thread if necessary.

Parameters:
state - true: starting main, false: stopping main.

stop

public void stop()
Deprecated. 
close page, disconnect (and try to stop execution).

Overrides:
stop in class Applet

getInteger

protected int getInteger(String key,
                         int fallback)
Deprecated. 
get a defaulted integer parameter value.


getString

protected String getString(String key,
                           String fallback)
Deprecated. 
get a defaulted string parameter value.


setIn

public static void setIn(InputStream in)
Deprecated. 
spoofed.


setOut

public static void setOut(PrintStream out)
Deprecated. 
spoofed.


setErr

public static void setErr(PrintStream err)
Deprecated. 
spoofed.


setSecurityManager

public static void setSecurityManager(SecurityManager sm)
Deprecated. 
delegated.


getSecurityManager

public static SecurityManager getSecurityManager()
Deprecated. 
delegated.


currentTimeMillis

public static long currentTimeMillis()
Deprecated. 
delegated.


arraycopy

public static void arraycopy(Object src,
                             int srcPos,
                             Object dest,
                             int destPos,
                             int length)
Deprecated. 
delegated.


identityHashCode

public static int identityHashCode(Object o)
Deprecated. 
delegated.


getProperties

public static Properties getProperties()
Deprecated. 
delegated.


setProperties

public static void setProperties(Properties p)
Deprecated. 
delegated.


getProperty

public static String getProperty(String s)
Deprecated. 
delegated.


getProperty

public static String getProperty(String s,
                                 String d)
Deprecated. 
delegated.


setProperty

public static String setProperty(String s,
                                 String v)
Deprecated. 
delegated.


getenv

public static String getenv(String s)
Deprecated. 
deprecated, returns null.


exit

public static void exit(int code)
Deprecated. 
Throws:
{@link - java.lang.ThreadDeath} to kill the current thread.

gc

public static void gc()
Deprecated. 
delegated.


runFinalization

public static void runFinalization()
Deprecated. 
delegated.


runFinalizersOnExit

public static void runFinalizersOnExit(boolean b)
Deprecated. 
deprecated, ignored.


load

public static void load(String s)
Deprecated. 
delegated.


loadLibrary

public static void loadLibrary(String s)
Deprecated. 
delegated.


mapLibraryName

public static String mapLibraryName(String s)
Deprecated. 
delegated.