Browse Source

Pull request #14586: INO-21074 fix:阿拉伯语言问题处理

Merge in DESIGN/design from ~OBO/design:persist/11.0-arabic to persist/11.0-arabic

* commit 'f7cd247cff9806208daa553f550949aace2d5e81': (24 commits)
  INO-21074 填报提交按钮
  INO-21074 js编辑面板
  INO-21074 参数编辑框
  INO-21074 模版web属性
  INO-21074 关联数据集,同时需要改i18n
  INO-21074 模板数据集-关联数据集等号问题
  INO-21074 模板数据集-sql参数面板靠右对齐
  INO-21074 模板数据集-参数输入框完善一下
  INO-21074 模板数据集-参数输入框
  INO-21074 模板数据集-sql预览数据靠右对齐
  INO-21074 模板数据集-查看执行sql
  INO-21074 模板数据集预览界面
  INO-21074 模板数据集
  INO-21074 工作目录切换
  INO-21074 关闭设计器保存模板
  INO-21074 打开文件面板
  INO-21074 新建决策报表
  INO-21074 版本中心漏提一个类
  INO-21074 版本中心rtl
  INO-21074 页面-选项-确定按钮镜像
  ...
persist/11.0-arabic
Obo-王学仁 4 months ago
parent
commit
f9adacbbe8
  1. 14
      designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java
  2. 10
      designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java
  3. 12
      designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java
  4. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  5. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/PreviewTableDesensitizationPane.java
  6. 9
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java
  7. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  8. 1
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  9. 4
      designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java
  10. 4
      designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java
  11. 4
      designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java
  12. 25
      designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
  13. 2
      designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java
  14. 2
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIScrollPane.java
  15. 26
      designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java
  16. 13
      designer-base/src/main/java/com/fr/design/gui/ilist/UIList.java
  17. 2
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  18. 9
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java
  19. 4
      designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java
  20. 2
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  21. 11
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  22. 35
      designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java
  23. 7
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java
  24. 9
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java
  25. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/ToolTipTableCellRenderer.java
  26. 4
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java
  27. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsOperatorPane.java
  28. 7
      designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java
  29. 6
      designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java
  30. 15
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  31. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ar.properties
  32. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  33. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  34. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  35. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  36. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  37. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/EmptyLayoutPane.java
  38. 8
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java
  39. 2
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  40. 4
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java

14
designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java

@ -1,18 +1,18 @@
package com.fr.design.actions; package com.fr.design.actions;
import javax.swing.SwingUtilities;
import com.fr.base.svg.IconUtils;
import com.fr.design.data.DesignTableDataManager;
import com.fr.data.TableDataSource; import com.fr.data.TableDataSource;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.ReportTableDataPane; import com.fr.design.data.datapane.ReportTableDataPane;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.tabledata.ResponseDataSourceChange; import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.DesignModelAdapter;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.KeySetUtils;
import javax.swing.SwingUtilities;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
@ -42,7 +42,7 @@ public class TableDataSourceAction extends TemplateComponentAction<JTemplate<?,
populate(tds); populate(tds);
} }
}; };
final BasicDialog reportTableDataDialog = tableDataPane.showLargeWindow(SwingUtilities.getWindowAncestor(this.getEditingComponent()), null); final BasicDialog reportTableDataDialog = tableDataPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(this.getEditingComponent()), null, DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.data.datapane.ReportTableDataPane"));
reportTableDataDialog.addDialogActionListener(new DialogActionAdapter() { reportTableDataDialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override

10
designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java

@ -144,7 +144,7 @@ public class RenameAction extends UpdateAction {
fnf.isDirectory() ? fnf.isDirectory() ?
"Fine-Design_Basic_Enter_New_Folder_Name" : "Fine-Design_Basic_Enter_New_File_Name") "Fine-Design_Basic_Enter_New_Folder_Name" : "Fine-Design_Basic_Enter_New_File_Name")
); );
newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING);
newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
//newNameLabel.setPreferredSize(new Dimension(118, 15)); //newNameLabel.setPreferredSize(new Dimension(118, 15));
@ -170,7 +170,7 @@ public class RenameAction extends UpdateAction {
nameField.selectAll(); nameField.selectAll();
nameField.setPreferredSize(new Dimension(170, 20)); nameField.setPreferredSize(new Dimension(170, 20));
JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 5));
topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15)); topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15));
topPanel.add(newNameLabel); topPanel.add(newNameLabel);
topPanel.add(nameField); topPanel.add(nameField);
@ -180,14 +180,14 @@ public class RenameAction extends UpdateAction {
// 重名提示 // 重名提示
warnLabel = new UILabel(); warnLabel = new UILabel();
warnLabel.setPreferredSize(new Dimension(300, 50)); warnLabel.setPreferredSize(new Dimension(300, 50));
warnLabel.setHorizontalAlignment(SwingConstants.LEFT); warnLabel.setHorizontalAlignment(SwingConstants.LEADING);
warnLabel.setVerticalAlignment(SwingConstants.TOP); warnLabel.setVerticalAlignment(SwingConstants.TOP);
warnLabel.setForeground(Color.RED); warnLabel.setForeground(Color.RED);
warnLabel.setVisible(false); warnLabel.setVisible(false);
JPanel midPanel = new JPanel(new BorderLayout()); JPanel midPanel = new JPanel(new BorderLayout());
midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
midPanel.add(warnLabel, BorderLayout.WEST); midPanel.add(warnLabel, BorderLayout.LINE_START);
// 确认按钮 // 确认按钮
confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
@ -210,7 +210,7 @@ public class RenameAction extends UpdateAction {
}); });
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.TRAILING, 10, 0));
buttonsPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); buttonsPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10));
buttonsPane.add(confirmButton); buttonsPane.add(confirmButton);
buttonsPane.add(cancelButton); buttonsPane.add(cancelButton);

