modules/graphics/src/main/java/com/sun/javafx/css/SelectorPartitioning.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization

@@ -23,10 +23,14 @@
  * questions.
  */
 
 package com.sun.javafx.css;
 
+import javafx.css.CompoundSelector;
+import javafx.css.Selector;
+import javafx.css.SimpleSelector;
+import javafx.css.StyleClass;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;

@@ -38,11 +42,11 @@
  * Code to partition selectors into a tree-like structure for faster matching.
  */
 public final class SelectorPartitioning {
 
     /** package accessible */
-    SelectorPartitioning() {}
+    public SelectorPartitioning() {}
 
     /*
      * Wrapper so that we can have Map<ParitionKey, Partition> even though
      * the innards of the key might be a String or long[]
      */

@@ -191,11 +195,11 @@
      * the original order can be restored for the cascade.
      */
     private int ordinal;
     
     /** clear current partitioning */
-    void reset() {
+    public void reset() {
         idMap.clear();
         typeMap.clear();
         styleClassMap.clear();
         ordinal = 0;
     }

@@ -223,11 +227,11 @@
     private static final int STYLECLASS_BIT = 1;
     /* If there is no type part, then * is the default. */
     private static final PartitionKey WILDCARD = new PartitionKey<String>("*");
     
     /* Place this selector into the partitioning map. Package accessible */
-    void partition(Selector selector) {
+    public void partition(Selector selector) {
         
         SimpleSelector simpleSelector = null;
         if (selector instanceof CompoundSelector) {
             final List<SimpleSelector> selectors = ((CompoundSelector)selector).getSelectors();
             final int last = selectors.size()-1;

@@ -298,11 +302,11 @@
         }
         
     }
     
     /** Get the list of selectors that match this selector. Package accessible */
-    List<Selector> match(String selectorId, String selectorType, Set<StyleClass> selectorStyleClass) {
+    public List<Selector> match(String selectorId, String selectorType, Set<StyleClass> selectorStyleClass) {
         
         final boolean hasId = 
             (selectorId != null && selectorId.isEmpty() == false);
         final PartitionKey idKey = hasId
                 ? new PartitionKey(selectorId)