01: package org.swingml.treetablebrowser.ext;
02:
03: import java.awt.*;
04:
05: import org.swingml.*;
06: import org.swingml.xml.*;
07: import org.w3c.dom.*;
08:
09: public class TreeTableBrowserNodeMapper extends MapperUtil implements
10: Mapper {
11:
12: public Object getModelToMap(Node aNode, Object aParent,
13: Container aContainer) {
14: TreeTableBrowserNodeModel theTreeTableNodeModel = new TreeTableBrowserNodeModel(
15: aContainer);
16: SwingMLModel theContainer = (SwingMLModel) aParent;
17: theContainer.addChild(theTreeTableNodeModel);
18: theTreeTableNodeModel.setParent(theContainer);
19: return theTreeTableNodeModel;
20: }
21:
22: public void mapModel(Node aNode, Object aParent,
23: Container aContainer) {
24: TreeTableBrowserNodeModel theTreeTableNodeModel = (TreeTableBrowserNodeModel) this
25: .getModelToMap(aNode, aParent, aContainer);
26: this .mapModelAttributes(aNode, theTreeTableNodeModel, aParent);
27: super .iterate(aNode, theTreeTableNodeModel, aContainer);
28: }
29:
30: public void mapModelAttributes(Node aNode, Object aModel,
31: Object aParent) {
32: TreeTableBrowserNodeModel theTreeTableNodeModel = (TreeTableBrowserNodeModel) aModel;
33: super.mapCommonAttributes(theTreeTableNodeModel, aNode);
34: }
35: }
|