示例#1
0
 public CSSApplication(Object object) {
   try {
     Style.apply(object, new Style(getClass().getResource("styles.css")));
   } catch (StyleException e1) {
     // TODO Auto-generated catch block
     e1.printStackTrace();
   }
 }
示例#2
0
 public CSSApplication(Object object, String cssLine) {
   try {
     Style.unregisterTargetClassName(object);
     Style.registerTargetClassName(object, cssLine);
     Style.apply(object, new Style(getClass().getResource("styles.css")));
   } catch (StyleException e1) {
     // TODO Auto-generated catch block
     e1.printStackTrace();
   }
 }