From 17158639ffe15c0051ef832570975779ad356899 Mon Sep 17 00:00:00 2001 From: Heyman Date: Tue, 17 Aug 2021 19:08:40 +0800 Subject: [PATCH] =?UTF-8?q?MOBILE-32704=2011.0=E9=83=A8=E5=88=86=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=86=85=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/mobile/ui/MobileStylePane.java | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) 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) {