functional/FXCssTests/src/test/css/utils/StyleGenerator.java

Print this page




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package test.css.utils;
  26 
  27 import javafx.css.StyleConverter;
  28 import javafx.css.CssMetaData;
  29 import com.sun.javafx.css.converters.*;
  30 import com.sun.javafx.scene.layout.region.*;
  31 import java.util.HashSet;
  32 import java.util.Set;
  33 
  34 /**
  35  *
  36  * @author Andrey Nazarov
  37  */
  38 public class StyleGenerator {
  39 
  40     static Set<CssMetaData> uniqKeys = new HashSet<CssMetaData>();
  41 
  42     static public void addKey(CssMetaData key) {
  43         uniqKeys.add(key);
  44     }
  45     static StringBuffer unknownTypes = new StringBuffer();
  46     static StringBuffer genCode = new StringBuffer("--------------Generated code for unused css styles----------\n");
  47 
  48     public static void generate() {
  49         for (CssMetaData key : uniqKeys) {




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package test.css.utils;
  26 
  27 import javafx.css.StyleConverter;
  28 import javafx.css.CssMetaData;
  29 import javafx.css.converter.*;
  30 import com.sun.javafx.scene.layout.region.*;
  31 import java.util.HashSet;
  32 import java.util.Set;
  33 
  34 /**
  35  *
  36  * @author Andrey Nazarov
  37  */
  38 public class StyleGenerator {
  39 
  40     static Set<CssMetaData> uniqKeys = new HashSet<CssMetaData>();
  41 
  42     static public void addKey(CssMetaData key) {
  43         uniqKeys.add(key);
  44     }
  45     static StringBuffer unknownTypes = new StringBuffer();
  46     static StringBuffer genCode = new StringBuffer("--------------Generated code for unused css styles----------\n");
  47 
  48     public static void generate() {
  49         for (CssMetaData key : uniqKeys) {