12
designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java

@ -1,17 +1,21 @@
package com.fr.design.data.datapane.preview; package com.fr.design.data.datapane.preview;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.base.clipboard.ClipboardHelper; import com.fr.design.base.clipboard.ClipboardHelper;
import com.fr.design.gui.itable.SortableJTable; import com.fr.design.gui.itable.SortableJTable;
import com.fr.design.gui.itable.TableSorter; import com.fr.design.gui.itable.TableSorter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
import javax.swing.*; import javax.swing.JComponent;
import javax.swing.table.DefaultTableCellRenderer; import javax.swing.JTable;
import javax.swing.table.JTableHeader; import javax.swing.table.JTableHeader;
import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumnModel; import javax.swing.table.TableColumnModel;
import java.awt.*; import java.awt.Color;
import java.awt.Component;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable; import java.awt.datatransfer.Transferable;
@ -214,7 +218,7 @@ public class CopyableJTable extends SortableJTable {
} else { } else {
comp.setBackground(this.getBackground()); comp.setBackground(this.getBackground());
} }
return comp; return BidiUtils.applyOrientationByLocale(comp);
} }

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -164,7 +164,7 @@ public class PreviewTablePane extends BasicPane {
// 预览行数面板 // 预览行数面板
northPane.add(initPreviewNumberPane(), BorderLayout.CENTER); northPane.add(initPreviewNumberPane(), BorderLayout.CENTER);
// 脱敏预览设置面板 // 脱敏预览设置面板
northPane.add(initDesensitizationPane(), BorderLayout.EAST); northPane.add(initDesensitizationPane(), BorderLayout.LINE_END);
return northPane; return northPane;
} }

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/PreviewTableDesensitizationPane.java

@ -56,7 +56,7 @@ public class PreviewTableDesensitizationPane extends JPanel {
* 初始化面板 * 初始化面板
*/ */
private void initComponents() { private void initComponents() {
this.setLayout(new FlowLayout(FlowLayout.LEFT)); this.setLayout(new FlowLayout(FlowLayout.LEADING));
this.add(initDesensitizationLabel()); this.add(initDesensitizationLabel());
this.add(initToolBar()); this.add(initToolBar());
this.add(initPreviewButton()); this.add(initPreviewButton());

9
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -3,6 +3,7 @@ package com.fr.design.data.datapane.preview.sql;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ParameterHelper; import com.fr.base.ParameterHelper;
import com.fr.base.ParameterMapNameSpace; import com.fr.base.ParameterMapNameSpace;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.DBTableData; import com.fr.data.impl.DBTableData;
import com.fr.data.impl.EscapeSqlHelper; import com.fr.data.impl.EscapeSqlHelper;
import com.fr.data.operator.DataOperator; import com.fr.data.operator.DataOperator;
@ -108,7 +109,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
textBuilder.append("</html>"); textBuilder.append("</html>");
tipLabel.setToolTipText(textBuilder.toString()); tipLabel.setToolTipText(textBuilder.toString());
tipPanel.add(tipLabel, BorderLayout.SOUTH); tipPanel.add(tipLabel, BorderLayout.SOUTH);
topPanel.add(tipPanel, BorderLayout.EAST); topPanel.add(tipPanel, BorderLayout.LINE_END);
} else { } else {
imageLabel = new UILabel(UIManager.getIcon("OptionPane.informationIcon")); imageLabel = new UILabel(UIManager.getIcon("OptionPane.informationIcon"));
messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
@ -117,7 +118,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
} }
imagePanel.add(imageLabel); imagePanel.add(imageLabel);
topPanel.add(imagePanel, BorderLayout.WEST); topPanel.add(imagePanel, BorderLayout.LINE_START);
topPanel.add(messagePanel, BorderLayout.CENTER); topPanel.add(messagePanel, BorderLayout.CENTER);
topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
@ -148,7 +149,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
okButton.addActionListener(this); okButton.addActionListener(this);
bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
bottomPanel.add(okButton, BorderLayout.EAST); bottomPanel.add(okButton, BorderLayout.LINE_END);
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Preview_Performed_Sql")); this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Preview_Performed_Sql"));
this.setResizable(false); this.setResizable(false);
@ -162,7 +163,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
close(); close();
} }
}); });
BidiUtils.applyOrientationByLocale(this);
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
} }

