|
|
@ -4,6 +4,8 @@ import com.fr.base.iofile.attr.FormTabPaddingAttrMark; |
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
|
|
|
|
import com.fr.design.dialog.AttrScrollPane; |
|
|
|
|
|
|
|
import com.fr.design.dialog.BasicScrollPane; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.form.util.FormDesignerUtils; |
|
|
|
import com.fr.design.form.util.FormDesignerUtils; |
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
@ -15,7 +17,6 @@ import com.fr.design.mainframe.FormDesigner; |
|
|
|
import com.fr.design.mainframe.WidgetPropertyPane; |
|
|
|
import com.fr.design.mainframe.WidgetPropertyPane; |
|
|
|
import com.fr.design.mainframe.widget.accessibles.AccessibleTemplateStyleEditor; |
|
|
|
import com.fr.design.mainframe.widget.accessibles.AccessibleTemplateStyleEditor; |
|
|
|
import com.fr.design.mainframe.widget.accessibles.MobileTemplateStylePane; |
|
|
|
import com.fr.design.mainframe.widget.accessibles.MobileTemplateStylePane; |
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileAdvanceInnerPane; |
|
|
|
|
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane; |
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane; |
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentMarginPane; |
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentMarginPane; |
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentLayoutIntervalPane; |
|
|
|
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentLayoutIntervalPane; |
|
|
@ -23,7 +24,9 @@ import com.fr.design.widget.ui.designer.mobile.component.MobileTabCommonSettingP |
|
|
|
import com.fr.form.ui.container.cardlayout.WCardTagLayout; |
|
|
|
import com.fr.form.ui.container.cardlayout.WCardTagLayout; |
|
|
|
import com.fr.general.cardtag.mobile.MobileTemplateStyle; |
|
|
|
import com.fr.general.cardtag.mobile.MobileTemplateStyle; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
|
|
|
@ -36,9 +39,22 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { |
|
|
|
private MobileComponentLayoutIntervalPane intervalPane; |
|
|
|
private MobileComponentLayoutIntervalPane intervalPane; |
|
|
|
private MobileBookMarkUsePane mobileBookMarkUsePane; |
|
|
|
private MobileBookMarkUsePane mobileBookMarkUsePane; |
|
|
|
private MobileTabCommonSettingPane mobileTabCommonSettingPane; |
|
|
|
private MobileTabCommonSettingPane mobileTabCommonSettingPane; |
|
|
|
|
|
|
|
private JPanel contentJPanel; |
|
|
|
|
|
|
|
private BasicScrollPane scrollPane; |
|
|
|
|
|
|
|
private JPanel holder; |
|
|
|
|
|
|
|
private Dimension dimension; |
|
|
|
|
|
|
|
|
|
|
|
public TabMobileWidgetDefinePane(XCreator xCreator) { |
|
|
|
public TabMobileWidgetDefinePane(XCreator xCreator) { |
|
|
|
this.xCreator = xCreator; |
|
|
|
this.xCreator = xCreator; |
|
|
|
|
|
|
|
contentJPanel = FRGUIPaneFactory.createCenterFlowZeroGapBorderPane(); |
|
|
|
|
|
|
|
scrollPane = new AttrScrollPane() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
|
|
|
|
return contentJPanel; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
scrollPane.setBorder(null); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void bindListeners2Widgets() { |
|
|
|
private void bindListeners2Widgets() { |
|
|
@ -61,11 +77,23 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void initPropertyGroups(Object source) { |
|
|
|
public void initPropertyGroups(Object source) { |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); |
|
|
|
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); |
|
|
|
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); |
|
|
|
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template")); |
|
|
|
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template")); |
|
|
|
templateStyleEditor = new AccessibleTemplateStyleEditor(new MobileTemplateStylePane((WCardTagLayout) xCreator.toData())); |
|
|
|
templateStyleEditor = new AccessibleTemplateStyleEditor(new MobileTemplateStylePane((WCardTagLayout) xCreator.toData())); |
|
|
|
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE); |
|
|
|
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE); |
|
|
|
JPanel holder = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
holder = new JPanel(new BorderLayout()) { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
|
|
|
if (dimension == null) { |
|
|
|
|
|
|
|
return super.getPreferredSize(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Dimension defaultDimension = super.getPreferredSize(); |
|
|
|
|
|
|
|
defaultDimension.width = dimension.width; |
|
|
|
|
|
|
|
return defaultDimension; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
holder.add(jPanel, BorderLayout.NORTH); |
|
|
|
holder.add(jPanel, BorderLayout.NORTH); |
|
|
|
JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
if (!shouldHidePadding(designer)) { |
|
|
|
if (!shouldHidePadding(designer)) { |
|
|
@ -89,13 +117,17 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { |
|
|
|
//高级
|
|
|
|
//高级
|
|
|
|
holder.add(advancePane, BorderLayout.CENTER); |
|
|
|
holder.add(advancePane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
this.add(holder, BorderLayout.NORTH); |
|
|
|
contentJPanel.add(holder, BorderLayout.CENTER); |
|
|
|
|
|
|
|
this.add(scrollPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void populate(FormDesigner designer) { |
|
|
|
public void populate(FormDesigner designer) { |
|
|
|
WCardTagLayout wCardTagLayout = (WCardTagLayout) xCreator.toData(); |
|
|
|
WCardTagLayout wCardTagLayout = (WCardTagLayout) xCreator.toData(); |
|
|
|
MobileTemplateStyle mobileTemplateStyle = wCardTagLayout.getMobileTemplateStyle(); |
|
|
|
MobileTemplateStyle mobileTemplateStyle = wCardTagLayout.getMobileTemplateStyle(); |
|
|
|
|
|
|
|
if (dimension == null) { |
|
|
|
|
|
|
|
dimension = holder.getPreferredSize(); |
|
|
|
|
|
|
|
} |
|
|
|
templateStyleEditor.setValue(mobileTemplateStyle); |
|
|
|
templateStyleEditor.setValue(mobileTemplateStyle); |
|
|
|
// 数据 populate 完成后,再设置监听
|
|
|
|
// 数据 populate 完成后,再设置监听
|
|
|
|
this.bindListeners2Widgets(); |
|
|
|
this.bindListeners2Widgets(); |
|
|
|