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

jfxtras.scene.layout.responsivepane.Stylesheet Maven / Gradle / Ivy

The newest version!
package jfxtras.scene.layout.responsivepane;

import javafx.beans.DefaultProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;

/**
 *
 */
@DefaultProperty("file")
public class Stylesheet {

	/**
	 * For FXML
	 */
	public Stylesheet() {
	}
	
	/**
	 * 
	 * @param sizeInInchesAtLeast size in inches
	 * @param file
	 */
	public Stylesheet(Size sizeAtLeast, String file) {
		setSizeAtLeast(sizeAtLeast);
		setFile(file);
	}		
	
	/** File */
	public ObjectProperty fileProperty() { return fileProperty; }
	final private SimpleObjectProperty fileProperty = new SimpleObjectProperty<>(this, "file", null);
	public String getFile() { return fileProperty.getValue(); }
	public void setFile(String value) { fileProperty.setValue(value); }
	public Stylesheet withFile(String value) { setFile(value); return this; } 

	/** SizeAtLeast (in inches) */
	public ObjectProperty sizeAtLeastProperty() { return sizeAtLeastProperty; }
	final private SimpleObjectProperty sizeAtLeastProperty = new SimpleObjectProperty<>(this, "sizeAtLeast", Size.ZERO);
	public Size getSizeAtLeast() { return sizeAtLeastProperty.getValue(); }
	public void setSizeAtLeast(Size value) { sizeAtLeastProperty.setValue(value); }
	public Stylesheet withSizeAtLeast(Size value) { setSizeAtLeast(value); return this; } 
		
	public String describeSizeConstraints() {
		return getSizeAtLeast() + "";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy