Class GUI

  extended by codesimian.CS
      extended by codesimian.DefaultCS
          extended by codesimian.FList
              extended by codesimian.GUI
All Implemented Interfaces:

public class GUI
extends FList

obsolete except for its static functions

Was originally intended to...

Controls (or just keeps a list of) all GUI parts of CodeSimian language, and contains them in its params (use P() and setP()). There can be only 1 GUI instance at a time. Get it with GUI.getGUI().

An example of a GUI part is a text area that accepts CodeSimian commands to produce CSs and execute them.

Executes all its params in order and returns the value of the last one, like FList.DForProxy() does.

???probably incorrect: When executed, searches its params' CS.getObject()s for java.awt.Container's and displays them.

See Also:
Serialized Form

Field Summary
static CS componentType
          new JavaType( java.awt.Component.class )
static CS containerType
          new JavaType( java.awt.Container.class ), a subtype of Component
protected static GUI gui
          the only GUI instance
static CS rootPaneContainerType
          new JavaType( javax.swing.RootPaneContainer.class ).
Fields inherited from class codesimian.CS
Method Summary
 double DForProxy()
          D() and DForProxy() are the 2 most important functions in CS.
 GUI getGUI()
          return the only instance of GUI
static java.awt.Component interpretCSAsComponent(CS someTypeOfGUIObject)
          Deprecated. Use CS.L(java.awt.Component.class) instead.
 boolean needFuzzyType()
 CS PType(int indexP)
          There is a TYPE for each Param.
A TYPE is a CS whose minP() is at least 1.
static void windowWithTextAndOKButton(java.lang.String message)
Methods inherited from class codesimian.FList
description, indexP, javaCode, keyword, maxP, minP, paramOrderMatters
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, F, fuel, getExec, getObject, heap, I, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, LForProxy, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setS, setZ, start, toString, V, Z
Methods inherited from class codesimian.CS
addP, addP, addP, addP, addP, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, IForProxy, isIllusion, javaCode, JForProxy, L, L, L, L, L, maxD, minD, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, setB, setC, setCost, setDescription, setF, setHeap, setI, setJ, setL, setL, setParent, setParsePriority, setProxyOf, setPType, setS, setTester, setZ, SForProxy, tester, VForProxy, voidReflect, ZForProxy
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


protected static GUI gui
the only GUI instance


public static CS componentType
new JavaType( java.awt.Component.class )


public static CS containerType
new JavaType( java.awt.Container.class ), a subtype of Component


public static CS rootPaneContainerType
new JavaType( javax.swing.RootPaneContainer.class ). RootPaneContainer is an interface that most Java root GUI's implement, like JFrame.

Method Detail


public double DForProxy()
Description copied from class: CS
D() and DForProxy() are the 2 most important functions in CS. They execute this CS. All other execute functions, by default, use DForProxy instead of reinventing-the-wheel for their own type.

For example, J() calls JForProxy() which calls DForProxy(). D() calls DForProxy() directly.

Execute this CS and cast to double. D() is the main EXECUTE function. D() uses DForProxy(). DForProxy() is the main action of every CS, the most important function. By default, all other primitive EXECUTE functions defer to D.
Functions that EXECUTE this CS: L(Class) L(int,Class,int) Z() B() C() S() I() J() F() D() V()

DForProxy in class FList


public GUI getGUI()
return the only instance of GUI


public boolean needFuzzyType()


public CS PType(int indexP)
Description copied from class: CS
There is a TYPE for each Param.
A TYPE is a CS whose minP() is at least 1. When a TYPE executes, it MEASURES THE TYPE OF its first param CS. It returns a positive number if it is that type, else 0 or negative. Some TYPEs use only 2 numbers, while others can return any number on a continuous scale.

Types are optional. To not use types, return the default type: Static.defaultType(). The default type returns true for any CS. Most CSs do not need types therefore they use the default type.

PType in class DefaultCS


public static void windowWithTextAndOKButton(java.lang.String message)


public static java.awt.Component interpretCSAsComponent(CS someTypeOfGUIObject)
Deprecated. Use CS.L(java.awt.Component.class) instead.

If it contains a Component, returns it. Else returns some other visual representation of it.