10
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -18,6 +18,7 @@ import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableEditorPane; import com.fr.design.gui.itableeditorpane.UITableEditorPane;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -67,7 +68,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
JPanel jpanel = new JPanel(); JPanel jpanel = new JPanel();
jpanel.setLayout(new BorderLayout()); jpanel.setLayout(new BorderLayout());
JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEADING));
UILabel chooseTableData = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Select_To_Merge")); UILabel chooseTableData = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Select_To_Merge"));
UIButton previewButton = new UIButton(); UIButton previewButton = new UIButton();
previewButton.setIcon(BaseUtils.readIcon("/com/fr/web/images/preview.png")); previewButton.setIcon(BaseUtils.readIcon("/com/fr/web/images/preview.png"));
@ -77,6 +78,8 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
northPanel.add(previewButton); northPanel.add(previewButton);
centerPanel = new JPanel(); centerPanel = new JPanel();
centerPanel.setLayout(FRGUIPaneFactory.createBorderLayout());
BidiUtils.applyOrientationByLocale(centerPanel, northPanel);
JScrollPane js = new JScrollPane(centerPanel); JScrollPane js = new JScrollPane(centerPanel);
js.getVerticalScrollBar().setUnitIncrement(20);// 鼠标滚动大小 js.getVerticalScrollBar().setUnitIncrement(20);// 鼠标滚动大小
js.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); js.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
@ -95,7 +98,8 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
int len = resMap.size(); int len = resMap.size();
// 10个正好不会出现滚动条 // 10个正好不会出现滚动条
centerPanel.setLayout(new GridLayout(len < MIN_BAR_NUMBER ? MIN_BAR_NUMBER : len + 1, 1)); centerPanel.setLayout(new GridLayout(len < MIN_BAR_NUMBER ? MIN_BAR_NUMBER : len + 1, 1));
centerPanel.add(headLabel); centerPanel.add(headLabel, BorderLayout.LINE_START);
BidiUtils.applyOrientationByLocale(centerPanel);
for (Entry<String, TableDataWrapper> stringTableDataWrapperEntry : resMap.entrySet()) { for (Entry<String, TableDataWrapper> stringTableDataWrapperEntry : resMap.entrySet()) {
TableDataWrapper tableDataWrappe = stringTableDataWrapperEntry.getValue(); TableDataWrapper tableDataWrappe = stringTableDataWrapperEntry.getValue();
@ -313,7 +317,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
formulaButton.setEnabled(false); formulaButton.setEnabled(false);
formulaButton.setPreferredSize(new Dimension(25, 23)); formulaButton.setPreferredSize(new Dimension(25, 23));
formulaButton.addActionListener(getFormulaActionListener()); formulaButton.addActionListener(getFormulaActionListener());
rightPanel.add(new UILabel(BidiUtils.concatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula"), " ="))); rightPanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula") + " ="));
rightPanel.add(formulaContentTextField); rightPanel.add(formulaContentTextField);
rightPanel.add(formulaButton); rightPanel.add(formulaButton);

1
designer-base/src/main/java/com/fr/design/dialog/UIDialog.java

@ -90,6 +90,7 @@ public abstract class UIDialog extends JDialog {
this.setModal(true); this.setModal(true);
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
BidiUtils.applyOrientationByLocale(contentPane);
} }
private JPanel createControlButtonPane() { private JPanel createControlButtonPane() {

4
designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java

@ -3,6 +3,7 @@
*/ */
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -40,7 +41,7 @@ public class BooleanEditor extends Editor<Boolean> {
public BooleanEditor(Boolean value) { public BooleanEditor(Boolean value) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
booleanCheckBox = new UICheckBox("true"); booleanCheckBox = new UICheckBox("true");
this.add(booleanCheckBox, BorderLayout.CENTER); this.add(booleanCheckBox, BorderLayout.LINE_START);
this.setValue(value); this.setValue(value);
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Boolean")); this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Boolean"));
booleanCheckBox.addItemListener(new ItemListener() { booleanCheckBox.addItemListener(new ItemListener() {
@ -49,6 +50,7 @@ public class BooleanEditor extends Editor<Boolean> {
fireStateChanged(); fireStateChanged();
} }
}); });
BidiUtils.applyOrientationByLocale(this);
} }
public JComponent getEditComp() { public JComponent getEditComp() {

4
designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java

@ -3,6 +3,7 @@
*/ */
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.date.UIDatePicker; import com.fr.design.gui.date.UIDatePicker;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
@ -73,10 +74,11 @@ public class DateEditor extends Editor<Date> {
} }
}); });
this.uiDatePicker.setFocusTraversalKeysEnabled(false); this.uiDatePicker.setFocusTraversalKeysEnabled(false);
this.add(uiDatePicker, BorderLayout.CENTER); this.add(uiDatePicker, BorderLayout.LINE_START);
this.setValue(value); this.setValue(value);
this.setName(name); this.setName(name);
BidiUtils.applyOrientationByLocale(this);
} }
//uidatepicker的setstyle方法不起作用,先粗暴地加个构造方法 //uidatepicker的setstyle方法不起作用,先粗暴地加个构造方法

4
designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java

@ -1,5 +1,6 @@
package com.fr.design.file; package com.fr.design.file;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.file.DelFileAction; import com.fr.design.actions.file.DelFileAction;
import com.fr.design.actions.file.LocateAction; import com.fr.design.actions.file.LocateAction;
@ -395,10 +396,11 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
} }
}); });
JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 10, 0));
bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10));
bottomPanel.add(confirmButton); bottomPanel.add(confirmButton);
bottomPanel.add(cancelButton); bottomPanel.add(cancelButton);
BidiUtils.applyOrientationByLocale(bottomPanel);
this.add(bottomPanel, BorderLayout.SOUTH); this.add(bottomPanel, BorderLayout.SOUTH);
this.setSize(new Dimension(600, 400)); this.setSize(new Dimension(600, 400));

25
designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java

