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 MenuContainer{
|
|
|
|
|
|
|
|
/* Builds all necessary CSS/layout rules */
|
|
|
|
public MenuContainer(Node target) throws Exception{
|
|
|
|
|
2017-11-15 16:17:45 +00:00
|
|
|
/* (1) Set rules */
|
2017-11-15 13:23:49 +00:00
|
|
|
Ruleset.load(target)
|
2017-11-15 16:17:45 +00:00
|
|
|
.add("top", Context.getInt("header-height"))
|
2017-11-15 13:23:49 +00:00
|
|
|
.add("left", 0)
|
|
|
|
|
2017-11-15 16:17:45 +00:00
|
|
|
.add("min-width", Context.getInt("menu-width"))
|
|
|
|
.add("max-width", Context.getInt("menu-width"))
|
2017-11-15 13:23:49 +00:00
|
|
|
|
2017-11-15 16:17:45 +00:00
|
|
|
.add("min-height", Context.getInt("screen-height") - Context.getInt("header-height"))
|
|
|
|
.add("max-height", Context.getInt("screen-height") - Context.getInt("header-height"))
|
2017-11-15 13:23:49 +00:00
|
|
|
|
2017-11-15 16:17:45 +00:00
|
|
|
.add("background-color", Context.getString("menu-bg"))
|
2017-11-15 13:23:49 +00:00
|
|
|
.apply();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|