KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > jdnc > markup > attr > FormComponentAttributes


1 /*
2  * $Id: FormComponentAttributes.java,v 1.3 2005/01/27 14:40:30 kleopatra Exp $
3  *
4  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5  * Santa Clara, California 95054, U.S.A. All rights reserved.
6  */

7
8 package org.jdesktop.jdnc.markup.attr;
9
10 import org.jdesktop.swing.data.DataModel;
11 import org.jdesktop.swing.data.DefaultTableModelExt;
12 import org.jdesktop.swing.data.TableModelExtAdapter;
13
14 import org.jdesktop.swing.binding.Binding;
15 import org.jdesktop.swing.binding.BindException;
16
17 import org.jdesktop.swing.form.JForm;
18 import org.jdesktop.swing.form.RowSelector;
19
20 import org.jdesktop.jdnc.JNForm;
21 import org.jdesktop.jdnc.JNTable;
22
23 import org.jdesktop.jdnc.markup.elem.FormElement;
24
25 import net.openmarkup.ApplierException;
26 import net.openmarkup.AttributeApplier;
27 import net.openmarkup.Realizable;
28
29
30 /**
31  * @author Amy Fowler
32  */

33 public class FormComponentAttributes {
34
35     public static final AttributeApplier dataApplier = new AttributeApplier() {
36         public void apply(Realizable target, String JavaDoc namespaceURI,
37                           String JavaDoc attributeName, String JavaDoc attributeValue)
38             throws ApplierException {
39             Object JavaDoc data = BaseAttribute.getReferencedObject(target,
40                 attributeValue);
41             Object JavaDoc binding[] = (Object JavaDoc[]) target.getObject();
42             binding[0] = data;
43         }
44
45     };
46
47     public static final AttributeApplier bindingApplier = new AttributeApplier() {
48         public void apply(Realizable target, String JavaDoc namespaceURI,
49                           String JavaDoc attributeName, String JavaDoc attributeValue)
50             throws ApplierException {
51             Object JavaDoc binding[] = (Object JavaDoc[]) target.getObject();
52             binding[1] = attributeValue;
53         }
54     };
55
56      // ...
57
}
58
Popular Tags