@ -1,9 +1,9 @@
package com.fr.design.file; package com.fr.design.file;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.StateChangeListener; import com.fr.design.event.StateChangeListener;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
@ -15,14 +15,19 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import javax.swing.*; import javax.swing.AbstractListModel;
import javax.swing.border.EmptyBorder; import javax.swing.BorderFactory;
import java.awt.*; import javax.swing.DefaultListCellRenderer;
import java.awt.event.*; import javax.swing.JList;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Window;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
@ -73,8 +78,8 @@ public class SaveSomeTemplatePane extends BasicPane {
}); });
} }
UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_The_Source_To_Save")); UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_The_Source_To_Save"), UILabel.LEADING);
this.add(tip, BorderLayout.NORTH); this.add(BidiUtils.setOrientationByLocale(tip), BorderLayout.NORTH);
templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane); UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane);
this.add(scrollPane, BorderLayout.CENTER); this.add(scrollPane, BorderLayout.CENTER);
@ -144,7 +149,7 @@ public class SaveSomeTemplatePane extends BasicPane {
templatesChoosePane.add(chooseAllCheckBox, BorderLayout.NORTH); templatesChoosePane.add(chooseAllCheckBox, BorderLayout.NORTH);
templatesChoosePane.add(templatesList, BorderLayout.CENTER); templatesChoosePane.add(templatesList, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(templatesChoosePane);
} }
/** /**
@ -263,7 +268,7 @@ public class SaveSomeTemplatePane extends BasicPane {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
templateCheckBoxes[index] = (UICheckBox) value; templateCheckBoxes[index] = (UICheckBox) value;
templateCheckBoxes[index].setBackground(list.getBackground()); templateCheckBoxes[index].setBackground(list.getBackground());
return templateCheckBoxes[index]; return BidiUtils.applyOrientationByLocale(templateCheckBoxes[index]);
} }
} }

2
designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java

@ -1,6 +1,7 @@
package com.fr.design.file; package com.fr.design.file;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.itree.filetree.TemplateDirTree; import com.fr.design.gui.itree.filetree.TemplateDirTree;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -40,6 +41,7 @@ public class TemplateDirTreePane extends JPanel {
remindPane = new TemplateDirSearchRemindPane(getTemplateDirTree()); remindPane = new TemplateDirSearchRemindPane(getTemplateDirTree());
this.add(remindPane, BorderLayout.CENTER); this.add(remindPane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
} }
public TemplateDirTree getTemplateDirTree() { public TemplateDirTree getTemplateDirTree() {

2
designer-base/src/main/java/com/fr/design/gui/icontainer/UIScrollPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.design.gui.iscrollbar.UIScrollBar;
@ -31,6 +32,7 @@ public class UIScrollPane extends JScrollPane {
this.getHorizontalScrollBar().setBackground(Color.WHITE); this.getHorizontalScrollBar().setBackground(Color.WHITE);
this.getVerticalScrollBar().setOpaque(true); this.getVerticalScrollBar().setOpaque(true);
this.getVerticalScrollBar().setBackground(Color.WHITE); this.getVerticalScrollBar().setBackground(Color.WHITE);
BidiUtils.applyOrientationByLocale(this);
} }
@Override @Override

26
designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java

@ -1,6 +1,5 @@
package com.fr.design.gui.ilable; package com.fr.design.gui.ilable;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.core.UITextComponent; import com.fr.design.gui.core.UITextComponent;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -28,23 +27,19 @@ public class UILabel extends JLabel implements UITextComponent {
if (image != null && text != null) { if (image != null && text != null) {
setIconTextGap(4); setIconTextGap(4);
} }
adjustLabelTextForRTL();
} }
public UILabel(String text, int horizontalAlignment) { public UILabel(String text, int horizontalAlignment) {
super(text, horizontalAlignment); super(text, horizontalAlignment);
adjustLabelTextForRTL();
} }
public UILabel(String text) { public UILabel(String text) {
super(text); super(text);
adjustLabelTextForRTL();
} }
public UILabel(String text, boolean enable) { public UILabel(String text, boolean enable) {
super(text); super(text);
this.setEnabled(enable); this.setEnabled(enable);
adjustLabelTextForRTL();
} }
public UILabel(Icon image, int horizontalAlignment) { public UILabel(Icon image, int horizontalAlignment) {
@ -69,27 +64,6 @@ public class UILabel extends JLabel implements UITextComponent {
return preferredSize; return preferredSize;
} }
/**
* 调整label的名称以适配RTL
* <p/>
* 代码中有大量的国际化文本拼接冒号或者其他硬编码字符串创建Label的行为RTL时名称需要分段反转把一部分放在UILabel构造方法中进行调整目前处理的场景如下
* <ul>
* <li>label名+冒号(:)</li>
* <li>Item 2</li>
* <li>Item 3</li>
* </ul>
*/
private void adjustLabelTextForRTL() {
if (!BidiUtils.rtl()) {
return;
}
String text = this.getText();
if (StringUtils.isNotEmpty(text) && text.length() > 1 && StringUtils.equals(String.valueOf(text.charAt(text.length() - 1)), COLON)) {
text = COLON + text.substring(0, text.length() - 1);
this.setText(text);
}
}
public static void main(String[] args) { public static void main(String[] args) {
// UILabel label = new UILabel("shishi",SwingConstants.LEFT); // UILabel label = new UILabel("shishi",SwingConstants.LEFT);
JFrame frame = new JFrame("Test"); JFrame frame = new JFrame("Test");

13
designer-base/src/main/java/com/fr/design/gui/ilist/UIList.java

@ -6,8 +6,17 @@ import com.fr.design.gui.itooltip.UIToolTip;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.Icon;
import java.awt.*; import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JToolTip;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import java.awt.Component;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.Vector; import java.util.Vector;

2
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java

@ -62,7 +62,7 @@ public class UITableEditorPane<T> extends BasicPane {
controlPane.add(buttonPane, BorderLayout.LINE_END); controlPane.add(buttonPane, BorderLayout.LINE_END);
controlPane.add(l, BorderLayout.LINE_START); controlPane.add(l, BorderLayout.LINE_START);
pane.add(controlPane, BorderLayout.NORTH); pane.add(controlPane, BorderLayout.NORTH);
BidiUtils.applyOrientationByLocale(pane);
} }
public UITableModelAdapter<T> getTableModel() { public UITableModelAdapter<T> getTableModel() {

9
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java

@ -1,6 +1,7 @@
package com.fr.design.gui.itableeditorpane; package com.fr.design.gui.itableeditorpane;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -40,7 +41,13 @@ public abstract class UITableModelAdapter<T> extends AbstractTableModel implemen
protected UITableModelAdapter(String[] columnNames) { protected UITableModelAdapter(String[] columnNames) {
this.columnNames = columnNames; this.columnNames = columnNames;
table = new JTable(this); table = new JTable(this) {
@Override
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
return BidiUtils.applyOrientationByLocale(super.prepareRenderer(renderer, row, column));
}
};
BidiUtils.applyOrientationByLocale(table);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
// TableRowSorter rowSorter = new TableRowSorter(this); // TableRowSorter rowSorter = new TableRowSorter(this);
// table.setRowSorter(rowSorter); // table.setRowSorter(rowSorter);

4
designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java

@ -1,5 +1,6 @@
package com.fr.design.gui.itextfield; package com.fr.design.gui.itextfield;
import com.fr.base.i18n.BidiUtils;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.GlobalNameObserver;
@ -71,6 +72,7 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
public void init() { public void init() {
InputEventBaseOnOS.addBasicEditInputMap(this); InputEventBaseOnOS.addBasicEditInputMap(this);
initListener(); initListener();
BidiUtils.applyOrientationByLocale(this);
} }
protected void initListener() { protected void initListener() {
@ -174,7 +176,7 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
RenderingHints.KEY_ANTIALIASING, RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON); RenderingHints.VALUE_ANTIALIAS_ON);
g.setColor(getDisabledTextColor()); g.setColor(getDisabledTextColor());
g.drawString(placeholder, getInsets().left, pG.getFontMetrics() g.drawString(placeholder, BidiUtils.rtl() ? (int) (this.getBounds().getWidth() - getInsets().left - g.getFontMetrics().stringWidth(placeholder)) : getInsets().left, pG.getFontMetrics()
.getMaxAscent() + getInsets().top + 1); .getMaxAscent() + getInsets().top + 1);
} }

2
designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java

@ -279,7 +279,7 @@ public class JSContentPane extends BasicPane {
*/ */
private String createFunctionTitle(String[] args) { private String createFunctionTitle(String[] args) {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
sb.append("<html> <body> <div style='height:16px'>function("); sb.append("<html> <body> <div style='height:16px; text-align: left'>function(");
int width = titleWidth; int width = titleWidth;
FontMetrics cellFM = this.getFontMetrics(this.getFont()); FontMetrics cellFM = this.getFontMetrics(this.getFont());
int tempwidth = 0; int tempwidth = 0;

11
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.chartx.TwoTuple; import com.fr.chartx.TwoTuple;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
@ -655,7 +656,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
UILabel newNameLabel = new UILabel(Toolkit.i18nText( UILabel newNameLabel = new UILabel(Toolkit.i18nText(
"Fine-Design_Basic_Enter_New_Folder_Name") "Fine-Design_Basic_Enter_New_Folder_Name")
); );
newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING);
newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
// 文件名输入框 // 文件名输入框
@ -680,7 +681,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
nameField.selectAll(); nameField.selectAll();
nameField.setPreferredSize(new Dimension(180, 20)); nameField.setPreferredSize(new Dimension(180, 20));
JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 5));
topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15)); topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15));
topPanel.add(newNameLabel); topPanel.add(newNameLabel);
topPanel.add(nameField); topPanel.add(nameField);
@ -701,14 +702,14 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
// 重名提示 // 重名提示
warnLabel = new UILabel(); warnLabel = new UILabel();
warnLabel.setPreferredSize(new Dimension(300, 50)); warnLabel.setPreferredSize(new Dimension(300, 50));
warnLabel.setHorizontalAlignment(SwingConstants.LEFT); warnLabel.setHorizontalAlignment(SwingConstants.LEADING);
warnLabel.setVerticalAlignment(SwingConstants.TOP); warnLabel.setVerticalAlignment(SwingConstants.TOP);
warnLabel.setForeground(Color.RED); warnLabel.setForeground(Color.RED);
warnLabel.setVisible(false); warnLabel.setVisible(false);
JPanel midPanel = new JPanel(new BorderLayout()); JPanel midPanel = new JPanel(new BorderLayout());
midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
midPanel.add(warnLabel, BorderLayout.WEST); midPanel.add(warnLabel, BorderLayout.LINE_START);
// 确认按钮 // 确认按钮
confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
@ -733,7 +734,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
} }
}); });
JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 10, 0));
bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10));
bottomPanel.add(confirmButton); bottomPanel.add(confirmButton);
bottomPanel.add(cancelButton); bottomPanel.add(cancelButton);

