|
|
|
@ -3,10 +3,10 @@ package com.fr.design.hyperlink.popup;
|
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.base.Parameter; |
|
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
|
import com.fr.design.formula.TinyFormulaPane; |
|
|
|
|
import com.fr.design.fun.DefaultValueAdjustProvider; |
|
|
|
|
import com.fr.design.gui.frpane.ReportletParameterViewPane; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.ibutton.UIRadioButton; |
|
|
|
@ -20,6 +20,7 @@ import com.fr.design.i18n.Toolkit;
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.module.DesignModuleFactory; |
|
|
|
|
import com.fr.design.parameter.ParameterReader; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.js.MobilePopupHyperlink; |
|
|
|
|
import com.fr.stable.CommonUtils; |
|
|
|
@ -121,7 +122,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
|
|
|
|
|
JPanel templateContentPane = new JPanel(); |
|
|
|
|
templateContentPane.setLayout(new BorderLayout(0,8)); |
|
|
|
|
|
|
|
|
|
if (DesignModeContext.isDuchampMode()) { |
|
|
|
|
if (isNeedShowPostCombo()) { |
|
|
|
|
JPanel jPanel = new JPanel(new BorderLayout(0, 5)); |
|
|
|
|
jPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
|
jPanel.add(this.createTemplateSelectPanel(), BorderLayout.NORTH); |
|
|
|
@ -140,6 +141,14 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
|
|
|
|
|
return templateContentPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean isNeedShowPostCombo() { |
|
|
|
|
DefaultValueAdjustProvider valueAdjust = DesignUtils.getValueAdjust(); |
|
|
|
|
if (valueAdjust != null) { |
|
|
|
|
return valueAdjust.isNeedPostCombo4MobilePopupPane(); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createTemplateSelectPanel() { |
|
|
|
|
JPanel templatePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
// 路径输入框
|
|
|
|
@ -216,6 +225,10 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void populateBean(MobilePopupHyperlink link) { |
|
|
|
|
DefaultValueAdjustProvider valueAdjust = DesignUtils.getValueAdjust(); |
|
|
|
|
if (valueAdjust != null) { |
|
|
|
|
valueAdjust.adjustMobilePopupHyperlinkWhenPopulate(link); |
|
|
|
|
} |
|
|
|
|
this.populatePopupTargetBean(link.getPopupTarget()); |
|
|
|
|
this.populateTemplateContentBean(link); |
|
|
|
|
this.populateTextContentBean(link); |
|
|
|
@ -311,7 +324,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
|
|
|
|
|
ParameterProvider[] parameters =link.getParameters(); |
|
|
|
|
parameterViewPane.populate(parameters); |
|
|
|
|
|
|
|
|
|
if (DesignModeContext.isDuchampMode()) { |
|
|
|
|
if (isNeedShowPostCombo()) { |
|
|
|
|
this.postComboBox.setSelectedIndex(link.isByPost() ? 1 : 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -322,7 +335,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
|
|
|
|
|
private void updateTemplateContentBean(MobilePopupHyperlink link) { |
|
|
|
|
link.setReportletPath(templatePathTextField.getText()); |
|
|
|
|
|
|
|
|
|
if (DesignModeContext.isDuchampMode()) { |
|
|
|
|
if (isNeedShowPostCombo()) { |
|
|
|
|
link.setByPost(postComboBox.getSelectedIndex() == 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|