OSDN Git Service

initial commit
[xdf/git-repos.git] / xdf-swingx / src / main / java / jp / ac / aiit / xdf / component / swingx / mapper / JXTreeTableMapper.java
1 package jp.ac.aiit.xdf.component.swingx.mapper;
2
3 import java.util.Map;
4
5 import jp.ac.aiit.xdf.component.swing.attribute.AttributeProcessingUnit;
6 import jp.ac.aiit.xdf.component.swing.attribute.CommonAttributeStore;
7 import jp.ac.aiit.xdf.component.swing.attribute.ObjectModelAttributeGetProcessor;
8 import jp.ac.aiit.xdf.component.swing.attribute.SetterAttributeProcessor;
9 import jp.ac.aiit.xdf.component.swing.mappers.SwingComponentMapperTemplate;
10 import jp.ac.aiit.xdf.component.swingx.datasource.TreetableDataSource;
11 import jp.ac.aiit.xdf.core.action.EventHandler;
12 import jp.ac.aiit.xdf.core.typeconvert.InstanciationConverter;
13
14 import org.jdesktop.swingx.JXTreeTable;
15
16 public class JXTreeTableMapper extends SwingComponentMapperTemplate {
17
18         @Override
19         protected Map<String, AttributeProcessingUnit> initProcessingUnits() {
20                 Map<String, AttributeProcessingUnit> result = CommonAttributeStore.commonAttributes(model);
21                 result.put("model", new AttributeProcessingUnit(new SetterAttributeProcessor("setTreeTableModel", false), new ObjectModelAttributeGetProcessor(model), new InstanciationConverter<TreetableDataSource>()));
22         
23                 return result;
24         }
25
26         @Override
27         protected Object newComponent() {
28                 return new JXTreeTable();
29         }
30
31         @Override
32         protected void processingChildComponents() { }
33
34         @Override
35         protected Map<String, EventHandler> intiProcessingAction() {
36                 // TODO Auto-generated method stub
37                 return null;
38         }
39 }