35
designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.manager.search.searcher.control.pane; package com.fr.design.mainframe.manager.search.searcher.control.pane;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.TemplateDirTreePane; import com.fr.design.file.TemplateDirTreePane;
@ -13,6 +14,7 @@ import com.fr.design.search.event.TreeSearchStatusChangeListener;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
@ -64,23 +66,41 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu
searchPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); searchPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR)); searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR));
searchPane.setBackground(Color.WHITE); searchPane.setBackground(Color.WHITE);
// 中间输入框
initSearchTextField();
searchPane.add(createSearchPanel(), BorderLayout.LINE_START);
searchPane.add(searchTextField, BorderLayout.CENTER);
searchPane.add(createReturnPanel(), BorderLayout.LINE_END);
BidiUtils.applyOrientationByLocale(searchPane);
}
private JPanel createSearchPanel() {
// 左侧搜索图标 // 左侧搜索图标
UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/search")); UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/search"));
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); JPanel searchLabelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
searchLabelPanel.setBackground(Color.WHITE);
searchLabelPanel.setBorder(BorderFactory.createEmptyBorder());
searchLabelPanel.add(Box.createHorizontalStrut(5));
searchLabelPanel.add(searchLabel);
searchLabel.addMouseListener(new MouseAdapter() { searchLabel.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
// do nothing // do nothing
} }
}); });
return searchLabelPanel;
}
// 中间输入框 private JPanel createReturnPanel() {
initSearchTextField();
// 右侧返回图标 // 右侧返回图标
UILabel returnLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/clear")); UILabel returnLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/clear"));
JPanel returnLabelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
returnLabelPanel.setBackground(Color.WHITE);
returnLabelPanel.add(returnLabel);
returnLabelPanel.add(Box.createHorizontalStrut(5));
returnLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Tree_Search_Return")); returnLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Tree_Search_Return"));
returnLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 11));
returnLabel.addMouseListener(new MouseAdapter() { returnLabel.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
@ -88,10 +108,7 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu
TemplateDirTreePane.getInstance().refreshDockingView(); TemplateDirTreePane.getInstance().refreshDockingView();
} }
}); });
return returnLabelPanel;
searchPane.add(searchLabel, BorderLayout.WEST);
searchPane.add(searchTextField, BorderLayout.CENTER);
searchPane.add(returnLabel, BorderLayout.EAST);
} }
private void initSearchTextField() { private void initSearchTextField() {

7
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.vcs.ui; package com.fr.design.mainframe.vcs.ui;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.data.tabledata.tabledatapane.loading.TipsPane; import com.fr.design.data.tabledata.tabledatapane.loading.TipsPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -307,8 +308,8 @@ public abstract class AbstractSupportSelectTablePane<T extends TableEntity> exte
UILabel label = new UILabel(valueStr); UILabel label = new UILabel(valueStr);
if (needIcon4Head(column)) { if (needIcon4Head(column)) {
label.setIcon(IconUtils.readIcon("/com/fr/design/standard/vcslist/vcs_sort")); label.setIcon(IconUtils.readIcon("/com/fr/design/standard/vcslist/vcs_sort"));
label.setHorizontalTextPosition(JLabel.LEFT); label.setHorizontalTextPosition(JLabel.LEADING);
label.setHorizontalAlignment(SwingConstants.LEFT); label.setHorizontalAlignment(SwingConstants.LEADING);
} }
selectBox.setHorizontalAlignment(SwingConstants.CENTER); selectBox.setHorizontalAlignment(SwingConstants.CENTER);
selectBox.setBorderPainted(true); selectBox.setBorderPainted(true);
@ -317,7 +318,7 @@ public abstract class AbstractSupportSelectTablePane<T extends TableEntity> exte
component.setBackground(tableHeader.getBackground()); component.setBackground(tableHeader.getBackground());
component.setFont(tableHeader.getFont()); component.setFont(tableHeader.getFont());
component.setBorder(UIManager.getBorder("TableHeader.cellBorder")); component.setBorder(UIManager.getBorder("TableHeader.cellBorder"));
return component; return BidiUtils.applyOrientationByLocale(component);
} }

