public class

PropertyEditor

extends Object
java.lang.Object
   ↳ net.pierrox.lightning_launcher.script.api.PropertyEditor

Class Overview

Utility to modify one or more configuration settings at once. Modify one or more properties using the same PropertyEditor, then call commit() to validate changes. This object is retrieved using edit(). You can chain calls this way:


 	property_set.edit()
 		.setInteger("someProperty", some_value)
 		.setFloat("someOtherProperty", some_other_value)
 		.commit();
 

Summary

Public Methods
void commit()
Validate all changes at once.
Box getBox(String name)
Returns a box object allowing modifications.
PropertyEditor setBoolean(String name, boolean value)
PropertyEditor setEventHandler(String name, int action, String data)
PropertyEditor setEventHandler(String name, EventHandler eventHandler)
PropertyEditor setFloat(String name, float value)
PropertyEditor setInteger(String name, long value)
PropertyEditor setString(String name, String value)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void commit ()

Validate all changes at once. Warning: when commiting property changes on a container, items may be reloaded to propagate changes and as a consequence references to items in this container may become invalid and may need to be updated.

public Box getBox (String name)

Returns a box object allowing modifications.

Parameters
name box property to retrieve, for instance i.box or f.box

public PropertyEditor setBoolean (String name, boolean value)

public PropertyEditor setEventHandler (String name, int action, String data)

Parameters
data optional data, can be null. See getData()

public PropertyEditor setEventHandler (String name, EventHandler eventHandler)

public PropertyEditor setFloat (String name, float value)

public PropertyEditor setInteger (String name, long value)

public PropertyEditor setString (String name, String value)