1 7 8 package org.jdesktop.jdnc.markup.elem; 9 10 import java.util.Map ; 11 12 import org.w3c.dom.Element ; 13 import net.openmarkup.AttributeHandler; 14 import net.openmarkup.ElementType; 15 import org.jdesktop.jdnc.markup.Attributes; 16 import org.jdesktop.jdnc.markup.Namespace; 17 import org.jdesktop.jdnc.markup.attr.SearchPanelAttributes; 18 19 23 public class SearchPanelElement extends ComponentElement { 24 public SearchPanelElement(Element element, ElementType elementType) { 25 super(element, elementType); 26 } 27 28 protected void applyAttributesAfter() { 29 super.applyAttributesAfter(); 30 applyAttribute(Namespace.JDNC, Attributes.PATTERN_FILTER); 31 applyAttribute(Namespace.JDNC, Attributes.PATTERN_HIGHLIGHTER); 32 applyAttribute(Namespace.JDNC, Attributes.TARGET); 33 } 34 35 protected Map registerAttributeHandlers() { 36 Map handlerMap = super.registerAttributeHandlers(); 37 if (handlerMap != null) { 38 handlerMap.put(Namespace.JDNC + ":" + Attributes.PATTERN_FILTER, 39 patternFilterHandler); 40 handlerMap.put(Namespace.JDNC + ":" + Attributes.PATTERN_HIGHLIGHTER, 41 patternHighlighterHandler); 42 handlerMap.put(Namespace.JDNC + ":" + Attributes.TARGET, 43 targetHandler); 44 } 45 return handlerMap; 46 } 47 48 private static final AttributeHandler patternFilterHandler = 49 new AttributeHandler(Namespace.JDNC, Attributes.PATTERN_FILTER, SearchPanelAttributes.patternFilterApplier); 50 51 private static final AttributeHandler patternHighlighterHandler = 52 new AttributeHandler(Namespace.JDNC, Attributes.PATTERN_HIGHLIGHTER, SearchPanelAttributes.patternHighlighterApplier); 53 54 private static final AttributeHandler targetHandler = 55 new AttributeHandler(Namespace.JDNC, Attributes.TARGET, SearchPanelAttributes.targetApplier); 56 } 57 | Popular Tags |