9
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java

@ -1,11 +1,13 @@
package com.fr.design.mainframe.vcs.ui; package com.fr.design.mainframe.vcs.ui;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.vcs.VcsOperatorWorker; import com.fr.design.mainframe.vcs.VcsOperatorWorker;
import com.fr.design.mainframe.vcs.TableEntity; import com.fr.design.mainframe.vcs.TableEntity;
@ -109,7 +111,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
protected void initTableTopPane() { protected void initTableTopPane() {
tableTopPane = new JPanel(); tableTopPane = new JPanel();
tableTopPane.setLayout(new BorderLayout()); tableTopPane.setLayout(new BorderLayout());
JPanel leftPane = new JPanel(); JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
JPanel rightPane = new JPanel(); JPanel rightPane = new JPanel();
//左边面板,包含搜索icon+搜索框 //左边面板,包含搜索icon+搜索框
if (isNeedSearch()) { if (isNeedSearch()) {
@ -134,8 +136,9 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
deleteLabel.setEnabled(false); deleteLabel.setEnabled(false);
rightPane.add(deleteLabel); rightPane.add(deleteLabel);
} }
tableTopPane.add(leftPane, BorderLayout.EAST); tableTopPane.add(leftPane, BorderLayout.LINE_END);
tableTopPane.add(rightPane, BorderLayout.WEST); tableTopPane.add(rightPane, BorderLayout.LINE_START);
BidiUtils.applyOrientationByLocale(tableTopPane);
} }

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/ToolTipTableCellRenderer.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.vcs.ui; package com.fr.design.mainframe.vcs.ui;
import com.fr.base.i18n.BidiUtils;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -25,6 +26,7 @@ public class ToolTipTableCellRenderer extends DefaultTableCellRenderer {
String toolTipText = GeneralUtils.objectToString(value); String toolTipText = GeneralUtils.objectToString(value);
if (StringUtils.isNotEmpty(toolTipText)) { if (StringUtils.isNotEmpty(toolTipText)) {
((JLabel) component).setToolTipText(toolTipText); ((JLabel) component).setToolTipText(toolTipText);
BidiUtils.setOrientationByLocale(component);
} }
} }
return component; return component;

4
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java

@ -17,8 +17,6 @@ import com.fr.design.mainframe.vcs.common.VcsCacheFileNodeFile;
import com.fr.design.mainframe.vcs.common.VcsHelper; import com.fr.design.mainframe.vcs.common.VcsHelper;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.file.filetree.FileNodes;
import com.fr.io.utils.ResourceIOUtils;
import com.fr.report.InconsistentLockException; import com.fr.report.InconsistentLockException;
import com.fr.report.entity.VcsEntity; import com.fr.report.entity.VcsEntity;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -36,7 +34,7 @@ import javax.swing.JOptionPane;
import javax.swing.JTable; import javax.swing.JTable;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import javax.swing.UIManager; import javax.swing.UIManager;
import java.awt.*; import java.awt.Point;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter; import java.awt.event.MouseMotionAdapter;

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsOperatorPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.vcs.ui; package com.fr.design.mainframe.vcs.ui;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -35,6 +36,7 @@ public class VcsOperatorPane extends JPanel {
value.setCursor(new Cursor(Cursor.HAND_CURSOR)); value.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.add(value); this.add(value);
} }
BidiUtils.applyOrientationByLocale(this);
} }
} }

7
designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java

