1 7 8 package org.jdesktop.jdnc.markup.elem; 9 10 import java.util.Hashtable ; 11 import java.util.Map ; 12 13 import org.w3c.dom.Element ; 14 import org.jdesktop.jdnc.markup.Attributes; 15 import org.jdesktop.jdnc.markup.Namespace; 16 import org.jdesktop.jdnc.markup.attr.EditorAttributes; 17 import net.openmarkup.AttributeHandler; 18 import net.openmarkup.ElementType; 19 20 public class EditorElement 21 extends ComponentElement { 22 private static final Map attrMap = new Hashtable (); 23 24 public EditorElement(Element element, ElementType elementType) { 25 super(element, elementType); 26 } 27 28 protected Map registerAttributeHandlers() { 29 Map handlerMap = super.registerAttributeHandlers(); 30 if (handlerMap != null) { 31 handlerMap.put(Namespace.JDNC + ":" + Attributes.SOURCE, 32 sourceHandler); 33 } 34 return handlerMap; 35 } 36 37 protected Map getAttributeHandlerMap() { 38 return attrMap; 39 } 40 41 protected void applyAttributesAfter() { 42 super.applyAttributesAfter(); 43 applyAttribute(Namespace.JDNC, Attributes.SOURCE); 44 } 45 46 private static final AttributeHandler sourceHandler = 47 new AttributeHandler(Namespace.JDNC, Attributes.SOURCE, 48 EditorAttributes.sourceApplier); 49 50 } | Popular Tags |