|
|
|
@ -5,10 +5,19 @@ import com.fr.design.beans.BasicBeanPane;
|
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.fun.MobileWidgetStyleProvider; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.combo.SimpleComboCheckBoxStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.combo.SimpleComboStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.date.NavigationStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.date.SimpleDateStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.date.SimpleStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.radiogroup.CapsuleRadioGroupStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.radiogroup.ImageRadioGroupStyleProvider; |
|
|
|
|
import com.fr.design.mainframe.mobile.provider.radiogroup.UnitedRadioGroupStyleProvider; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.form.ui.container.WScaleLayout; |
|
|
|
|
import com.fr.form.ui.mobile.MobileStyle; |
|
|
|
|
import com.fr.form.ui.widget.CRBoundsWidget; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
|
|
|
|
@ -16,8 +25,12 @@ import javax.swing.*;
|
|
|
|
|
import javax.swing.event.ListSelectionEvent; |
|
|
|
|
import javax.swing.event.ListSelectionListener; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
public class MobileStylePane extends BasicPane { |
|
|
|
|
|
|
|
|
@ -129,8 +142,36 @@ public class MobileStylePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
private MobileWidgetStyleProvider[] getMobileWidgetStyleProviders() { |
|
|
|
|
DefaultMobileWidgetStyleProvider defaultMobileWidgetStyleProvider = new DefaultMobileWidgetStyleProvider(); |
|
|
|
|
MobileWidgetStyleProvider[] styleProviders = ExtraDesignClassManager.getInstance().getMobileStyleOfWidget(widget.getXType()); |
|
|
|
|
styleProviders = ArrayUtils.insert(0, styleProviders, 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<MobileWidgetStyleProvider> 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<MobileWidgetStyleProvider> providers = new ArrayList<>(); |
|
|
|
|
for (MobileWidgetStyleProvider provider : set) { |
|
|
|
|
if (ComparatorUtils.equalsIgnoreCase(provider.xTypeForWidget(), widget.getXType())) { |
|
|
|
|
providers.add(provider); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
List<MobileWidgetStyleProvider> otherProviders = ExtraDesignClassManager.getInstance().getMobileStyleOfWidget(widget.getXType()); |
|
|
|
|
providers.addAll(otherProviders); |
|
|
|
|
MobileWidgetStyleProvider[] styleProviders = providers.toArray(new MobileWidgetStyleProvider[providers.size()]); |
|
|
|
|
|
|
|
|
|
styleProviders = ArrayUtils.insert(0, styleProviders, defaultMobileWidgetStyleProvider); |
|
|
|
|
return styleProviders; |
|
|
|
|
} |
|
|
|
|
} |