1 7 8 package org.jdesktop.jdnc.markup.attr; 9 10 import java.net.URL ; 11 12 import org.jdesktop.jdnc.JNEditor; 13 import org.jdesktop.jdnc.markup.RealizationUtils; 14 import net.openmarkup.ApplierException; 15 import net.openmarkup.AttributeApplier; 16 import net.openmarkup.Realizable; 17 18 23 public class EditorAttributes { 24 25 public static final AttributeApplier sourceApplier = new AttributeApplier() { 26 public void apply(Realizable target, String namespaceURI, 27 String attributeName, String attributeValue) throws 28 ApplierException { 29 URL url = target.getResolvedURL(attributeValue); 31 RealizationUtils.validateURL(url, false); 33 34 JNEditor editor = (JNEditor) target.getObject(); 35 if (url != null) { 36 editor.setInputURL(url); 37 } 38 else { 39 editor.setInputURL(attributeValue); 40 } 41 } 42 }; 43 } | Popular Tags |