@ -6,6 +6,7 @@ package com.fr.design.parameter;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.StoreProcedureParameter; import com.fr.base.StoreProcedureParameter;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.storeproc.StoreProcedureConstants; import com.fr.data.impl.storeproc.StoreProcedureConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
@ -104,13 +105,13 @@ public class ParameterInputPane extends BasicPane {
textF.populate(pv); textF.populate(pv);
JPanel editPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel editPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
editPane.add(textF, BorderLayout.CENTER); editPane.add(textF, BorderLayout.CENTER);
editPane.setPreferredSize(new Dimension(180, editPane.getPreferredSize().height)); editPane.setPreferredSize(new Dimension(270, editPane.getPreferredSize().height));
String parameterDisplayName = parameter.getName(); String parameterDisplayName = parameter.getName();
if (StringUtils.isNotBlank(parameter.getName())) { if (StringUtils.isNotBlank(parameter.getName())) {
parameterDisplayName = parameter.getName(); parameterDisplayName = parameter.getName();
} }
contentPane.add(flowTableLayoutHelper.createLabelFlowPane(parameterDisplayName + ":", editPane)); contentPane.add(flowTableLayoutHelper.createLabelFlowPane(BidiUtils.concatenateStrings(parameterDisplayName, ":"), editPane));
//add editor to parameter hashtable. //add editor to parameter hashtable.
initTextListener(textF); initTextListener(textF);
@ -217,7 +218,7 @@ public class ParameterInputPane extends BasicPane {
UILabel textLabel = new UILabel(text); UILabel textLabel = new UILabel(text);
centerPane.add(textLabel); centerPane.add(textLabel);
textLabel.setHorizontalAlignment(SwingConstants.LEFT); textLabel.setHorizontalAlignment(SwingConstants.LEADING);
this.labelList.add(textLabel); this.labelList.add(textLabel);
centerPane.add(comp); centerPane.add(comp);

6
designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java

@ -1,5 +1,6 @@
package com.fr.design.utils.gui; package com.fr.design.utils.gui;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.core.UITextComponent; import com.fr.design.gui.core.UITextComponent;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -20,7 +21,10 @@ import java.util.Locale;
// Noninstantiable utility class // Noninstantiable utility class
public class UIComponentUtils { public class UIComponentUtils {
private static final String HTML_TAG_TPL = "<html><body style='width: %dpx'>"; /**
* html内联css实现文本靠右对齐rtl
*/
private static final String HTML_TAG_TPL = BidiUtils.rtl() ? "<html><body style='text-align: right;width: %dpx'>" : "<html><body style='width: %dpx'>";
private static final String HTML_BODY_TAG = "<html><body>"; private static final String HTML_BODY_TAG = "<html><body>";
private static final String HTML_TAG = "<html>"; private static final String HTML_TAG = "<html>";
private static final int MIN_WIDTH = 10; private static final int MIN_WIDTH = 10;

15
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -302,7 +302,7 @@ public class FILEChooserPane extends BasicPane {
locationPane.add(locationBtnPane = new LocationButtonPane(), BorderLayout.CENTER); locationPane.add(locationBtnPane = new LocationButtonPane(), BorderLayout.CENTER);
mkdirButton = initMkdirButton(); mkdirButton = initMkdirButton();
locationPane.add(mkdirButton, BorderLayout.EAST); locationPane.add(mkdirButton, BorderLayout.LINE_END);
JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
// centerLeftPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); // centerLeftPanel.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -474,7 +474,7 @@ public class FILEChooserPane extends BasicPane {
centerRightPane.add(fileNamePane, BorderLayout.SOUTH); centerRightPane.add(fileNamePane, BorderLayout.SOUTH);
Component[][] outComponents = new Component[][]{ Component[][] outComponents = new Component[][]{
new Component[]{GUICoreUtils.createBorderPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_App_File_Lookup_range") + ":"), BorderLayout.WEST), locationPane}, new Component[]{GUICoreUtils.createBorderPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_App_File_Lookup_range") + ":"), BorderLayout.LINE_START), locationPane},
new Component[]{centerLeftPanel, centerRightPane}}; new Component[]{centerLeftPanel, centerRightPane}};
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(outComponents, new double[]{TableLayout.PREFERRED, TableLayout.FILL}, JPanel contentPane = TableLayoutHelper.createTableLayoutPane(outComponents, new double[]{TableLayout.PREFERRED, TableLayout.FILL},
new double[]{TableLayout.PREFERRED, TableLayout.FILL}); new double[]{TableLayout.PREFERRED, TableLayout.FILL});
@ -1781,7 +1781,7 @@ public class FILEChooserPane extends BasicPane {
UILabel newNameLabel = new UILabel(Toolkit.i18nText( UILabel newNameLabel = new UILabel(Toolkit.i18nText(
"Fine-Design_Basic_Enter_New_Folder_Name") "Fine-Design_Basic_Enter_New_Folder_Name")
); );
newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING);
newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
newNameLabel.setPreferredSize(new Dimension(118, 15)); newNameLabel.setPreferredSize(new Dimension(118, 15));
@ -1804,7 +1804,7 @@ public class FILEChooserPane extends BasicPane {
nameField.selectAll(); nameField.selectAll();
nameField.setPreferredSize(new Dimension(180, 20)); nameField.setPreferredSize(new Dimension(180, 20));
JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 5));
topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15)); topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15));
topPanel.add(newNameLabel); topPanel.add(newNameLabel);
topPanel.add(nameField); topPanel.add(nameField);
@ -1825,13 +1825,13 @@ public class FILEChooserPane extends BasicPane {
// 重名提示 // 重名提示
warnLabel = new UILabel(); warnLabel = new UILabel();
warnLabel.setPreferredSize(new Dimension(300, 30)); warnLabel.setPreferredSize(new Dimension(300, 30));
warnLabel.setHorizontalAlignment(SwingConstants.LEFT); warnLabel.setHorizontalAlignment(SwingConstants.LEADING);
warnLabel.setForeground(Color.RED); warnLabel.setForeground(Color.RED);
warnLabel.setVisible(false); warnLabel.setVisible(false);
JPanel midPanel = new JPanel(new BorderLayout()); JPanel midPanel = new JPanel(new BorderLayout());
midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
midPanel.add(warnLabel, BorderLayout.WEST); midPanel.add(warnLabel, BorderLayout.LINE_START);
// 确认按钮 // 确认按钮
confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
@ -1853,7 +1853,7 @@ public class FILEChooserPane extends BasicPane {
} }
}); });
JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING));
bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
bottomPanel.add(confirmButton); bottomPanel.add(confirmButton);
bottomPanel.add(cancelButton); bottomPanel.add(cancelButton);
@ -1879,6 +1879,7 @@ public class FILEChooserPane extends BasicPane {
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
this.setVisible(true); this.setVisible(true);
BidiUtils.applyOrientationByLocale(this);
} }
private void confirmClose() { private void confirmClose() {

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ar.properties

@ -0,0 +1 @@
com.fr.design.data.datapane.ReportTableDataPane=1050*600

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -30,3 +30,4 @@ com.fr.design.formula.FormulaPaneWhenReserveFormula=1200*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=130*20 com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=130*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=140*20 com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=140*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=100*24 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=100*24
com.fr.design.data.datapane.ReportTableDataPane=900*600

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -29,3 +29,4 @@ com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=100*20 com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=100*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=130*20 com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=130*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=160*24 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=160*24
com.fr.design.data.datapane.ReportTableDataPane=900*600

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -29,3 +29,4 @@ com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20 com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20 com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.data.datapane.ReportTableDataPane=900*600

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -29,3 +29,4 @@ com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20 com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20 com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.data.datapane.ReportTableDataPane=900*600

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -28,3 +28,4 @@ com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20 com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20 com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.data.datapane.ReportTableDataPane=900*600

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/EmptyLayoutPane.java

@ -20,7 +20,7 @@ public class EmptyLayoutPane extends PredefinedLayoutPane {
BorderFactory.createEmptyBorder(39, 105, 0, 105), BorderFactory.createEmptyBorder(39, 105, 0, 105),
BorderFactory.createDashedBorder(Color.BLACK, 1.0f, 2.0f, 2.0f, true) BorderFactory.createDashedBorder(Color.BLACK, 1.0f, 2.0f, 2.0f, true)
)); ));
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_New_Empty_Template")); UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_New_Empty_Template"), UILabel.LEFT);
label.setBorder(BorderFactory.createEmptyBorder(0, 78, 30, 0)); label.setBorder(BorderFactory.createEmptyBorder(0, 78, 30, 0));
this.add(newFormIcon, BorderLayout.NORTH); this.add(newFormIcon, BorderLayout.NORTH);

