1 package jp.ac.aiit.xdf.component.swing.mappers;
3 import java.awt.FlowLayout;
6 import javax.swing.Icon;
7 import javax.swing.ImageIcon;
9 import jp.ac.aiit.xdf.component.swing.Tabpanel;
10 import jp.ac.aiit.xdf.component.swing.attribute.AttributeProcessingUnit;
11 import jp.ac.aiit.xdf.component.swing.attribute.GetterAttributeProcessor;
12 import jp.ac.aiit.xdf.component.swing.attribute.IconProcessor;
13 import jp.ac.aiit.xdf.component.swing.attribute.ObjectModelAttributeGetProcessor;
14 import jp.ac.aiit.xdf.component.swing.attribute.SetterAttributeProcessor;
15 import jp.ac.aiit.xdf.component.swing.event.SwingEventHandler;
16 import jp.ac.aiit.xdf.core.action.EventHandler;
17 import jp.ac.aiit.xdf.core.typeconvert.StringConverter;
20 * <tab />のComponentMaper。<group>のもの(JPanelMapper)を基本とする。
23 public class TabpanelMapper extends JPanelMapper {
26 protected Map<String, AttributeProcessingUnit> initProcessingUnits() {
27 Map<String, AttributeProcessingUnit> result = super.initProcessingUnits();
28 result.put("title", new AttributeProcessingUnit(new SetterAttributeProcessor("setName", false), new GetterAttributeProcessor("getName"), new StringConverter()));
29 result.put("img", new AttributeProcessingUnit(new IconProcessor(), new ObjectModelAttributeGetProcessor(model), new StringConverter()));
30 result.put("access", new AttributeProcessingUnit(new SetterAttributeProcessor("setAccessKey", false), new GetterAttributeProcessor("getAccessKey"), new StringConverter()));
35 @SuppressWarnings("serial")
37 protected Object newComponent() {
38 Tabpanel tabpanel = new Tabpanel(){
39 @SuppressWarnings("unused")
40 public void setIcon(ImageIcon icon){setIcon((Icon)icon);}
42 tabpanel.setLayout(new FlowLayout());
48 protected Map<String, EventHandler> intiProcessingAction() {
49 Map<String, EventHandler> action = SwingEventHandler.commonEvent();