diff --git a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java index f47341ae7f..a6474c833f 100644 --- a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java @@ -1,18 +1,18 @@ 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.design.DesignModelAdapter; +import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.ReportTableDataPane; import com.fr.design.data.datapane.TableDataTreePane; 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.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.Iterator; import java.util.Map; @@ -42,7 +42,7 @@ public class TableDataSourceAction extends TemplateComponentAction"); tipLabel.setToolTipText(textBuilder.toString()); tipPanel.add(tipLabel, BorderLayout.SOUTH); - topPanel.add(tipPanel, BorderLayout.EAST); + topPanel.add(tipPanel, BorderLayout.LINE_END); } else { imageLabel = new UILabel(UIManager.getIcon("OptionPane.informationIcon")); messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); @@ -117,7 +118,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener { } imagePanel.add(imageLabel); - topPanel.add(imagePanel, BorderLayout.WEST); + topPanel.add(imagePanel, BorderLayout.LINE_START); topPanel.add(messagePanel, BorderLayout.CENTER); topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); @@ -148,7 +149,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener { okButton.addActionListener(this); bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); 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.setResizable(false); @@ -162,7 +163,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener { close(); } }); - + BidiUtils.applyOrientationByLocale(this); GUICoreUtils.centerWindow(this); } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java index 28aaf86d45..261c757c90 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java +++ b/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.UITableEditorPane; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; @@ -67,7 +68,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane stringTableDataWrapperEntry : resMap.entrySet()) { TableDataWrapper tableDataWrappe = stringTableDataWrapperEntry.getValue(); @@ -313,7 +317,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane { fireStateChanged(); } }); + BidiUtils.applyOrientationByLocale(this); } public JComponent getEditComp() { diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java index c40161ba6c..9591255a37 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java @@ -3,6 +3,7 @@ */ package com.fr.design.editor.editor; +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.date.UIDatePicker; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.GeneralContext; @@ -73,10 +74,11 @@ public class DateEditor extends Editor { } }); this.uiDatePicker.setFocusTraversalKeysEnabled(false); - this.add(uiDatePicker, BorderLayout.CENTER); + this.add(uiDatePicker, BorderLayout.LINE_START); this.setValue(value); this.setName(name); + BidiUtils.applyOrientationByLocale(this); } //uidatepicker的setstyle方法不起作用,先粗暴地加个构造方法 diff --git a/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java b/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java index 9bee877aee..80e3bd4987 100644 --- a/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java +++ b/designer-base/src/main/java/com/fr/design/file/DefaultTemplateTreeDefineProcessor.java @@ -1,5 +1,6 @@ package com.fr.design.file; +import com.fr.base.i18n.BidiUtils; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.file.DelFileAction; 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.add(confirmButton); bottomPanel.add(cancelButton); + BidiUtils.applyOrientationByLocale(bottomPanel); this.add(bottomPanel, BorderLayout.SOUTH); this.setSize(new Dimension(600, 400)); diff --git a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java index 1517309ef1..84947e19e4 100644 --- a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java +++ b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java @@ -1,9 +1,9 @@ package com.fr.design.file; +import com.fr.base.i18n.BidiUtils; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.dialog.FineJOptionPane; import com.fr.design.event.StateChangeListener; import com.fr.design.gui.icheckbox.UICheckBox; 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.JTemplate; import com.fr.general.ComparatorUtils; - import com.fr.log.FineLoggerFactory; import org.jetbrains.annotations.Nullable; -import javax.swing.*; -import javax.swing.border.EmptyBorder; -import java.awt.*; -import java.awt.event.*; +import javax.swing.AbstractListModel; +import javax.swing.BorderFactory; +import javax.swing.DefaultListCellRenderer; +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; /** @@ -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")); - this.add(tip, BorderLayout.NORTH); + UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_The_Source_To_Save"), UILabel.LEADING); + this.add(BidiUtils.setOrientationByLocale(tip), BorderLayout.NORTH); templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane); this.add(scrollPane, BorderLayout.CENTER); @@ -144,7 +149,7 @@ public class SaveSomeTemplatePane extends BasicPane { templatesChoosePane.add(chooseAllCheckBox, BorderLayout.NORTH); templatesChoosePane.add(templatesList, BorderLayout.CENTER); - + BidiUtils.applyOrientationByLocale(templatesChoosePane); } /** @@ -263,7 +268,7 @@ public class SaveSomeTemplatePane extends BasicPane { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); templateCheckBoxes[index] = (UICheckBox) value; templateCheckBoxes[index].setBackground(list.getBackground()); - return templateCheckBoxes[index]; + return BidiUtils.applyOrientationByLocale(templateCheckBoxes[index]); } } diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java index 08531b895c..bb64597017 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java @@ -1,6 +1,7 @@ package com.fr.design.file; 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.refreshabletree.ExpandMutableTreeNode; import com.fr.design.i18n.Toolkit; @@ -40,6 +41,7 @@ public class TemplateDirTreePane extends JPanel { remindPane = new TemplateDirSearchRemindPane(getTemplateDirTree()); this.add(remindPane, BorderLayout.CENTER); + BidiUtils.applyOrientationByLocale(this); } public TemplateDirTree getTemplateDirTree() { diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIScrollPane.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIScrollPane.java index 55ba64b0e9..613af2ce8e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIScrollPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIScrollPane.java @@ -1,5 +1,6 @@ package com.fr.design.gui.icontainer; +import com.fr.base.i18n.BidiUtils; import com.fr.design.constants.UIConstants; import com.fr.design.gui.iscrollbar.UIScrollBar; @@ -31,6 +32,7 @@ public class UIScrollPane extends JScrollPane { this.getHorizontalScrollBar().setBackground(Color.WHITE); this.getVerticalScrollBar().setOpaque(true); this.getVerticalScrollBar().setBackground(Color.WHITE); + BidiUtils.applyOrientationByLocale(this); } @Override diff --git a/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java b/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java index 1e7e0ff7c3..8d68135ed6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java @@ -1,6 +1,5 @@ package com.fr.design.gui.ilable; -import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.core.UITextComponent; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.StringUtils; @@ -28,23 +27,19 @@ public class UILabel extends JLabel implements UITextComponent { if (image != null && text != null) { setIconTextGap(4); } - adjustLabelTextForRTL(); } public UILabel(String text, int horizontalAlignment) { super(text, horizontalAlignment); - adjustLabelTextForRTL(); } public UILabel(String text) { super(text); - adjustLabelTextForRTL(); } public UILabel(String text, boolean enable) { super(text); this.setEnabled(enable); - adjustLabelTextForRTL(); } public UILabel(Icon image, int horizontalAlignment) { @@ -69,27 +64,6 @@ public class UILabel extends JLabel implements UITextComponent { return preferredSize; } - /** - * 调整label的名称以适配RTL - *

