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

de.rpgframework.jfx.BlankableValueControl Maven / Gradle / Ivy

package de.rpgframework.jfx;

import de.rpgframework.genericrpg.chargen.SingleComplexDataItemController;
import de.rpgframework.genericrpg.data.ComplexDataItem;
import de.rpgframework.genericrpg.data.ComplexDataItemValue;
import de.rpgframework.jfx.rules.skin.BlankableValueControlSkin;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.control.Control;
import javafx.scene.control.Skin;
import javafx.scene.control.Skinnable;

/**
 *
 */
public class BlankableValueControl> extends Control {

	private StringProperty placeholder = new SimpleStringProperty();
	private ObjectProperty selected = new SimpleObjectProperty();
	private ObjectProperty> controller = new SimpleObjectProperty>();

	//-------------------------------------------------------------------
	public BlankableValueControl(String placeholder) {
		this.placeholder.set(placeholder);
	}

	//-------------------------------------------------------------------
	/**
	 * @see javafx.scene.control.Control#createDefaultSkin()
	 */
	@Override
	public Skin createDefaultSkin() {
		return new BlankableValueControlSkin(this);
	}

	//-------------------------------------------------------------------
	public StringProperty placeholder() { return placeholder; }
	public BlankableValueControl setPlaceholder(String value) { placeholder.set(value); return this; }
	public String getPlaceholder() { return placeholder.get(); }

	//-------------------------------------------------------------------
	public ObjectProperty selected() { return selected; }
	public BlankableValueControl setSelected(V value) { selected.set(value); return this; }
	public V getSelected() { return selected.get(); }

	//-------------------------------------------------------------------
	public ObjectProperty> controller() { return controller; }
	public BlankableValueControl setController(SingleComplexDataItemController value) { controller.set(value); return this; }
	public SingleComplexDataItemController getController() { return controller.get(); }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy