Browse Source

REPORT-10535 界面ui修改

research/10.0
kerry 6 years ago
parent
commit
84dd9246f0
  1. 26
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java

26
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java

@ -26,12 +26,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTemplateStyle> { public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTemplateStyle> {
private static final List<String> STYLE_LIST = new ArrayList<String>(); private static final List<MobileTemplateStyle> STYLE_LIST = new ArrayList<MobileTemplateStyle>();
static { static {
STYLE_LIST.add(DefaultMobileTemplateStyle.STYLE_NAME); STYLE_LIST.add(new DefaultMobileTemplateStyle());
STYLE_LIST.add(UpMenuStyle.STYLE_NAME); STYLE_LIST.add(new UpMenuStyle());
STYLE_LIST.add(DownMenuStyle.STYLE_NAME); STYLE_LIST.add(new DownMenuStyle());
STYLE_LIST.add(SliderStyle.STYLE_NAME); STYLE_LIST.add(new SliderStyle());
} }
private DefaultListModel listModel; private DefaultListModel listModel;
@ -49,11 +49,11 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
card = new CardLayout(); card = new CardLayout();
right = FRGUIPaneFactory.createCardLayout_S_Pane(); right = FRGUIPaneFactory.createCardLayout_S_Pane();
right.setLayout(card); right.setLayout(card);
for(String style : STYLE_LIST){ for(MobileTemplateStyle style : STYLE_LIST){
listModel.addElement(style); listModel.addElement(style.toString());
BasicBeanPane<MobileTemplateStyle> styleBasicBeanPane = TemplateStyleDefinePaneFactory.createDefinePane(style, tagLayout); BasicBeanPane<MobileTemplateStyle> styleBasicBeanPane = TemplateStyleDefinePaneFactory.createDefinePane(style.getStyle(), tagLayout);
map.put(style, styleBasicBeanPane); map.put(style.toString(), styleBasicBeanPane);
right.add(style, styleBasicBeanPane); right.add(style.toString(), styleBasicBeanPane);
} }
styleList = new JList(listModel); styleList = new JList(listModel);
styleList.setCellRenderer(render); styleList.setCellRenderer(render);
@ -97,10 +97,10 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
public void populate(MobileTemplateStyle templateStyle) { public void populate(MobileTemplateStyle templateStyle) {
for(int i = 0; i< listModel.getSize(); i++){ for(int i = 0; i< listModel.getSize(); i++){
if((listModel.getElementAt(i)).equals(templateStyle.getStyle())){ if((listModel.getElementAt(i)).equals(templateStyle.toString())){
styleList.setSelectedIndex(i); styleList.setSelectedIndex(i);
map.get(templateStyle.getStyle()).populateBean(templateStyle); map.get(templateStyle.toString()).populateBean(templateStyle);
card.show(right, templateStyle.getStyle()); card.show(right, templateStyle.toString());
return; return;
} }
} }

Loading…
Cancel
Save