jfxtras.scene.layout.responsivepane.Stylesheet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfxtras-all Show documentation
Show all versions of jfxtras-all Show documentation
Miscellaneous components for JavaFX
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() + "";
}
}