codesimian
Class GUI

java.lang.Object
  extended by codesimian.CS<CSGeneric>
      extended by codesimian.DefaultCS
          extended by codesimian.Do
              extended by codesimian.GUI
All Implemented Interfaces:
CodeSimian

public class GUI
extends Do

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.


Nested Class Summary
 
Nested classes/interfaces inherited from class codesimian.Do
Do.DoDDDL, Do.DoL
 
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
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS
 
Method Summary
 double DForProxy()
          Execute this CS and cast to double.
 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.Do
description, keyword, maxP, minP
 
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, 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, setPType, setS, setZ, start, toString, V, Z
 
Methods inherited from class codesimian.CS
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, 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, reflect6, setB, SETB, setC, SETC, setCost, SETD, setDescription, setF, SETF, setHeap, setI, SETI, setJ, SETJ, SETL, setL, setL, setParent, setParsePriority, setProxyOf, setS, SETS, setTester, setZ, SETZ, SForProxy, tester, toJavaCode, VForProxy, voidReflect, ZForProxy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gui

protected static GUI gui
the only GUI instance


componentType

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


containerType

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


rootPaneContainerType

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

DForProxy

public double DForProxy()
Description copied from class: CS
Execute this CS and cast to double.

D() and DForProxy() are the 2 most important functions in CS. They execute this CS. All other execute functions, by default, return DForProxy cast to their own type.

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

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()

Overrides:
DForProxy in class Do

getGUI

public GUI getGUI()
return the only instance of GUI


needFuzzyType

public boolean needFuzzyType()

PType

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 in a continuous range.

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.

Overrides:
PType in class DefaultCS

windowWithTextAndOKButton

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

interpretCSAsComponent

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.