|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcodesimian.CS<CSGeneric>
codesimian.DefaultCS
codesimian.Scroll
public class Scroll
Vertical and/or horizontal scrollbars automatically appear around P(0)
when P(0) becomes too large to be completely viewed in its current part of the screen.
someScroll.L(java.awt.Component.class)
contains someScroll.P(0).L(java.awt.Component.class);
Use someScroll.L(java.awt.JScrollPane.class) to get the JScrollPane.
Or use someScroll.L(java.awt.Component.class) because JScrollPane extends Component.
P(1) is optional and is X scroll position, range 0 to 1.
If P(1) is negative, the default JScrollPane horizontal scrolling behavior is used.
TODO: Values above 1 may be used for other things later, like int position instead of fraction.
Similarly, P(2) is Y scroll position.
| Field Summary |
|---|
| Fields inherited from class codesimian.CS |
|---|
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS |
| Constructor Summary | |
|---|---|
Scroll()
|
|
| Method Summary | |
|---|---|
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. |
boolean |
deleteP(int index)
WARNING: if returns false, could have deleted but not moved other params down 1 index. WARNING: if duplicates not allowed, can not slide params down 1 index the standard way, returns false. |
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()
Execute this CS and cast to double. |
int |
getMaxScrollXPosition()
|
int |
getMaxScrollYPosition()
|
int |
getMinScrollXPosition()
|
int |
getMinScrollYPosition()
|
double |
getScrollXFraction()
|
int |
getScrollXPosition()
|
double |
getScrollYFraction()
|
int |
getScrollYPosition()
|
javax.swing.JViewport |
getViewport()
|
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 c)
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. |
boolean |
setP(int index,
CS setTo)
Every CS is a list of other CSs, between size minP() and maxP() inclusive. |
void |
setScrollPosition(int x,
int y)
top-left corner. |
void |
setScrollXFraction(double fraction)
|
void |
setScrollXPosition(int x)
|
void |
setScrollYFraction(double fraction)
|
void |
setScrollYPosition(int y)
|
void |
stateChanged(javax.swing.event.ChangeEvent ev)
|
| Methods inherited from class codesimian.DefaultCS |
|---|
B, C, countP, decrementMyFuel, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, 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 |
| Constructor Detail |
|---|
public Scroll()
| Method Detail |
|---|
public java.lang.Object LForProxy(java.lang.Class c)
DefaultCS
LForProxy in class DefaultCSexecProxy(),
setExecProxy(CS)public double DForProxy()
CS
DForProxy in class DefaultCSpublic java.lang.String keyword()
DefaultCS
keyword in class DefaultCSCS.parent(),
CS.newInstance(),
CS.name()public java.lang.String description()
CS
description in class DefaultCSpublic double cost()
CS
cost in class CSpublic int minP()
DefaultCS
minP in class DefaultCSpublic int maxP()
CS
maxP in class CS
public void setScrollPosition(int x,
int y)
public double getScrollXFraction()
public double getScrollYFraction()
public void setScrollXFraction(double fraction)
public void setScrollYFraction(double fraction)
public void setScrollXPosition(int x)
public void setScrollYPosition(int y)
public int getScrollXPosition()
public int getScrollYPosition()
public int getMinScrollXPosition()
public int getMaxScrollXPosition()
public int getMinScrollYPosition()
public int getMaxScrollYPosition()
public javax.swing.JViewport getViewport()
public boolean setP(int index,
CS setTo)
CS
setP in class DefaultCSpublic boolean deleteP(int index)
DefaultCS
deleteP in class DefaultCSpublic void stateChanged(javax.swing.event.ChangeEvent ev)
stateChanged in interface javax.swing.event.ChangeListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||