From f4a549e96046206fbe79ffaf147140d009046063 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 15 Nov 2017 14:23:13 +0100 Subject: [PATCH] Updated classes.css --- Classes/css/core/Context.java | 20 ++++++++++++++++++++ Classes/css/core/Ruleset.java | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Classes/css/core/Context.java diff --git a/Classes/css/core/Context.java b/Classes/css/core/Context.java new file mode 100644 index 0000000..3c7ee4e --- /dev/null +++ b/Classes/css/core/Context.java @@ -0,0 +1,20 @@ +package Classes.css.core; + +import java.util.HashMap; + +public class Context{ + + /* Context data (associative array) */ + private static HashMap attr = new HashMap(); + + /* Add data */ + public static void bind(String index, Object data){ + Context.attr.put(index, data); + } + + /* Fetch data */ + public static Object get(String index){ + return Context.attr.get(index); + } + +} diff --git a/Classes/css/core/Ruleset.java b/Classes/css/core/Ruleset.java index 065abb8..5d5a219 100644 --- a/Classes/css/core/Ruleset.java +++ b/Classes/css/core/Ruleset.java @@ -65,7 +65,7 @@ public class Ruleset { /* (x) If nothing custom -> suppose java fx rule */ else - new_rule = (Rule) new JavaFX(l_side, (String) r_side[0]); + new_rule = (Rule) new JavaFX(l_side, r_side[0].toString());