1 18 package org.apache.batik.css.engine.value; 19 20 import org.w3c.dom.DOMException ; 21 import org.w3c.dom.css.CSSValue; 22 23 29 public abstract class AbstractValue implements Value { 30 31 34 public short getCssValueType() { 35 return CSSValue.CSS_PRIMITIVE_VALUE; 36 } 37 38 41 public short getPrimitiveType() { 42 throw createDOMException(); 43 } 44 45 48 public float getFloatValue() throws DOMException { 49 throw createDOMException(); 50 } 51 52 55 public String getStringValue() throws DOMException { 56 throw createDOMException(); 57 } 58 59 62 public Value getRed() throws DOMException { 63 throw createDOMException(); 64 } 65 66 69 public Value getGreen() throws DOMException { 70 throw createDOMException(); 71 } 72 73 76 public Value getBlue() throws DOMException { 77 throw createDOMException(); 78 } 79 80 83 public int getLength() throws DOMException { 84 throw createDOMException(); 85 } 86 87 90 public Value item(int index) throws DOMException { 91 throw createDOMException(); 92 } 93 94 97 public Value getTop() throws DOMException { 98 throw createDOMException(); 99 } 100 101 104 public Value getRight() throws DOMException { 105 throw createDOMException(); 106 } 107 108 111 public Value getBottom() throws DOMException { 112 throw createDOMException(); 113 } 114 115 118 public Value getLeft() throws DOMException { 119 throw createDOMException(); 120 } 121 122 125 public String getIdentifier() throws DOMException { 126 throw createDOMException(); 127 } 128 129 132 public String getListStyle() throws DOMException { 133 throw createDOMException(); 134 } 135 136 139 public String getSeparator() throws DOMException { 140 throw createDOMException(); 141 } 142 143 146 protected DOMException createDOMException() { 147 Object [] p = new Object [] { new Integer (getCssValueType()) }; 148 String s = Messages.formatMessage("invalid.value.access", p); 149 return new DOMException (DOMException.INVALID_ACCESS_ERR, s); 150 } 151 } 152 | Popular Tags |