xworker.javafx.scene.chart.StackedAreaChartActions Maven / Gradle / Ivy
package xworker.javafx.scene.chart;
import javafx.scene.chart.Axis;
import javafx.scene.chart.StackedAreaChart;
import org.xmeta.ActionContext;
import org.xmeta.Thing;
import xworker.javafx.beans.property.PropertyFactory;
public class StackedAreaChartActions {
static{
PropertyFactory.regist(StackedAreaChart.class, "createSymbolsProperty", o -> {
StackedAreaChart obj = (StackedAreaChart) o;
return obj.createSymbolsProperty();
});
}
public static void init(StackedAreaChart node, Thing thing, ActionContext actionContext){
XYChartActions.init(node, thing, actionContext);
if(thing.valueExists("createSymbols")){
node.setCreateSymbols(thing.getBoolean("createSymbols"));
}
}
public static StackedAreaChart create(ActionContext actionContext){
Thing self = actionContext.getObject("self");
Axis xAxis = XYChartActions.getXAxis(self, actionContext);
Axis yAxis = XYChartActions.getYAxis(self, actionContext);
StackedAreaChart node = new StackedAreaChart(xAxis, yAxis);
init(node, self, actionContext);
actionContext.g().put(self.getMetadata().getName(), node);
actionContext.peek().put("parent", node);
for(Thing child : self.getChilds()){
child.doAction("create", actionContext);
}
return node;
}
}