All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xworker.javafx.control.LabelActions Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package xworker.javafx.control;

import javafx.scene.control.Label;
import org.xmeta.ActionContext;
import org.xmeta.Thing;
import xworker.javafx.beans.property.PropertyFactory;

public class LabelActions {
	static{
		PropertyFactory.regist(Label.class, "labelForProperty", o -> {
			Label obj = (Label) o;
			return obj.labelForProperty();
		});
	}

	public static void init(Label label, Thing thing, ActionContext actionContext) {
		LabeledActions.init(label, thing, actionContext);
	}

	public static Label create(ActionContext actionContext) {
		Thing self = actionContext.getObject("self");
		
		Label item = new Label();
		init(item, self, actionContext);

		actionContext.g().put(self.getMetadata().getName(), item);
		
		actionContext.peek().put("parent", item);
		for(Thing child : self.getChilds()) {
			child.doAction("create", actionContext);
		}
		
		return item;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy