1 18 package org.apache.batik.css.engine.value; 19 20 import org.w3c.dom.DOMException ; 21 import org.w3c.dom.css.CSSPrimitiveValue; 22 23 29 public class RectValue extends AbstractValue { 30 31 34 protected Value top; 35 36 39 protected Value right; 40 41 44 protected Value bottom; 45 46 49 protected Value left; 50 51 54 public RectValue(Value t, Value r, Value b, Value l) { 55 top = t; 56 right = r; 57 bottom = b; 58 left = l; 59 } 60 61 64 public short getPrimitiveType() { 65 return CSSPrimitiveValue.CSS_RECT; 66 } 67 68 71 public String getCssText() { 72 return "rect(" + top.getCssText() + ", " 73 + right.getCssText() + ", " 74 + bottom.getCssText() + ", " 75 + left.getCssText() + ")"; 76 } 77 78 81 public Value getTop() throws DOMException { 82 return top; 83 } 84 85 88 public Value getRight() throws DOMException { 89 return right; 90 } 91 92 95 public Value getBottom() throws DOMException { 96 return bottom; 97 } 98 99 102 public Value getLeft() throws DOMException { 103 return left; 104 } 105 106 109 public String toString() { 110 return getCssText(); 111 } 112 } 113 | Popular Tags |