diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java index 97e1903f08..9a344b8cb7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java @@ -40,6 +40,26 @@ public class MobileStylePane extends BasicPane { private CardLayout card; private JList styleList; private Map> map = new HashMap<>(); + private static Set set = new HashSet<>(); + + static { + SimpleStyleProvider simpleStyleProvider = new SimpleStyleProvider(); + NavigationStyleProvider navigationStyleProvider = new NavigationStyleProvider(); + SimpleDateStyleProvider simpleDateStyleProvider = new SimpleDateStyleProvider(); + SimpleComboStyleProvider simpleComboStyleProvider = new SimpleComboStyleProvider(); + SimpleComboCheckBoxStyleProvider simpleComboCheckBoxStyleProvider = new SimpleComboCheckBoxStyleProvider(); + CapsuleRadioGroupStyleProvider capsuleRadioGroupStyleProvider = new CapsuleRadioGroupStyleProvider(); + UnitedRadioGroupStyleProvider unitedRadioGroupStyleProvider = new UnitedRadioGroupStyleProvider(); + ImageRadioGroupStyleProvider imageRadioGroupStyleProvider = new ImageRadioGroupStyleProvider(); + set.add(simpleStyleProvider); + set.add(navigationStyleProvider); + set.add(simpleDateStyleProvider); + set.add(simpleComboStyleProvider); + set.add(simpleComboCheckBoxStyleProvider); + set.add(capsuleRadioGroupStyleProvider); + set.add(unitedRadioGroupStyleProvider); + set.add(imageRadioGroupStyleProvider); + } public MobileStylePane(Widget widget) { if(widget instanceof WScaleLayout) { @@ -142,24 +162,6 @@ public class MobileStylePane extends BasicPane { private MobileWidgetStyleProvider[] getMobileWidgetStyleProviders() { DefaultMobileWidgetStyleProvider defaultMobileWidgetStyleProvider = new DefaultMobileWidgetStyleProvider(); - SimpleStyleProvider simpleStyleProvider = new SimpleStyleProvider(); - NavigationStyleProvider navigationStyleProvider = new NavigationStyleProvider(); - SimpleDateStyleProvider simpleDateStyleProvider = new SimpleDateStyleProvider(); - SimpleComboStyleProvider simpleComboStyleProvider = new SimpleComboStyleProvider(); - SimpleComboCheckBoxStyleProvider simpleComboCheckBoxStyleProvider = new SimpleComboCheckBoxStyleProvider(); - CapsuleRadioGroupStyleProvider capsuleRadioGroupStyleProvider = new CapsuleRadioGroupStyleProvider(); - UnitedRadioGroupStyleProvider unitedRadioGroupStyleProvider = new UnitedRadioGroupStyleProvider(); - ImageRadioGroupStyleProvider imageRadioGroupStyleProvider = new ImageRadioGroupStyleProvider(); - - Set set = new HashSet<>(); - set.add(simpleStyleProvider); - set.add(navigationStyleProvider); - set.add(simpleDateStyleProvider); - set.add(simpleComboStyleProvider); - set.add(simpleComboCheckBoxStyleProvider); - set.add(capsuleRadioGroupStyleProvider); - set.add(unitedRadioGroupStyleProvider); - set.add(imageRadioGroupStyleProvider); List providers = new ArrayList<>(); for (MobileWidgetStyleProvider provider : set) {