2017-11-15 17:12:46 +00:00
|
|
|
package Classes.css.user;
|
|
|
|
|
|
|
|
import Classes.css.core.Context;
|
|
|
|
import Classes.css.core.Ruleset;
|
|
|
|
import javafx.scene.Node;
|
|
|
|
|
|
|
|
public class SubMenuStyleSheet{
|
|
|
|
|
|
|
|
/* Builds all necessary CSS/layout rules */
|
|
|
|
public SubMenuStyleSheet(Node target) throws Exception{
|
|
|
|
|
|
|
|
/* (1) Set rules */
|
2017-12-12 08:21:44 +00:00
|
|
|
Ruleset.load(target)
|
|
|
|
.add("top", Context.getInt("header-height"))
|
|
|
|
.add("left", Context.getInt("menu-width")-3)
|
|
|
|
.add("bottom", 0)
|
|
|
|
|
|
|
|
.add("min-width", Context.getInt("submenu-width"))
|
|
|
|
.add("max-width", Context.getInt("submenu-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("submenu-width"))
|
|
|
|
.add("pref-height", Context.getInt("screen-height") - Context.getInt("header-height"))
|
2017-11-15 17:12:46 +00:00
|
|
|
|
2017-12-12 08:21:44 +00:00
|
|
|
.add("background-color", Context.getString("submenu-bg"))
|
|
|
|
.apply();
|
2017-11-15 17:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|