1 50 51 package com.lowagie.text; 52 53 import java.util.ArrayList ; 54 import java.util.Properties ; 55 56 63 64 public class MarkedObject implements Element { 65 66 67 protected Element element; 68 69 70 protected Properties markupAttributes = new Properties (); 71 72 75 protected MarkedObject() { 76 element = null; 77 } 78 79 82 public MarkedObject(Element element) { 83 this.element = element; 84 } 85 86 91 public ArrayList getChunks() { 92 return element.getChunks(); 93 } 94 95 102 public boolean process(ElementListener listener) { 103 try { 104 return listener.add(element); 105 } 106 catch(DocumentException de) { 107 return false; 108 } 109 } 110 111 116 public int type() { 117 return MARKED; 118 } 119 120 124 public Properties getMarkupAttributes() { 125 return markupAttributes; 126 } 127 128 131 public void setMarkupAttribute(String key, String value) { 132 markupAttributes.setProperty(key, value); 133 } 134 135 } | Popular Tags |