Пример #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();
   }
 }