32 lines
877 B
Java
32 lines
877 B
Java
package Classes.css.user;
|
|
|
|
import Classes.css.core.Context;
|
|
import Classes.css.core.Ruleset;
|
|
import javafx.scene.Node;
|
|
|
|
public class MenuStyleSheet{
|
|
|
|
/* Builds all necessary CSS/layout rules */
|
|
public MenuStyleSheet(Node target) throws Exception{
|
|
|
|
/* (1) Set rules */
|
|
Ruleset.load(target)
|
|
.add("top", Context.getInt("header-height"))
|
|
.add("left", 0)
|
|
|
|
.add("min-width", Context.getInt("menu-width"))
|
|
.add("max-width", Context.getInt("menu-width"))
|
|
|
|
.add("min-height", Context.getInt("screen-height") - Context.getInt("header-height"))
|
|
.add("max-height", Context.getInt("screen-height") - Context.getInt("header-height"))
|
|
|
|
.add("pref-width", Context.getInt("menu-width"))
|
|
.add("pref-height", Context.getInt("screen-height") - Context.getInt("header-height"))
|
|
|
|
.add("background-color", Context.getString("menu-bg"))
|
|
.apply();
|
|
|
|
}
|
|
|
|
}
|