|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcodesimian.CS
codesimian.DefaultCS
codesimian.WindowCS
public class WindowCS
a root gui component that displays 1 other
gui component in a java.awt.JFrame.
That other might contain many more gui objects.
Param0 is a GUI CS object to display in the window.
To disply multiple things, put them in a Layout and the Layout in this window.
Param1 is window width in pixels. Param2 is window height in pixels.
Location of window is similar to size.
Param3 is X pixel position, and param4 is Y pixel position.
If param3 is the last param, only X position is specified.
These 4 default sizes are in static instance vars with type Number,
and start as instances of NumberStack.
Example in WindowCS: protected NumberWindowCS.defaultLocationX.
NumberStack can contain CSs because Number is CS's superclass.
| Field Summary | |
|---|---|
protected static java.lang.Number |
defaultHeight
|
protected static java.lang.Number |
defaultLocationX
|
protected static java.lang.Number |
defaultLocationY
|
protected static java.lang.Number |
defaultWidth
|
| Fields inherited from class codesimian.CS |
|---|
DESCRIPTION, END, EXECPROXY, FUEL, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER |
| Constructor Summary | |
|---|---|
WindowCS()
|
|
WindowCS(javax.swing.JFrame window)
JFrame 'window' will contain 1 JFrame from its 1 (type GUI.componentType) param. |
|
| Method Summary | |
|---|---|
boolean |
combineIfParamIsMyClassType()
|
double |
cost()
cost() should be changed to return a float, and should be renamed to costToExecute() cost of EXECUTING this CS, not including any CSs it executes recursively. |
java.lang.String |
description()
a short description of this CS, shorter than the javadoc, but long enough to tell what the params are for. |
double |
DForProxy()
tries to make the JFrame visible. |
boolean |
insertP(int index,
CS insertMe)
same as setP(int,CS) but inserts instead of overwriting. |
CS |
interpretAsGUI(CS graphRoot)
some trees/graphs of CSs cant be converted to java.util.Component objects. |
java.lang.String |
keyword()
For the CodeSimian language as a String. CodeSimian language keyword, like "+" "*" "max" ">" etc. Override this function if you want to specify a keyword other than how I derive them from the class name, like + for Add. Some CSs might never be intended to be used in the language by their keyword. The best example (4/05) is Num, because it is used in the language like "3.4" instead of "num()". |
java.lang.Object |
L(java.lang.Class type)
Optionally execute this CS, and definitely try to CAST it to the specified Java type. |
int |
maxP()
Maximum quantity of Params |
int |
minP()
For DForProxy(). Minimum number of parameters in param[] needed to call DForProxy(). Defines which indexs of param[] DForProxy() can use. Functions with a different number of parameters must override this. OVERRIDE THIS FUNCTION IF EXEC USES A DIFFERENT NUMBER OF PARAMETERS. Default is 1. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
boolean |
needFuzzyType()
|
int |
paramValueToPixelSize(double paramValue,
int screenSizeInPixels)
If paramValue is negative, use the absolute value. |
CS |
PType(int indexP)
There is a TYPE for each Param. A TYPE is a CS whose minP() is at least 1. |
boolean |
setL(java.lang.Object window)
setL setD setF setJ setI setS setC setB setZ are functions that SET THE VALUE OF THIS CS to some object, primitive, or array. |
boolean |
setName(java.lang.String newName)
window is any JFrame * public boolean setObject(Object window){ if (window==null || !(window instanceof JFrame)) return false; for (int p=0; p |
boolean |
setP(int index,
CS setTo)
Every CS is a list of other CSs, between size minP() and maxP() inclusive. |
boolean |
unknownCost()
|
protected boolean |
updateObjectInWindow()
checks if P(0).getObject() has changed since updateObjectInWindow() was called last. |
boolean |
updateWindowSize()
returns true if window size changed to param1 x param2 pixels, false if it was already that size |
| 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, 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, setL1, setMyFuel, setObject, setPrevExec, setS, setZ, start, toString, V, Z |
| Methods inherited from class codesimian.CS |
|---|
addP, addP, addP, addP, addP, BForProxy, CForProxy, clone, D, deleteP, FForProxy, IForProxy, isIllusion, javaCode, JForProxy, 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 java.lang.Number defaultLocationX
protected static java.lang.Number defaultLocationY
protected static java.lang.Number defaultWidth
protected static java.lang.Number defaultHeight
| Constructor Detail |
|---|
public WindowCS(javax.swing.JFrame window)
public WindowCS()
| Method Detail |
|---|
public double DForProxy()
DForProxy in class DefaultCSpublic int minP()
DefaultCS
minP in class DefaultCSpublic int maxP()
CS
maxP in class CSpublic boolean updateWindowSize()
public int paramValueToPixelSize(double paramValue,
int screenSizeInPixels)
public java.lang.String keyword()
DefaultCS
keyword in class DefaultCSCS.parent(),
CS.newInstance(),
CS.name()public java.lang.String description()
CS
description in class DefaultCSpublic boolean combineIfParamIsMyClassType()
public double cost()
CS
cost in class CSpublic boolean unknownCost()
public CS PType(int indexP)
CS
PType in class DefaultCSpublic boolean needFuzzyType()
public boolean setP(int index,
CS setTo)
CS
setP in class DefaultCS
public boolean insertP(int index,
CS insertMe)
CS
insertP in class DefaultCSprotected boolean updateObjectInWindow()
public java.lang.Object L(java.lang.Class type)
CS
L in class CSCS.Z(),
CS.B(),
CS.C(),
CS.S(),
CS.I(),
CS.J(),
CS.F(),
CS.D()public boolean setL(java.lang.Object window)
CS
setL in class DefaultCSpublic boolean setName(java.lang.String newName)
setName in class DefaultCSpublic CS interpretAsGUI(CS graphRoot)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListener
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||