- * 代码中有大量的国际化文本拼接冒号或者其他硬编码字符串创建Label的行为,RTL时名称需要分段反转,把一部分放在UILabel构造方法中进行调整,目前处理的场景如下: - *

    - *
  • label名+冒号(:)
  • - *
  • Item 2
  • - *
  • Item 3
  • - *
- */ - 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) { // UILabel label = new UILabel("shishi",SwingConstants.LEFT); JFrame frame = new JFrame("Test"); diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/UIList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/UIList.java index 6970ed6767..099aff33ef 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/UIList.java +++ b/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.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.Icon; +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.util.Vector; diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index acda647b8a..cc1dcf2bc0 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -62,7 +62,7 @@ public class UITableEditorPane extends BasicPane { controlPane.add(buttonPane, BorderLayout.LINE_END); controlPane.add(l, BorderLayout.LINE_START); pane.add(controlPane, BorderLayout.NORTH); - + BidiUtils.applyOrientationByLocale(pane); } public UITableModelAdapter getTableModel() { diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java index 8b046f3d08..2b917c828e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java @@ -1,6 +1,7 @@ package com.fr.design.gui.itableeditorpane; import com.fr.base.BaseUtils; +import com.fr.base.i18n.BidiUtils; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.mainframe.DesignerContext; import com.fr.log.FineLoggerFactory; @@ -40,7 +41,13 @@ public abstract class UITableModelAdapter extends AbstractTableModel implemen protected UITableModelAdapter(String[] 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); // TableRowSorter rowSorter = new TableRowSorter(this); // table.setRowSorter(rowSorter); diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java index 10edf9fe00..2bcb7182c0 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java @@ -1,5 +1,6 @@ package com.fr.design.gui.itextfield; +import com.fr.base.i18n.BidiUtils; import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; @@ -71,6 +72,7 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs public void init() { InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); + BidiUtils.applyOrientationByLocale(this); } protected void initListener() { @@ -174,7 +176,7 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 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); } diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java index a01efd9e9f..5656bd3391 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java +++ b/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) { StringBuffer sb = new StringBuffer(); - sb.append("
function("); + sb.append("
function("); int width = titleWidth; FontMetrics cellFM = this.getFontMetrics(this.getFont()); int tempwidth = 0; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 16c8ef46ca..88dee5bf6c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/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.extension.FileExtension; +import com.fr.base.i18n.BidiUtils; import com.fr.base.vcs.DesignerMode; import com.fr.chartx.TwoTuple; import com.fr.design.DesignModelAdapter; @@ -655,7 +656,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt UILabel newNameLabel = new UILabel(Toolkit.i18nText( "Fine-Design_Basic_Enter_New_Folder_Name") ); - newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); + newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); // 文件名输入框 @@ -680,7 +681,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt nameField.selectAll(); 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.add(newNameLabel); topPanel.add(nameField); @@ -701,14 +702,14 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt // 重名提示 warnLabel = new UILabel(); warnLabel.setPreferredSize(new Dimension(300, 50)); - warnLabel.setHorizontalAlignment(SwingConstants.LEFT); + warnLabel.setHorizontalAlignment(SwingConstants.LEADING); warnLabel.setVerticalAlignment(SwingConstants.TOP); warnLabel.setForeground(Color.RED); warnLabel.setVisible(false); JPanel midPanel = new JPanel(new BorderLayout()); 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")); @@ -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.add(confirmButton); bottomPanel.add(cancelButton); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java b/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java index 07636ce631..8cec19347c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateDirTreeSearchPane.java +++ b/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; +import com.fr.base.i18n.BidiUtils; import com.fr.base.svg.IconUtils; import com.fr.design.constants.UIConstants; import com.fr.design.file.TemplateDirTreePane; @@ -13,6 +14,7 @@ import com.fr.design.search.event.TreeSearchStatusChangeListener; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; +import javax.swing.Box; import javax.swing.JPanel; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -64,23 +66,41 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu searchPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR)); 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")); - 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() { @Override public void mouseClicked(MouseEvent e) { // do nothing } }); + return searchLabelPanel; + } - // 中间输入框 - initSearchTextField(); - + private JPanel createReturnPanel() { // 右侧返回图标 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.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 11)); returnLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -88,10 +108,7 @@ public class TemplateDirTreeSearchPane extends JPanel implements TreeSearchStatu TemplateDirTreePane.getInstance().refreshDockingView(); } }); - - searchPane.add(searchLabel, BorderLayout.WEST); - searchPane.add(searchTextField, BorderLayout.CENTER); - searchPane.add(returnLabel, BorderLayout.EAST); + return returnLabelPanel; } private void initSearchTextField() { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java index 75733121de..3e71162c7e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/AbstractSupportSelectTablePane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.vcs.ui; +import com.fr.base.i18n.BidiUtils; import com.fr.base.svg.IconUtils; import com.fr.design.data.tabledata.tabledatapane.loading.TipsPane; import com.fr.design.dialog.BasicPane; @@ -307,8 +308,8 @@ public abstract class AbstractSupportSelectTablePane exte UILabel label = new UILabel(valueStr); if (needIcon4Head(column)) { label.setIcon(IconUtils.readIcon("/com/fr/design/standard/vcslist/vcs_sort")); - label.setHorizontalTextPosition(JLabel.LEFT); - label.setHorizontalAlignment(SwingConstants.LEFT); + label.setHorizontalTextPosition(JLabel.LEADING); + label.setHorizontalAlignment(SwingConstants.LEADING); } selectBox.setHorizontalAlignment(SwingConstants.CENTER); selectBox.setBorderPainted(true); @@ -317,7 +318,7 @@ public abstract class AbstractSupportSelectTablePane exte component.setBackground(tableHeader.getBackground()); component.setFont(tableHeader.getFont()); component.setBorder(UIManager.getBorder("TableHeader.cellBorder")); - return component; + return BidiUtils.applyOrientationByLocale(component); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java index 1aacaa9d7b..4289b96635 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java @@ -1,11 +1,13 @@ package com.fr.design.mainframe.vcs.ui; +import com.fr.base.i18n.BidiUtils; import com.fr.base.svg.IconUtils; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.vcs.VcsOperatorWorker; import com.fr.design.mainframe.vcs.TableEntity; @@ -109,7 +111,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane protected void initTableTopPane() { tableTopPane = new JPanel(); tableTopPane.setLayout(new BorderLayout()); - JPanel leftPane = new JPanel(); + JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel rightPane = new JPanel(); //左边面板,包含搜索icon+搜索框 if (isNeedSearch()) { @@ -134,8 +136,9 @@ public class RecyclePane extends AbstractSupportSelectTablePane deleteLabel.setEnabled(false); rightPane.add(deleteLabel); } - tableTopPane.add(leftPane, BorderLayout.EAST); - tableTopPane.add(rightPane, BorderLayout.WEST); + tableTopPane.add(leftPane, BorderLayout.LINE_END); + tableTopPane.add(rightPane, BorderLayout.LINE_START); + BidiUtils.applyOrientationByLocale(tableTopPane); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/ToolTipTableCellRenderer.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/ToolTipTableCellRenderer.java index bfb10e2057..c91b918d02 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/ToolTipTableCellRenderer.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/ToolTipTableCellRenderer.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.vcs.ui; +import com.fr.base.i18n.BidiUtils; import com.fr.general.GeneralUtils; import com.fr.stable.StringUtils; @@ -25,6 +26,7 @@ public class ToolTipTableCellRenderer extends DefaultTableCellRenderer { String toolTipText = GeneralUtils.objectToString(value); if (StringUtils.isNotEmpty(toolTipText)) { ((JLabel) component).setToolTipText(toolTipText); + BidiUtils.setOrientationByLocale(component); } } return component; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java index 11da401226..126c078c33 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java +++ b/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.file.FileNodeFILE; 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.entity.VcsEntity; import com.fr.stable.StableUtils; @@ -36,7 +34,7 @@ import javax.swing.JOptionPane; import javax.swing.JTable; import javax.swing.SwingWorker; import javax.swing.UIManager; -import java.awt.*; +import java.awt.Point; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsOperatorPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsOperatorPane.java index ce4db1e0d7..c83a9f3299 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsOperatorPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsOperatorPane.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.vcs.ui; +import com.fr.base.i18n.BidiUtils; import com.fr.design.layout.FRGUIPaneFactory; import javax.swing.JComponent; @@ -35,6 +36,7 @@ public class VcsOperatorPane extends JPanel { value.setCursor(new Cursor(Cursor.HAND_CURSOR)); this.add(value); } + BidiUtils.applyOrientationByLocale(this); } } diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java index 7c8f675b1e..9d226ac116 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java +++ b/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.StoreProcedureParameter; import com.fr.base.Utils; +import com.fr.base.i18n.BidiUtils; import com.fr.data.impl.storeproc.StoreProcedureConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.editor.ValueEditorPane; @@ -104,13 +105,13 @@ public class ParameterInputPane extends BasicPane { textF.populate(pv); JPanel editPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); 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(); if (StringUtils.isNotBlank(parameter.getName())) { parameterDisplayName = parameter.getName(); } - contentPane.add(flowTableLayoutHelper.createLabelFlowPane(parameterDisplayName + ":", editPane)); + contentPane.add(flowTableLayoutHelper.createLabelFlowPane(BidiUtils.concatenateStrings(parameterDisplayName, ":"), editPane)); //add editor to parameter hashtable. initTextListener(textF); @@ -217,7 +218,7 @@ public class ParameterInputPane extends BasicPane { UILabel textLabel = new UILabel(text); centerPane.add(textLabel); - textLabel.setHorizontalAlignment(SwingConstants.LEFT); + textLabel.setHorizontalAlignment(SwingConstants.LEADING); this.labelList.add(textLabel); centerPane.add(comp); diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java index d2e9704658..5c205b799a 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java @@ -1,5 +1,6 @@ package com.fr.design.utils.gui; +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.core.UITextComponent; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.ComparatorUtils; @@ -20,7 +21,10 @@ import java.util.Locale; // Noninstantiable utility class public class UIComponentUtils { - private static final String HTML_TAG_TPL = ""; + /** + * html内联css实现文本靠右对齐rtl + */ + private static final String HTML_TAG_TPL = BidiUtils.rtl() ? "" : ""; private static final String HTML_BODY_TAG = ""; private static final String HTML_TAG = ""; private static final int MIN_WIDTH = 10; diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 72e9014024..d6076a3f79 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/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); mkdirButton = initMkdirButton(); - locationPane.add(mkdirButton, BorderLayout.EAST); + locationPane.add(mkdirButton, BorderLayout.LINE_END); JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); // centerLeftPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -474,7 +474,7 @@ public class FILEChooserPane extends BasicPane { centerRightPane.add(fileNamePane, BorderLayout.SOUTH); 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}}; JPanel contentPane = TableLayoutHelper.createTableLayoutPane(outComponents, 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( "Fine-Design_Basic_Enter_New_Folder_Name") ); - newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); + newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); newNameLabel.setPreferredSize(new Dimension(118, 15)); @@ -1804,7 +1804,7 @@ public class FILEChooserPane extends BasicPane { nameField.selectAll(); 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.add(newNameLabel); topPanel.add(nameField); @@ -1825,13 +1825,13 @@ public class FILEChooserPane extends BasicPane { // 重名提示 warnLabel = new UILabel(); warnLabel.setPreferredSize(new Dimension(300, 30)); - warnLabel.setHorizontalAlignment(SwingConstants.LEFT); + warnLabel.setHorizontalAlignment(SwingConstants.LEADING); warnLabel.setForeground(Color.RED); warnLabel.setVisible(false); JPanel midPanel = new JPanel(new BorderLayout()); 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")); @@ -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.add(confirmButton); bottomPanel.add(cancelButton); @@ -1879,6 +1879,7 @@ public class FILEChooserPane extends BasicPane { this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); GUICoreUtils.centerWindow(this); this.setVisible(true); + BidiUtils.applyOrientationByLocale(this); } private void confirmClose() { diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ar.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ar.properties new file mode 100644 index 0000000000..439b186b02 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ar.properties @@ -0,0 +1 @@ +com.fr.design.data.datapane.ReportTableDataPane=1050*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index 9a00559eae..b97dc8c7f9 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/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.utils.DesignerUtils.configLabel=140*20 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=100*24 +com.fr.design.data.datapane.ReportTableDataPane=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index d052ead680..06eff4d709 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/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.utils.DesignerUtils.configLabel=130*20 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=160*24 +com.fr.design.data.datapane.ReportTableDataPane=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 525bfe56ad..b55dacfd40 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/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.utils.DesignerUtils.configLabel=100*20 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24 +com.fr.design.data.datapane.ReportTableDataPane=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index 5b448dd469..6d8a3d380e 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/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.utils.DesignerUtils.configLabel=100*20 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24 +com.fr.design.data.datapane.ReportTableDataPane=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index e1bcdba473..afe97c676b 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/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.utils.DesignerUtils.configLabel=100*20 com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24 +com.fr.design.data.datapane.ReportTableDataPane=900*600 diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/EmptyLayoutPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/EmptyLayoutPane.java index f17b258f90..706a4db67b 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/EmptyLayoutPane.java +++ b/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.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)); this.add(newFormIcon, BorderLayout.NORTH); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java index f5121bef1f..9410c40acc 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer; +import com.fr.base.i18n.BidiUtils; import com.fr.base.iofile.attr.TemplateLayoutIdAttrMark; import com.fr.design.DesignerEnvManager; import com.fr.design.border.UITitledMatteBorder; @@ -62,10 +63,11 @@ public class NewFormPane extends BasicPane { newFormModel = NewFormModel.getInstance(); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.add(createModuleListPane(), BorderLayout.WEST); + this.add(createModuleListPane(), BorderLayout.LINE_START); this.add(createTemplateManagePane(), BorderLayout.CENTER); initWindow(); DesignerCloudURLManager.getInstance().testConnect(); + BidiUtils.applyOrientationByLocale(this); } private void initWindow() { @@ -166,8 +168,8 @@ public class NewFormPane extends BasicPane { JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); jPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jPanel.setPreferredSize(new Dimension(1, 129)); - jPanel.add(createNewTemplatePane(), BorderLayout.WEST); - jPanel.add(createSwitchButtonPane(), BorderLayout.EAST); + jPanel.add(createNewTemplatePane(), BorderLayout.LINE_START); + jPanel.add(createSwitchButtonPane(), BorderLayout.LINE_END); return jPanel; } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index 7481fede65..6fb19db893 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/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")); 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")); - 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.add(isVerify); submitPane.add(failSubmit); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java index 14ab5383ce..db639e93c7 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java +++ b/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 DefaultTableModel toolbarButtonTableModel; 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; public ToolBarDragPane() { @@ -296,7 +296,7 @@ public class ToolBarDragPane extends WidgetToolBarPane { this.setText(StringUtils.EMPTY); this.setIcon(null); } - return this; + return BidiUtils.applyOrientationByLocale(this); } };