1 18 package org.apache.batik.css.engine; 19 20 import java.net.URL ; 21 22 28 public class ImportRule extends MediaRule { 29 30 33 public final static short TYPE = (short)2; 34 35 38 protected URL uri; 39 40 44 45 48 public short getType() { 49 return TYPE; 50 } 51 52 55 public void setURI(URL u) { 56 uri = u; 57 } 58 59 62 public URL getURI() { 63 return uri; 64 } 65 66 69 public String toString(CSSEngine eng) { 70 StringBuffer sb = new StringBuffer (); 71 sb.append("@import \""); 72 sb.append(uri); 73 sb.append("\""); 74 if (mediaList != null) { 75 for (int i = 0; i < mediaList.getLength(); i++) { 76 sb.append(' '); 77 sb.append(mediaList.item(i)); 78 } 79 } 80 sb.append(";\n"); 81 return sb.toString(); 82 } 83 } 84 | Popular Tags |