Browse Source

模版web属性-剩余部分

persist/11.0-arabic
obo 4 months ago
parent
commit
ea2985a048
  1. 2
      designer-base/src/main/java/com/fr/design/layout/VerticalFlowLayout.java
  2. 7
      designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java
  3. 24
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  4. 12
      designer-realize/src/main/java/com/fr/design/webattr/PageWebSettingPane.java
  5. 13
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java
  6. 5
      designer-realize/src/main/java/com/fr/design/webattr/ViewWebSettingPane.java
  7. 15
      designer-realize/src/main/java/com/fr/design/webattr/WebSettingPane.java
  8. 9
      designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java

2
designer-base/src/main/java/com/fr/design/layout/VerticalFlowLayout.java

@ -397,7 +397,7 @@ public class VerticalFlowLayout implements LayoutManager, java.io.Serializable {
if (ltr) {
m.setLocation(isAlignLeft ? x : newX, y);
} else {
m.setLocation(isAlignLeft ? target.getWidth() - m.getWidth() - hgap : newX, target.getHeight() - y - m.getHeight());
m.setLocation(isAlignLeft ? target.getWidth() - m.getWidth() - x : newX, target.getHeight() - y - m.getHeight() / 2);
}
y += m.getHeight() + vgap;
}

7
designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java

