mae.sss
Class DemoMenu

java.lang.Object
  extended bymae.sss.DemoMenu

public class DemoMenu
extends java.lang.Object

Adds various static methods to SSS, a less capable version of Menu class


Method Summary
static java.applet.Applet getApplet()
          Returns the calling Applet, if any
static java.lang.Class help()
          Starts a Teacher session from SSS
static void println(java.lang.Object x)
          Prints the object into system output
static java.lang.Object[] sort(java.lang.Object[] a)
          Sort the array in ascending order.
static java.lang.Class systemClass(java.lang.String name)
          Chooses system class by name (including extensions and the class path)
static void teach(java.lang.String s)
          Starts a Teacher session from a named resource
static java.awt.Frame toFrame(java.awt.Component c)
          If the Component is already on a Frame, returns it.
static java.awt.Component[] toTree(java.awt.Container c)
          Shows the containment hierarchy of Container c (possibly JComponent).
static javax.swing.tree.TreeNode[] toTree(javax.swing.tree.TreeNode n)
          Shows the contents of a TreeNode; returns an array of nodes
static java.lang.Class version()
          Shows SSS version (splash screen)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getApplet

public static java.applet.Applet getApplet()
Returns the calling Applet, if any


help

public static java.lang.Class help()
Starts a Teacher session from SSS


teach

public static void teach(java.lang.String s)
Starts a Teacher session from a named resource


systemClass

public static java.lang.Class systemClass(java.lang.String name)
                                   throws java.lang.ClassNotFoundException
Chooses system class by name (including extensions and the class path)

Throws:
java.lang.ClassNotFoundException

println

public static void println(java.lang.Object x)
Prints the object into system output


toFrame

public static java.awt.Frame toFrame(java.awt.Component c)
If the Component is already on a Frame, returns it.
 Otherwise, adds it into a new Jframe
 If it is an Applet, invokes init() and start()
 Invokes pack() and show() on the new JFrame
 


toTree

public static java.awt.Component[] toTree(java.awt.Container c)
Shows the containment hierarchy of Container c (possibly JComponent).

Returns an array of Components within c.


toTree

public static javax.swing.tree.TreeNode[] toTree(javax.swing.tree.TreeNode n)
Shows the contents of a TreeNode; returns an array of nodes


sort

public static java.lang.Object[] sort(java.lang.Object[] a)
Sort the array in ascending order. Objects need not be Comparable, they are sorted as Strings


version

public static java.lang.Class version()
Shows SSS version (splash screen)