KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > jdnc > markup > elem > TreeTableColumnsElement


1 /*
2  * $Id: TreeTableColumnsElement.java,v 1.1.1.1 2004/06/16 01:43:40 davidson1 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.elem;
9
10 import org.jdesktop.swing.table.TableColumnExt;
11
12 import java.util.Hashtable JavaDoc;
13 import java.util.Map JavaDoc;
14
15 import javax.swing.table.DefaultTableColumnModel JavaDoc;
16 import javax.swing.table.TableColumnModel JavaDoc;
17
18 import net.openmarkup.ElementAssimilator;
19 import net.openmarkup.ElementHandler;
20 import net.openmarkup.ElementType;
21 import net.openmarkup.Realizable;
22
23 import org.w3c.dom.Element JavaDoc;
24
25 import org.jdesktop.jdnc.markup.ElementTypes;
26 import org.jdesktop.jdnc.markup.Namespace;
27
28 /**
29  *
30  * @author Ramesh Gupta
31  */

32 public class TreeTableColumnsElement extends TableColumnsElement {
33     private static final Map JavaDoc elementMap = new Hashtable JavaDoc();
34
35     public TreeTableColumnsElement(Element JavaDoc element, ElementType elementType) {
36         super(element, elementType);
37     }
38
39     protected Map JavaDoc getElementHandlerMap() {
40         return elementMap;
41     }
42
43     protected Map JavaDoc registerElementHandlers() {
44         Map JavaDoc handlerMap = super.registerElementHandlers();
45         if (handlerMap != null) {
46             handlerMap.put(Namespace.JDNC + ":" +
47                            ElementTypes.TREE_TABLE_COLUMN.getLocalName(),
48                            tableColumnElementHandler);
49         }
50         return handlerMap;
51     }
52
53     private static final ElementHandler tableColumnElementHandler =
54          new ElementHandler(ElementTypes.TREE_TABLE_COLUMN, tableColumnAssimilator);
55 }
56
Popular Tags