@ -2,6 +2,7 @@ package com.fr.design.style.background.impl;
import com.fr.base.GraphHelper;
import com.fr.base.background.PatternBackground;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.color.ColorSelectBox;
@ -72,13 +73,11 @@ public class PatternBackgroundPane extends BPane {
backgroundColorPane.setSelectObject(Color.black);
colorPane.add(Box.createHorizontalStrut(2));
colorPane.add(this.createLabelColorPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground")
+ ":", foregroundColorPane));
colorPane.add(this.createLabelColorPane(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground"), ":"), foregroundColorPane));
colorPane.add(Box.createHorizontalStrut(8));
colorPane.add(this.createLabelColorPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background")
+ ":", backgroundColorPane));
colorPane.add(this.createLabelColorPane(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), ":"), backgroundColorPane));
}
private JPanel createLabelColorPane(String text,

24
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -1,6 +1,7 @@
package com.fr.design.webattr;
import com.fr.base.BaseUtils;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.designer.IntervalConstants;
@ -22,6 +23,7 @@ import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JWorkBook;
import com.fr.design.menu.ToolBarDef;
@ -46,7 +48,6 @@ import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.write.JavaScriptResourceInfo;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
@ -170,7 +171,7 @@ public class EditToolBar extends BasicPane {
splitPane.setDividerLocation(120);
this.add(splitPane);
list.addListSelectionListener(listSelectionListener);
JPanel backgroundPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, 0, 0, 0);
JPanel backgroundPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
UIButton bgButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background"));
defaultCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default_Background"));
bgButton.addActionListener(actioner);
@ -419,7 +420,7 @@ public class EditToolBar extends BasicPane {
double rowSize[] = {p, p};
double columnSize[] = {p, p};
Component[][] coms = new Component[][]{{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Printer_Alias") + ":"), nameField}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Icon") + ":"), iconPane}};
Component[][] coms = new Component[][]{{new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Printer_Alias"), ":")), nameField}, {new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Icon"), ":")), iconPane}};
JPanel nameIconPane = TableLayoutHelper.createTableLayoutPane(coms, rowSize, columnSize);
@ -444,6 +445,7 @@ public class EditToolBar extends BasicPane {
}
this.add(centerPane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
@ -452,13 +454,13 @@ public class EditToolBar extends BasicPane {
button = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_User_Defined_Event"));
customPane.add(button);
customPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit") + "JS", null));
customPane.setBorder(GUICoreUtils.createTitledBorder(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"), "JS"), null));
button.addActionListener(l);
return customPane;
}
private JPanel getExport() {
JPanel export = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
JPanel export = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, VerticalFlowLayout.TOP, 0, 0);
// export.setLayout(new BoxLayout(export, BoxLayout.Y_AXIS));
pdf = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Output_PDF"));
excelP = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Output_Excel_Page"));
@ -467,35 +469,27 @@ public class EditToolBar extends BasicPane {
word = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Output_Word"));
image = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Image"));
export.add(pdf);
export.add(Box.createVerticalStrut(2));
export.add(excelP);
export.add(Box.createVerticalStrut(2));
export.add(excelO);
export.add(Box.createVerticalStrut(2));
export.add(excelS);
export.add(Box.createVerticalStrut(2));
export.add(word);
export.add(Box.createVerticalStrut(2));
export.add(image);
for (int i = 0; i < ArrayUtils.getLength(exportToolBarProviders); i++) {
export = exportToolBarProviders[i].updateCenterPane(export);
}
export.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"), null));
export.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"), null));
return export;
}
private JPanel getEmail() {
JPanel email = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
JPanel email = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, VerticalFlowLayout.TOP, 0, 0);
customConsignee = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Custom_Consignee"));
consigneeByDepartment = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Consignee_By_Department"));
consigneeByRole = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Consignee_By_Role"));
email.add(customConsignee);
email.add(Box.createVerticalStrut(2));
email.add(consigneeByDepartment);
email.add(Box.createVerticalStrut(2));
email.add(consigneeByRole);
email.add(Box.createVerticalStrut(2));
email.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"), null));
return email;

12
designer-realize/src/main/java/com/fr/design/webattr/PageWebSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.webattr;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.ibutton.UIRadioButton;
@ -101,7 +102,7 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
}
});
UILabel linesPerPageLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Rows_Per_Page") + ":");
UILabel linesPerPageLabel = new UILabel(BidiUtils.reverseConcatenateStrings(Toolkit.i18nText("Fine-Design_Report_Rows_Per_Page"), ":"));
Component[][] rowCountTextFieldComponents = {{linesPerPageLabel,pageFixedRowCountTextField}};
JPanel linesPerPagePane = TableLayoutHelper.createTableLayoutPane(rowCountTextFieldComponents, new double[]{p}, new double[]{p,p});
UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Page_Fixed_Row_Tip"));
@ -110,9 +111,9 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
double[] columnSize = {p, p, p, p};
double[] rowSize = {p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location") + ":", UILabel.RIGHT), buttonpane, null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_PageSetup_Page") + ":", UILabel.RIGHT), isShowAsImageBox, isAutoScaleBox, isTDHeavyBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Paging_Settings") + ":", UILabel.RIGHT), isPageFixedRowBox, linesPerPagePane, null},
new Component[]{createBidiUILabel("Fine-Design_Report_Show_Location"), buttonpane, null, null},
new Component[]{createBidiUILabel("Fine-Design_Report_PageSetup_Page"), isShowAsImageBox, isAutoScaleBox, isTDHeavyBox},
new Component[]{createBidiUILabel("Fine-Design_Report_Paging_Settings"), isPageFixedRowBox, linesPerPagePane, null},
new Component[]{null, tipLabel, null, null}
};
@ -120,6 +121,9 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
}
private UILabel createBidiUILabel(String i18nKey) {
return new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText(i18nKey), ":"), BidiUtils.rtl() ? UILabel.LEFT : UILabel.RIGHT);
}
@Override
protected void checkEnabled(boolean isSelected) {

13
designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java

@ -1,6 +1,7 @@
package com.fr.design.webattr;
import com.fr.base.BaseUtils;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.ibutton.UIButton;
@ -26,9 +27,11 @@ import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.ComponentOrientation;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -49,7 +52,7 @@ public class ToolBarDragPane extends WidgetToolBarPane {
private int row = 7;
private DefaultTableModel toolbarButtonTableModel;
private JTable layoutTable;
private UICheckBox isUseToolBarCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_ToolBar") + ":"); // 是否使用工具栏
private UICheckBox isUseToolBarCheckBox = new UICheckBox(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_ToolBar"), ":")); // 是否使用工具栏
private boolean isEnabled;
public ToolBarDragPane() {
@ -79,8 +82,8 @@ public class ToolBarDragPane extends WidgetToolBarPane {
ToolBarDragPane.this.repaint();
}
});
north.add(isUseToolBarCheckBox, BorderLayout.WEST);
BidiUtils.setOrientationByLocale(isUseToolBarCheckBox);
north.add(isUseToolBarCheckBox, BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.WEST);
JPanel aa = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
aa.add(defaultButton);
north.add(aa, BorderLayout.CENTER);
@ -156,13 +159,13 @@ public class ToolBarDragPane extends WidgetToolBarPane {
JPanel movePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel northContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
SettingToolBar top = new SettingToolBar(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ToolBar_Top"), northToolBar);
northContentPane.add(top, BorderLayout.EAST);
northContentPane.add(top, BidiUtils.rtl() ? BorderLayout.WEST : BorderLayout.EAST);
northContentPane.add(northToolBar, BorderLayout.CENTER);
northContentPane.setBackground(Color.lightGray);
JPanel southContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
SettingToolBar bottom = new SettingToolBar(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ToolBar_Bottom"), southToolBar);
southContentPane.add(bottom, BorderLayout.EAST);
southContentPane.add(bottom, BidiUtils.rtl() ? BorderLayout.WEST : BorderLayout.EAST);
southContentPane.add(southToolBar, BorderLayout.CENTER);
southContentPane.setBackground(Color.lightGray);

5
designer-realize/src/main/java/com/fr/design/webattr/ViewWebSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.webattr;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -34,8 +35,8 @@ public class ViewWebSettingPane extends WebSettingPane<WebView> {
sortCheckBox.setSelected(true);
conditionFilterBox.setSelected(true);
listFilterBox.setSelected(true);
return GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_ViewPreview") + ":"),
sortCheckBox, conditionFilterBox, listFilterBox}, FlowLayout.LEFT, 6);
return GUICoreUtils.createFlowPane(new Component[]{new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_ViewPreview"), ":")),
sortCheckBox, conditionFilterBox, listFilterBox}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 6);
}
@Override

15
designer-realize/src/main/java/com/fr/design/webattr/WebSettingPane.java

@ -1,5 +1,8 @@
package com.fr.design.webattr;
import com.fine.swing.ui.layout.Column;
import com.fine.swing.ui.layout.Layouts;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.icombobox.UIComboBox;
@ -22,6 +25,12 @@ import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
public abstract class WebSettingPane<T extends WebContent> extends BasicBeanPane<ReportWebAttr> {
private static final String[] CHOOSEITEM = new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_I_Want_To_Set_Single"),
@ -38,15 +47,15 @@ public abstract class WebSettingPane<T extends WebContent> extends BasicBeanPane
private static final long LONGZERO = 0L;
public WebSettingPane() {
JPanel buttonPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 6));
JPanel buttonPane = new JPanel(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 0, 6));
choseComboBox = new UIComboBox(CHOOSEITEM);
choseComboBox.addItemListener(itemListener);
buttonPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Blow_Set") + ":"));
buttonPane.add(new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Blow_Set"), ":")));
buttonPane.add(choseComboBox);
dragToolBarPane = new ToolBarDragPane();
dragToolBarPane.setDefaultToolBar(getDefaultToolBarManager(), getToolBarInstance());
JPanel eventpanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
eventpanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Set") + ':'), BorderLayout.NORTH);
eventpanel.add(new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event_Set"), ":")), BorderLayout.NORTH);
eventPane = new EventPane(getEventNames());
eventpanel.add(eventPane, BorderLayout.CENTER);

9
designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java

@ -1,6 +1,7 @@
package com.fr.design.webattr;
import com.fr.base.BaseUtils;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.ibutton.UIColorButton;
@ -51,7 +52,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
}
});
JPanel backgroundPane = GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, FlowLayout.LEFT);
JPanel backgroundPane = GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT);
//sheet标签页显示位置
topRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Top"));
@ -61,7 +62,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
bottomRadioButton.setSelected(true);
buttonGroup.add(topRadioButton);
buttonGroup.add(bottomRadioButton);
JPanel sheetPane = GUICoreUtils.createFlowPane(new Component[]{sheetShowLocationLabel, topRadioButton, bottomRadioButton}, FlowLayout.LEFT);
JPanel sheetPane = GUICoreUtils.createFlowPane(new Component[]{sheetShowLocationLabel, topRadioButton, bottomRadioButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT);
//Sean: 报表显示位置since 706
rptShowLocationLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location") + ":", UILabel.LEFT);
@ -71,7 +72,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
leftRadioButton.setSelected(true);
rptShowButtonGroup.add(centerRadioButton);
rptShowButtonGroup.add(leftRadioButton);
JPanel showLocPane = GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT);
JPanel showLocPane = GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT);
unloadCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Unload_Check"));
unloadCheck.setSelected(true);
@ -80,7 +81,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
showWidgets.setSelected(false);
isAutoStash = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Auto_Stash"));
isAutoStash.setSelected(false);
JPanel unloadCheckPane = GUICoreUtils.createFlowPane(new Component[]{unloadCheck, showWidgets, isAutoStash}, FlowLayout.LEFT);
JPanel unloadCheckPane = GUICoreUtils.createFlowPane(new Component[]{unloadCheck, showWidgets, isAutoStash}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT);
JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
northPane.add(sheetPane);
northPane.add(showLocPane);

Loading…
Cancel
Save