JavaFX/Classes/css/user/HeaderStyleSheet.java

33 lines
791 B
Java
Raw Permalink Normal View History

2017-11-15 13:23:49 +00:00
package Classes.css.user;
import Classes.css.core.Context;
import Classes.css.core.Ruleset;
import javafx.scene.Node;
public class HeaderStyleSheet{
2017-11-15 13:23:49 +00:00
/* Builds all necessary CSS/layout rules */
public HeaderStyleSheet(Node target) throws Exception{
2017-11-15 13:23:49 +00:00
/* (1) Set rules */
Ruleset.load(target)
// .add("top", 0)
// .add("left", 0)
// .add("right", 0)
.add("min-height", Context.getInt("header-height"))
.add("max-height", Context.getInt("header-height"))
2017-11-15 13:23:49 +00:00
.add("min-width", Context.getInt("screen-width"))
.add("max-width", Context.getInt("screen-width"))
2017-11-15 13:23:49 +00:00
.add("pref-height", Context.getInt("header-height"))
.add("pref-width", Context.getInt("screen-width"))
.add("background-color", Context.getString("main-color"))
2017-11-15 13:23:49 +00:00
.apply();
}
}