1 30 31 package com.steadystate.css.dom; 32 33 import java.io.Serializable ; 34 import org.w3c.dom.css.CSSValue; 35 36 41 public class Property implements Serializable { 42 43 private String _name; 44 private CSSValue _value; 45 private boolean _important; 46 47 48 public Property(String name, CSSValue value, boolean important) { 49 _name = name; 50 _value = value; 51 _important = important; 52 } 53 54 public String getName() { 55 return _name; 56 } 57 58 public CSSValue getValue() { 59 return _value; 60 } 61 62 public boolean isImportant() { 63 return _important; 64 } 65 66 public void setValue(CSSValue value) { 67 _value = value; 68 } 69 70 public void setImportant(boolean important) { 71 _important = important; 72 } 73 74 public String toString() { 75 return _name + ": " 76 + _value.toString() 77 + (_important ? " !important" : ""); 78 } 79 } | Popular Tags |