|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.CS<CSGeneric>
codesimian.DefaultCS
codesimian.WindowCS
public class WindowCS
a root gui component that displays 1 other
gui component in a java.awt.JFrame (but may later use any Window instead of JFrame).
That other might contain many more gui objects.
If countP() is at least 4, each param (except the first) is a list
about a specific subject related to windows.
P(0) = window contents.
P(1) = list of window properties: x size, y size, x position, y position.
All in units of pixels, or if less than 1, a fraction of screen width or height.
P(2) = list of window events, like close, minimize, maximize, move, resize (x y or both)
P(3) = list of mouse events.
Instead, create mouseEventsOnComponent(aComponent listener1 listener2...)?
P(4) = list of keyboard events
P(5) = pixels of standard-sized icon.
One way to get pixel width is to execute P(5) as int (I()).
OLD TEXT, BUT MUCH OF IT IS STILL VALID IF countP() < 4.
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, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS |
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 |
LForProxy(java.lang.Class type)
the default implementation can use many Class parameters. |
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)
sets the name of this CS |
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()
|
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, 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, 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, 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 |
---|
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 java.lang.String keyword()
DefaultCS
keyword
in class DefaultCS
CS.parent()
,
CS.newInstance()
,
CS.name()
public double DForProxy()
DForProxy
in class DefaultCS
public int minP()
DefaultCS
minP
in class DefaultCS
public int maxP()
CS
maxP
in class CS
public java.lang.String description()
CS
description
in class DefaultCS
public boolean updateWindowSize()
public int paramValueToPixelSize(double paramValue, int screenSizeInPixels)
public boolean combineIfParamIsMyClassType()
public double cost()
CS
cost
in class CS
public boolean unknownCost()
public CS PType(int indexP)
CS
PType
in class DefaultCS
public 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 DefaultCS
protected boolean updateObjectInWindow()
public java.lang.Object LForProxy(java.lang.Class type)
DefaultCS
LForProxy
in class DefaultCS
execProxy()
,
setExecProxy(CS)
public boolean setL(java.lang.Object window)
CS
setL
in class DefaultCS
public boolean setName(java.lang.String newName)
CS
setName
in class DefaultCS
public CS interpretAsGUI(CS graphRoot)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public 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 |