1 14 15 package org.wings.style; 16 17 20 public class CSSStyle extends CSSAttributeSet implements Style { 21 private StyleSheet sheet; 22 private CSSSelector selector; 23 24 public CSSStyle(CSSSelector selector, CSSAttributeSet attributes) { 25 super(attributes); 26 this.selector = selector; 27 } 28 29 public CSSStyle(CSSSelector selector, CSSProperty property, String value) { 30 super(property, value); 31 this.selector = selector; 32 } 33 34 public void setSelector(CSSSelector selector) { 35 this.selector = selector; 36 } 37 38 public CSSSelector getCssSelector() { return selector; } 39 40 44 public void setSheet(StyleSheet sheet) { 45 this.sheet = sheet; 46 } 47 48 51 public StyleSheet getSheet() { return sheet; } 52 53 56 public String toString() { 57 return selector.getSelectorString() + " { " + super.toString() + "}"; 58 } 59 60 61 public Object getSelector() { 62 return getCssSelector(); 63 } 64 65 66 public Object put(Object styleProperty, Object styleValue) { 67 return super.put((CSSProperty) styleProperty, (String ) styleValue); 68 } 69 70 } 71 | Popular Tags |