예제 #1
0
 static {
   CLASS_WHITELIST = new TreeSet<String>();
   CLASS_WHITELIST.add("center");
   CLASS_WHITELIST.add("top");
   CLASS_WHITELIST.add("right");
   CLASS_WHITELIST.add("bottom");
   CLASS_WHITELIST.add("left");
 }
예제 #2
0
 private static String[] filterClasses(String[] classes) {
   Set<String> filteredClasses = new TreeSet<String>();
   for (int i = 0; i < classes.length; i++) {
     if (CLASS_WHITELIST.contains(classes[i])) {
       filteredClasses.add(classes[i]);
     }
   }
   return filteredClasses.toArray(new String[filteredClasses.size()]);
 }