8
designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

@ -1,5 +1,6 @@
package com.fr.design.widget.ui.designer; package com.fr.design.widget.ui.designer;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.iofile.attr.TemplateLayoutIdAttrMark; import com.fr.base.iofile.attr.TemplateLayoutIdAttrMark;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.border.UITitledMatteBorder; import com.fr.design.border.UITitledMatteBorder;
@ -62,10 +63,11 @@ public class NewFormPane extends BasicPane {
newFormModel = NewFormModel.getInstance(); newFormModel = NewFormModel.getInstance();
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(createModuleListPane(), BorderLayout.WEST); this.add(createModuleListPane(), BorderLayout.LINE_START);
this.add(createTemplateManagePane(), BorderLayout.CENTER); this.add(createTemplateManagePane(), BorderLayout.CENTER);
initWindow(); initWindow();
DesignerCloudURLManager.getInstance().testConnect(); DesignerCloudURLManager.getInstance().testConnect();
BidiUtils.applyOrientationByLocale(this);
} }
private void initWindow() { private void initWindow() {
@ -166,8 +168,8 @@ public class NewFormPane extends BasicPane {
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
jPanel.setPreferredSize(new Dimension(1, 129)); jPanel.setPreferredSize(new Dimension(1, 129));
jPanel.add(createNewTemplatePane(), BorderLayout.WEST); jPanel.add(createNewTemplatePane(), BorderLayout.LINE_START);
jPanel.add(createSwitchButtonPane(), BorderLayout.EAST); jPanel.add(createSwitchButtonPane(), BorderLayout.LINE_END);
return jPanel; return jPanel;
} }

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

@ -511,7 +511,7 @@ public class EditToolBar extends BasicPane {
isVerify = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify")); isVerify = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"));
failSubmit = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Fail_Still_Submit")); failSubmit = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Fail_Still_Submit"));
isCurSheet = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Only_Submit_Current_Sheet")); isCurSheet = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Only_Submit_Current_Sheet"));
JPanel submitPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel submitPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, VerticalFlowLayout.TOP, 0, 0);
submitPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"), null)); submitPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"), null));
submitPane.add(isVerify); submitPane.add(isVerify);
submitPane.add(failSubmit); submitPane.add(failSubmit);

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

@ -50,7 +50,7 @@ public class ToolBarDragPane extends WidgetToolBarPane {
private int row = 7; private int row = 7;
private DefaultTableModel toolbarButtonTableModel; private DefaultTableModel toolbarButtonTableModel;
private JTable layoutTable; private JTable layoutTable;
private UICheckBox isUseToolBarCheckBox = new UICheckBox(BidiUtils.concatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_ToolBar"), ":")); // 是否使用工具栏 private UICheckBox isUseToolBarCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_ToolBar") + ":"); // 是否使用工具栏
private boolean isEnabled; private boolean isEnabled;
public ToolBarDragPane() { public ToolBarDragPane() {
@ -296,7 +296,7 @@ public class ToolBarDragPane extends WidgetToolBarPane {
this.setText(StringUtils.EMPTY); this.setText(StringUtils.EMPTY);
this.setIcon(null); this.setIcon(null);
} }
return this; return BidiUtils.applyOrientationByLocale(this);
} }
}; };

Loading…
Cancel
Save