Browse Source

Merge pull request #612 in DESIGN/design from ~KERRY/design_10.0:feature/10.0 to feature/10.0

* commit 'e7940ecec9801e7386e545e8fbb08eaa289de154':
  代码修改
  REPORT-10535 界面ui修改
research/10.0
kerry 6 years ago
parent
commit
3037c42ab2
  1. 33
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java

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

@ -4,11 +4,8 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.mobile.ui.TemplateStyleDefinePaneFactory;
import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.cardtag.mobile.DefaultMobileTemplateStyle;
import com.fr.general.cardtag.mobile.DownMenuStyle;
import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import com.fr.general.cardtag.mobile.SliderStyle;
import com.fr.general.cardtag.mobile.UpMenuStyle;
import com.fr.general.cardtag.mobile.MobileTemplateStyleType;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.JList;
@ -26,12 +23,12 @@ import java.util.List;
import java.util.Map;
public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTemplateStyle> {
private static final List<String> STYLE_LIST = new ArrayList<String>();
private static final List<MobileTemplateStyleType> STYLE_LIST = new ArrayList<MobileTemplateStyleType>();
static {
STYLE_LIST.add(DefaultMobileTemplateStyle.STYLE_NAME);
STYLE_LIST.add(UpMenuStyle.STYLE_NAME);
STYLE_LIST.add(DownMenuStyle.STYLE_NAME);
STYLE_LIST.add(SliderStyle.STYLE_NAME);
STYLE_LIST.add(MobileTemplateStyleType.DEFAULT_STYLE);
STYLE_LIST.add(MobileTemplateStyleType.UP_MENU_STYLE);
STYLE_LIST.add(MobileTemplateStyleType.DOWN_MENU_STYLE);
STYLE_LIST.add(MobileTemplateStyleType.SLIDER_STYLE);
}
private DefaultListModel listModel;
@ -49,11 +46,11 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
card = new CardLayout();
right = FRGUIPaneFactory.createCardLayout_S_Pane();
right.setLayout(card);
for(String style : STYLE_LIST){
listModel.addElement(style);
BasicBeanPane<MobileTemplateStyle> styleBasicBeanPane = TemplateStyleDefinePaneFactory.createDefinePane(style, tagLayout);
map.put(style, styleBasicBeanPane);
right.add(style, styleBasicBeanPane);
for(MobileTemplateStyleType style : STYLE_LIST){
listModel.addElement(style.getDisplayName());
BasicBeanPane<MobileTemplateStyle> styleBasicBeanPane = TemplateStyleDefinePaneFactory.createDefinePane(style.getStyle(), tagLayout);
map.put(style.getDisplayName(), styleBasicBeanPane);
right.add(style.getDisplayName(), styleBasicBeanPane);
}
styleList = new JList(listModel);
styleList.setCellRenderer(render);
@ -97,10 +94,12 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
public void populate(MobileTemplateStyle templateStyle) {
for(int i = 0; i< listModel.getSize(); i++){
if((listModel.getElementAt(i)).equals(templateStyle.getStyle())){
String style = templateStyle.getStyle();
MobileTemplateStyleType templateStyleType = MobileTemplateStyleType.parse(style);
if((listModel.getElementAt(i)).equals(templateStyleType.getDisplayName())){
styleList.setSelectedIndex(i);
map.get(templateStyle.getStyle()).populateBean(templateStyle);
card.show(right, templateStyle.getStyle());
map.get(templateStyle.toString()).populateBean(templateStyle);
card.show(right, templateStyle.toString());
return;
}
}

Loading…
Cancel
Save