public class DatGui extends Object
Constructor and Description |
---|
DatGui(SimpleHTTPServer server)
Datgui constructor requires a SimpleHTTPServer
|
Modifier and Type | Method and Description |
---|---|
ClassGui |
add(Object relatedObject)
Add an Object to the gui, which you want to edit in the gui
|
ClassGui |
add(Object relatedObject,
String fieldName)
Add a specific field to the gui and sets its minimum value.
|
ClassGui |
add(Object relatedObject,
String[] fieldNames)
Add an Object to the gui, with the specified public fields
|
ClassGui |
add(Object relatedObject,
String fieldName,
float min)
Add a specific field to the gui and sets its minimum value.
|
ClassGui |
add(Object relatedObject,
String fieldName,
float min,
float max) |
ClassGui |
addMethodTrigger(Object relatedObject,
String methodName) |
ClassGui |
addSelector(Object relatedObject,
String arrayName,
int defaultIndex,
String targetFieldName) |
void |
allPublics()
Add all public fields of all Classguis added so far
|
void |
build()
Standard build method creates a index.html in the data folder and serves
it
|
void |
build(String fileName)
Build Gui to a file: tested with html- TODO test js files
|
ClassGui |
getClassGui(Object relObj)
Get the Classgui for an related Object, that has been added to DatGui
|
void |
setLogLevel(Level level) |
void |
setManualUpdate(boolean manualUpdate)
If manualUpdate is set true gui changes are not send to the server automatically (after the set delay)
but add an update button to update.
|
void |
setSendDelay(int millis)
Sets the delay
|
public DatGui(SimpleHTTPServer server)
server
- public ClassGui add(Object relatedObject)
relatedObject
- public ClassGui add(Object relatedObject, String[] fieldNames)
relatedObject
- the object that should be updatedfieldNames
- Array of Fieldnames of public fieldspublic ClassGui add(Object relatedObject, String fieldName)
relatedObject
- the objectfieldName
- public ClassGui add(Object relatedObject, String fieldName, float min)
relatedObject
- fieldName
- min
- public ClassGui addSelector(Object relatedObject, String arrayName, int defaultIndex, String targetFieldName)
public void allPublics()
public void build()
public void build(String fileName)
fileName
- file to write topublic ClassGui getClassGui(Object relObj)
relObj
- the related Objectpublic void setSendDelay(int millis)
millis
- public void setManualUpdate(boolean manualUpdate)
manualUpdate
- public void setLogLevel(Level level)
Processing library SimpleHTTPServer by Ramin Soleymani. (c) 2016