Browse Source

超级链接-移动端弹窗

persist/11.0-arabic
obo 4 months ago
parent
commit
de8cf02d68
  1. 8
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  2. 9
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  3. 4
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  4. 13
      designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java

8
designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java

@ -3,6 +3,7 @@ package com.fr.design.hyperlink.popup;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.formula.TinyFormulaPane;
@ -73,6 +74,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
templateContentPane= this.createTemplateContentPane();
textSettingPanel = this.createTextSettingPane();
BidiUtils.applyOrientationByLocale(this);
}
private JPanel createPopupTargetPane() {
@ -87,7 +89,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
popupTargetButtons.add(textPopupButton);
JPanel popupButtonsPanel = new JPanel();
popupButtonsPanel.setLayout( new FlowLayout(FlowLayout.LEFT, 10, 0));
popupButtonsPanel.setLayout( new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 10, 0));
popupButtonsPanel.add(templatePopupButton);
popupButtonsPanel.add(textPopupButton);
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Target"), popupButtonsPanel);
@ -118,7 +120,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
templateContentPane.add(parameterViewPane, BorderLayout.CENTER);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
templateContentPane.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
templateContentPane.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT), BorderLayout.SOUTH);
return templateContentPane;
}
@ -132,7 +134,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
// 选择路径按钮
UIButton templateSelectButton = new UIButton(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Select"));
templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, 20));
templatePanel.add(templateSelectButton, BorderLayout.EAST);
templatePanel.add(templateSelectButton, BidiUtils.rtl() ? BorderLayout.WEST : BorderLayout.EAST);
templateSelectButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {

9
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.widget.UITitleSplitLine;
@ -15,10 +16,10 @@ public class MobilePopupUIUtils {
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(0,0,0, 30));
jp.setLayout(new BorderLayout(10,0));
UILabel titleLabel = new UILabel(title + ":");
UILabel titleLabel = new UILabel(BidiUtils.reverseConcatenateStrings(title, ":"));
titleLabel.setPreferredSize(new Dimension(MobilePopupUIUtils.Left_Title_width, Line_Height));
titleLabel.setHorizontalAlignment(SwingConstants.RIGHT);
jp.add(titleLabel, BorderLayout.WEST);
titleLabel.setHorizontalAlignment(BidiUtils.rtl() ? SwingConstants.LEFT : SwingConstants.RIGHT);
jp.add(titleLabel, BidiUtils.rtl()? BorderLayout.EAST : BorderLayout.WEST);
jp.add(contentPanel, BorderLayout.CENTER);
return jp;
}
@ -30,7 +31,7 @@ public class MobilePopupUIUtils {
UITitleSplitLine titleLine = new UITitleSplitLine(title, SplitLineWidth);
titleLine.setPreferredSize(new Dimension(SplitLineWidth, Line_Height));
jp.add(titleLine, BorderLayout.NORTH);
jp.add(contentPanel, BorderLayout.CENTER);
jp.add(contentPanel, BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.CENTER);
return jp;
}
}

4
designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.icombobox.LineComboBox;
@ -47,12 +48,13 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
this.add(typePane, BorderLayout.NORTH);
stylePane = this.createStylePane();
this.add(stylePane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
private JPanel createTypePane() {
JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
popupTypeLabel = new UILabel("");
typePane.add(popupTypeLabel, BorderLayout.CENTER);
typePane.add(popupTypeLabel, BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.CENTER);
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"), typePane);
}

13
designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java

@ -1,7 +1,9 @@
package com.fr.design.mainframe.widget;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.FRFont;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension;
@ -35,6 +37,16 @@ public class UITitleSplitLine extends JPanel {
Dimension size = label.getPreferredSize();
int labelH = size.height;
g.setColor(color);
if (BidiUtils.rtl()) {
g.drawLine(0, labelH / 2, width - OFFSETX - size.width - OFFSET * 2, labelH / 2);
g.drawLine(width - OFFSETX, labelH / 2, width, labelH / 2);
g.translate(width - OFFSETX - size.width - OFFSET, 0);
label.setFont(TITLE_FONT);
label.setForeground(TITLE_COLOR);
label.setSize(size.width, size.height);
label.paint(g);
g.translate(-width + OFFSETX + size.width + OFFSET, 0);
} else {
g.drawLine(0, labelH / 2, OFFSETX, labelH / 2);
g.drawLine(OFFSETX + size.width + OFFSET * 2, labelH / 2, width, labelH / 2);
g.translate(OFFSETX + OFFSET, 0);
@ -44,6 +56,7 @@ public class UITitleSplitLine extends JPanel {
label.paint(g);
g.translate(-OFFSETX - OFFSET, 0);
}
}

Loading…
Cancel
Save