Browse Source

Pull request #3: 自己合一下分支,再pr到主代码仓库

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

* commit '4c9714dd0e0572de855b1315340e454c311b090e': (91 commits)
  补一下JListControlPane的展示
  数据库查询、存储过程代码回滚,后面统一处理SplitPane
  MenuKeySet拼接顺序修复
  UILabel空指针bug修复
  com.fr.base.i18n.BidiUtils.concatenateStrings方法名改一下,加注释
  标签创建方式重构还原-designer-realize部分
  标签创建方式重构还原-designer-chart部分
  标签创建方式重构还原-designer-base部分
  PreferencePane标签创建方式重构,布局生成方式还原
  FRGUIPaneFactory方法名还原一下,不新增方法,注释写明支持RTL
  调整下JDBCDefPane,顺便把FRGUIPaneFactory漏的改动提交
  漏了TreeTableDataDictPane,处理一下
  重构FRLeftFlowLayout、TreeRootPane
  绝对位置替换为相对位置,第三批
  绝对位置替换为相对位置,第二批
  绝对位置替换为相对位置,第一批
  简化titleBorder生成方式
  换一下方法调用方式
  getMenuKeySetName和getMenuKeySetNameWithDot方法优化
  去除多余import
  ...
persist/11.0-arabic
Obo-王学仁 4 months ago
parent
commit
d5dc815201
  1. 23
      designer-base/src/main/java/com/fr/base/i18n/ArabicI18nImpl.java
  2. 91
      designer-base/src/main/java/com/fr/base/i18n/BidiUtils.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java
  4. 5
      designer-base/src/main/java/com/fr/design/actions/UpdateAction.java
  5. 2
      designer-base/src/main/java/com/fr/design/actions/file/BatchCompileAction.java
  6. 2
      designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java
  7. 5
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  8. 2
      designer-base/src/main/java/com/fr/design/actions/file/SaveAsTemplateAction.java
  9. 2
      designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java
  10. 2
      designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
  11. 2
      designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java
  12. 2
      designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java
  13. 3
      designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java
  14. 5
      designer-base/src/main/java/com/fr/design/border/UITitledBorder.java
  15. 2
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  16. 6
      designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
  17. 14
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java
  18. 5
      designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java
  19. 8
      designer-base/src/main/java/com/fr/design/data/datapane/connect/AdvancePane.java
  20. 2
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java
  21. 2
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  22. 6
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  23. 10
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JNDIDefPane.java
  24. 2
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java
  25. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java
  26. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  27. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  28. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java
  29. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  30. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  31. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
  32. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  33. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  34. 5
      designer-base/src/main/java/com/fr/design/dialog/AbstractTemplateServerSettingPane.java
  35. 5
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  36. 14
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabMenuFactory.java
  37. 30
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java
  38. 6
      designer-base/src/main/java/com/fr/design/foldablepane/HeaderPane.java
  39. 31
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  40. 5
      designer-base/src/main/java/com/fr/design/formula/FormulaPaneWhenReserveFormula.java
  41. 2
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  42. 3
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
  43. 3
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
  44. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
  45. 5
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  46. 6
      designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java
  47. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  48. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java
  49. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java
  50. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
  51. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java
  52. 2
      designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java
  53. 4
      designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBoxUI.java
  54. 11
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  55. 26
      designer-base/src/main/java/com/fr/design/gui/ilable/UILabel.java
  56. 5
      designer-base/src/main/java/com/fr/design/gui/imenu/UIMenuEastAttrItem.java
  57. 11
      designer-base/src/main/java/com/fr/design/gui/imenu/UIMenuItemUI.java
  58. 6
      designer-base/src/main/java/com/fr/design/gui/imenu/UIMenuUI.java
  59. 5
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  60. 3
      designer-base/src/main/java/com/fr/design/gui/itree/UITreeUI.java
  61. 3
      designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java
  62. 6
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  63. 8
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  64. 3
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  65. 3
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  66. 3
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java
  67. 8
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  68. 7
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  69. 4
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  70. 5
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  71. 7
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java
  72. 46
      designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java
  73. 2
      designer-base/src/main/java/com/fr/design/layout/FRLeftFlowLayout.java
  74. 2
      designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java
  75. 3
      designer-base/src/main/java/com/fr/design/layout/VerticalFlowLayout.java
  76. 14
      designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java
  77. 13
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  78. 14
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  79. 3
      designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java
  80. 4
      designer-base/src/main/java/com/fr/design/mainframe/WestRegionContainerPane.java
  81. 3
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  82. 2
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java
  83. 2
      designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.java
  84. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java
  85. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java
  86. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  87. 9
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  88. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  89. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java
  90. 1
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  91. 13
      designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java
  92. 4
      designer-base/src/main/java/com/fr/design/menu/MenuDef.java
  93. 8
      designer-base/src/main/java/com/fr/design/menu/MenuKeySet.java
  94. 3
      designer-base/src/main/java/com/fr/design/menu/ToolBarDef.java
  95. 2
      designer-base/src/main/java/com/fr/design/present/DictPresentPane.java
  96. 3
      designer-base/src/main/java/com/fr/design/report/SelectImagePane.java
  97. 6
      designer-base/src/main/java/com/fr/design/report/WatermarkPane.java
  98. 2
      designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java
  99. 2
      designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateFitAttrPane.java
  100. 3
      designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java
  101. Some files were not shown because too many files have changed in this diff Show More

23
designer-base/src/main/java/com/fr/base/i18n/ArabicI18nImpl.java

@ -0,0 +1,23 @@
package com.fr.base.i18n;
import com.fr.stable.fun.I18nProvider;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* description
*
* @author obo
* @since 11.0
* Created on 2024/08/06
*/
public class ArabicI18nImpl implements I18nProvider {
@Override
public Map<Locale, String> obtainAll() {
Map<Locale, String> map = new HashMap<>();
map.put(new Locale("ar", "SA"), "Fine-Core_Arabic_Language");
return map;
}
}

91
designer-base/src/main/java/com/fr/base/i18n/BidiUtils.java

@ -0,0 +1,91 @@
package com.fr.base.i18n;
import com.fr.design.DesignerEnvManager;
import javax.swing.border.TitledBorder;
import java.awt.Component;
import java.awt.ComponentOrientation;
import java.awt.Container;
import java.util.Locale;
/**
* 根据国际化获取组件方向
*
* @author obo
* @since 11.0
* Created on 2024/07/17
*/
public class BidiUtils {
private static final Locale LOCALE = DesignerEnvManager.getEnvManager().getLanguage();
private BidiUtils() {
}
public static ComponentOrientation getOrientationByLocale() {
return ComponentOrientation.getOrientation(LOCALE);
}
public static <T extends Component> T applyOrientationByLocale(T component) {
component.applyComponentOrientation(ComponentOrientation.getOrientation(LOCALE));
return component;
}
public static <T extends Component> T setOrientationByLocale(T component) {
component.setComponentOrientation(ComponentOrientation.getOrientation(LOCALE));
return component;
}
public static void setOrientationByLocale(Component... components) {
for (Component component : components) {
component.setComponentOrientation(ComponentOrientation.getOrientation(LOCALE));
}
}
public static void applyOrientationByLocale(Component... components) {
for (Component component : components) {
component.applyComponentOrientation(ComponentOrientation.getOrientation(LOCALE));
}
}
public static boolean rtl() {
return ComponentOrientation.getOrientation(LOCALE) == ComponentOrientation.RIGHT_TO_LEFT;
}
/**
* 拼接字符数组有的组件名是多段字符串拼接起来的如果是rtl的话需要反向拼接
*/
public static String concatenateStrings(String... strs) {
StringBuilder result = new StringBuilder();
if (rtl()) {
for (int i = strs.length - 1; i >= 0; i--) {
result.append(strs[i]);
}
} else {
for (int i = 0; i <= strs.length - 1; i++) {
result.append(strs[i]);
}
}
return result.toString();
}
public static <T extends TitledBorder> T applyTitledBorderJustification(T titledBorder) {
titledBorder.setTitleJustification(BidiUtils.rtl() ? TitledBorder.RIGHT : TitledBorder.LEFT);
return titledBorder;
}
/**
* 镜像BoxLayout布局组件
*/
public static void mirrorBoxLayout(Container container) {
Component[] components = container.getComponents();
for (int i = components.length - 1; i >= 0; i--) {
Component component = components[i];
container.remove(i);
container.add(component);
}
container.revalidate();
container.repaint();
}
}

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

@ -24,7 +24,7 @@ public class TableDataSourceAction extends TemplateComponentAction<JTemplate<?,
public TableDataSourceAction(JTemplate<?, ?> t) {
super(t);
this.setMenuKeySet(KeySetUtils.TEMPLATE_TABLE_DATA_SOURCE);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon("/com/fr/design/images/m_web/datasource");
}

5
designer-base/src/main/java/com/fr/design/actions/UpdateAction.java

@ -6,6 +6,7 @@ package com.fr.design.actions;
import com.fr.base.NameStyle;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.SVGIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.actions.core.ActionFactory;
@ -327,6 +328,7 @@ public abstract class UpdateAction extends ShortCut implements Action {
object = menuItem;
this.putValue(UIMenuItem.class.getName(), object);
BidiUtils.applyOrientationByLocale(menuItem);
}
return (UIMenuItem) object;
}
@ -338,7 +340,7 @@ public abstract class UpdateAction extends ShortCut implements Action {
setPressedIcon4Button(menuItem);
setDisabledIcon4Button(menuItem);
this.putValue(UIMenuItem.class.getName(), menuItem);
return menuItem;
return BidiUtils.applyOrientationByLocale(menuItem);
}
/**
@ -547,7 +549,6 @@ public abstract class UpdateAction extends ShortCut implements Action {
menuItem.addActionListener(action);
menuItem.setToolTipText((String) action.getValue(Action.LONG_DESCRIPTION));
menuItem.setAccelerator((KeyStroke) action.getValue(Action.ACCELERATOR_KEY));
return menuItem;
}

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

@ -16,7 +16,7 @@ import java.awt.event.ActionEvent;
public class BatchCompileAction extends UpdateAction {
public BatchCompileAction() {
this.setMenuKeySet(COMPILE);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/nx/app/designer/transform/batch_transform.png"));
}

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

@ -17,7 +17,7 @@ import java.awt.event.ActionEvent;
public class PreferenceAction extends UpdateAction {
public PreferenceAction() {
this.setMenuKeySet(KeySetUtils.PREFERENCE);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.generateAndSetSearchText(PreferencePane.class.getName());
}

5
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -1,5 +1,6 @@
package com.fr.design.actions.file;
import com.fr.base.i18n.BidiUtils;
import com.fr.config.Configuration;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager;
@ -44,7 +45,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.log.Log4jConfig;
@ -52,7 +52,6 @@ import com.fr.io.attr.ImageExportAttr;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.report.ReportConfigManager;
import com.fr.scheduler.tool.FineScheduler;
import com.fr.stable.Constants;
import com.fr.stable.os.OperatingSystem;
import com.fr.third.apache.logging.log4j.Level;
@ -76,7 +75,6 @@ import javax.swing.ButtonGroup;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
@ -377,6 +375,7 @@ public class PreferencePane extends BasicPane {
cloudAnalyticsDelayCheckBox = new UICheckBox(i18nText("Fine-Design_Cloud_Analytics_Delay"));
designerStartupOption.add(cloudAnalyticsDelayCheckBox);
advancePane.add(designerStartupOption);
BidiUtils.applyOrientationByLocale(generalPane, advancePane, vcsPane);
}
private JPanel createImageExportSettingPane() {

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

@ -18,7 +18,7 @@ public class SaveAsTemplateAction extends JTemplateAction<JTemplate<?, ?>> {
public SaveAsTemplateAction(JTemplate<?, ?> dPane) {
super(dPane);
this.setMenuKeySet(KeySetUtils.SAVE_AS_TEMPLATE);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon("/com/fr/design/images/m_file/saveAs");
}

2
designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java

@ -17,7 +17,7 @@ import java.awt.event.ActionEvent;
public class AboutAction extends UpdateAction {
public AboutAction() {
this.setMenuKeySet(ABOUT);
this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
}

2
designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java

@ -1,5 +1,6 @@
package com.fr.design.actions.server;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.Connection;
import com.fr.design.actions.UpdateAction;
import com.fr.design.data.datapane.connect.ConnectionShowPane;
@ -118,6 +119,7 @@ public class ConnectionListAction extends UpdateAction {
menuItem.setName(getName());
setPressedIcon4Button(menuItem);
setDisabledIcon4Button(menuItem);
BidiUtils.applyOrientationByLocale(menuItem);
object = menuItem;
this.putValue(UILockMenuItem.class.getName(), object);

2
designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java

@ -27,7 +27,7 @@ import java.awt.event.ActionEvent;
public class FunctionManagerAction extends UpdateAction {
public FunctionManagerAction() {
this.setMenuKeySet(FUNCTION_MANAGER);
this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon("/com/fr/design/images/m_web/function");
this.generateAndSetSearchText(FunctionManagerPane.class.getName());

2
designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java

@ -29,7 +29,7 @@ import java.awt.event.ActionEvent;
public class GlobalParameterAction extends UpdateAction {
public GlobalParameterAction() {
this.setMenuKeySet(GLOBAL_PARAMETER);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon("/com/fr/design/images/m_report/p");
}

3
designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java

@ -4,6 +4,7 @@
package com.fr.design.actions.server;
import com.fr.base.TableData;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.DesignModelAdapter;
import com.fr.design.actions.UpdateAction;
import com.fr.design.data.DesignTableDataManager;
@ -181,7 +182,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
setPressedIcon4Button(menuItem);
setDisabledIcon4Button(menuItem);
object = menuItem;
BidiUtils.applyOrientationByLocale(menuItem);
this.putValue(UILockMenuItem.class.getName(), object);
ServerTableDataLockChangeChecker.getInstance().addEditLockChangeListener((UILockMenuItem)object);
}

5
designer-base/src/main/java/com/fr/design/border/UITitledBorder.java

@ -1,5 +1,6 @@
package com.fr.design.border;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import javax.swing.BorderFactory;
@ -14,11 +15,11 @@ public class UITitledBorder extends TitledBorder {
private static final long serialVersionUID = 1L;
public static UITitledBorder createBorderWithTitle(String title) {
return new UITitledBorder(title);
return BidiUtils.applyTitledBorderJustification(new UITitledBorder(title));
}
public static UITitledBorder createBorderWithTitle(String title, int roundedCorner) {
return new UITitledBorder(title, roundedCorner);
return BidiUtils.applyTitledBorderJustification(new UITitledBorder(title, roundedCorner));
}
private UITitledBorder(String title) {

2
designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java

@ -1,6 +1,7 @@
package com.fr.design.condition;
import com.fr.base.i18n.BidiUtils;
import com.fr.common.annotations.Open;
import com.fr.design.actions.UpdateAction;
import com.fr.design.beans.BasicBeanPane;
@ -71,6 +72,7 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT));
dealScrollPane(selectedItemScrollPane);
propertyChangePane.add(selectedItemScrollPane);
BidiUtils.applyOrientationByLocale(this);
}
protected void dealScrollPane(JScrollPane scrollPane){

6
designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java

@ -2,6 +2,7 @@ package com.fr.design.condition;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.DataConstants;
import com.fr.data.condition.CommonCondition;
import com.fr.data.condition.FormulaCondition;
@ -400,6 +401,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
public LiteConditionPane() {
this.initComponents();
BidiUtils.applyOrientationByLocale(this);
}
protected abstract BasicBeanPane<T> createUnFormulaConditionPane();
@ -439,7 +441,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
conditionsTree.addTreeSelectionListener(treeSelectionListener);
JPanel buttonPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
previewPane.add(GUICoreUtils.createBorderPane(buttonPane, BorderLayout.NORTH), BorderLayout.EAST);
previewPane.add(GUICoreUtils.createBorderPane(buttonPane, BorderLayout.NORTH), BorderLayout.LINE_END);
initButtonPane(buttonPane);
// peter:必须要检查Enabled.
@ -494,7 +496,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
conditonTypePane.setBorder(new ModLineBorder(ModLineBorder.BOTTOM));
UILabel conditionTypeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Type") + ":");
conditonTypePane.add(conditionTypeLabel, BorderLayout.WEST);
conditonTypePane.add(conditionTypeLabel, BorderLayout.LINE_START);
conditionTypeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, DOWN_PADDING, 0));
JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);

14
designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.RecursionTableData;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.preview.PreviewLabel;
@ -56,7 +57,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
public TreeTableDataDictPane(String treeName) {
this.setLayout(new BorderLayout(5, 30));
this.setBorder(BorderFactory.createEmptyBorder(20, 20, 0, 0));
selectTableDataLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_TableData_Select_One") + " :");
selectTableDataLabel = new UILabel(BidiUtils.concatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_TableData_Select_One"), " :"));
setTableDataNameComboBox(treeName);
tableDataNameComboBox.setPreferredSize(new Dimension(180, 20));
JPanel tableFlowPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
@ -95,11 +96,11 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
markButtonGroup.add(parentMarkRadio);
markButtonGroup.add(lengthMarkRadio);
originFieldDependsOnParentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
parentFieldLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parent_Marked_Field") + " :", SwingConstants.RIGHT);
treeDataFieldLabel1 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Data_Field") + " :", SwingConstants.RIGHT);
originFieldDependsOnLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
treeDataFieldLabel2 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Data_Field") + " :", SwingConstants.RIGHT);
originFieldDependsOnParentLabel = new UILabel(BidiUtils.concatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Original_Marked_Filed"), " :"), SwingConstants.TRAILING);
parentFieldLabel = new UILabel(BidiUtils.concatenateStrings(" ", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parent_Marked_Field"), " :"), SwingConstants.TRAILING);
treeDataFieldLabel1 = new UILabel(BidiUtils.concatenateStrings(" ", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Data_Field"), " :"), SwingConstants.TRAILING);
originFieldDependsOnLengthLabel = new UILabel(BidiUtils.concatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Original_Marked_Filed"), " :"), SwingConstants.TRAILING);
treeDataFieldLabel2 = new UILabel(BidiUtils.concatenateStrings(" ", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Data_Field"), " :"), SwingConstants.TRAILING);
// originFieldDependsOnParentPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
// parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
@ -164,6 +165,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
}
});
centerPane.add(previewPanel, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
protected void setTableDataNameComboBox(String treeName) {

5
designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.datapane.preview.PreviewLabel;
import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
@ -41,8 +42,8 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
rs.add(tableNameComboBox, BorderLayout.CENTER);
rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER));
UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"), UILabel.LEFT);
UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), UILabel.LEFT);
UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"), UILabel.LEADING);
UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), UILabel.LEADING);
UILabel l3 = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), MAX_WIDTH, UILabel.LEFT);
if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 20);

8
designer-base/src/main/java/com/fr/design/data/datapane/connect/AdvancePane.java

@ -41,10 +41,10 @@ public class AdvancePane extends BasicPane {
double[] rowSizeDbcp = {p, p, p, p};
double[] columnDbcp = {190, p};
Component[][] comps = {
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Active") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE},
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Validation_Query") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY},
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW},
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Max_Wait_Time") + ":", SwingConstants.RIGHT), DBCP_MAX_WAIT}
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Active") + ":", SwingConstants.TRAILING), DBCP_MAX_ACTIVE},
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Validation_Query") + ":", SwingConstants.TRAILING), DBCP_VALIDATION_QUERY},
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow") + ":", SwingConstants.TRAILING), DBCP_TESTONBORROW},
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Max_Wait_Time") + ":", SwingConstants.TRAILING), DBCP_MAX_WAIT}
};
JPanel contextPane = TableLayoutHelper.createGapTableLayoutPane(comps, rowSizeDbcp, columnDbcp, 11, 11);

2
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.connect;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.ConnectionConfig;
@ -21,6 +22,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio
}
};
container.add(connectionListPane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
@Override

2
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -3,6 +3,7 @@
*/
package com.fr.design.data.datapane.connect;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.driver.util.JarFileParseUtil;
import com.fr.data.impl.Connection;
import com.fr.data.impl.JDBCDatabaseConnection;
@ -281,6 +282,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
chartSetPane.add(GUICoreUtils.createNamedPane(charSetComboBox, Toolkit.i18nText("Fine-Design_Basic_Datasource_Charset") + ":"));
advancedPanel.add(chartSetPane);
}
BidiUtils.applyOrientationByLocale(advancedPanel);
northPane.add(advancedPanel);
}

6
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -1,6 +1,7 @@
package com.fr.design.data.datapane.connect;
import com.fr.base.GraphHelper;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.driver.DriverLoader;
import com.fr.data.driver.config.DriverLoaderConfig;
import com.fr.data.impl.JDBCDatabaseConnection;
@ -162,7 +163,7 @@ public class JDBCDefPane extends JPanel {
public JDBCDefPane() {
initMap();
this.setBorder(UITitledBorder.createBorderWithTitle("JDBC" + ":"));
this.setBorder(UITitledBorder.createBorderWithTitle(BidiUtils.concatenateStrings("JDBC", ":")));
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
JPanel innerthis = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
innerthis.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -206,7 +207,7 @@ public class JDBCDefPane extends JPanel {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel dbtypePane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
dbtypePane.add(new UILabel((Toolkit.i18nText("Fine-Design_Basic_Database") + ":")));
dbtypePane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Database") + ":"));
Component[][] dbtypeComComponents = {{dbtypeComboBox}};
double[] dbtypeRowSize = {p};
double[] dbtypeColumnSize = {p};
@ -316,6 +317,7 @@ public class JDBCDefPane extends JPanel {
// REPORT-41450 Windows环境的jdk11下dpi为125%时会因为缩放导致显示问题,因此加个水平gap值
centerPanel = TableLayoutHelper.createGapTableLayoutPane(allComponents, rowSize, columnSize, 6, 6);
innerthis.add(centerPanel);
BidiUtils.applyOrientationByLocale(this);
}
private void refreshDriverLoader() {

10
designer-base/src/main/java/com/fr/design/data/datapane/connect/JNDIDefPane.java

@ -13,6 +13,8 @@ import java.util.Properties;
import javax.naming.Context;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
@ -73,9 +75,11 @@ public class JNDIDefPane extends JPanel {
// NorthPane
JPanel nContentPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
innerthis.add(nContentPane);
nContentPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_JNDI_Name") + ":"));
jndiNameTextField = new UITextField(20);
nContentPane.add(jndiNameTextField, BorderLayout.NORTH);
BidiUtils.applyOrientationByLocale(nContentPane);
// CenterPane
JPanel outcenterPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Context"));
@ -95,9 +99,9 @@ public class JNDIDefPane extends JPanel {
double p = TableLayout.PREFERRED;
double[] rowSize = { p, p, p, p };
double[] columnSize = { f, f };
Component[][] comps = { { new UILabel("INITIAL_CONTEXT_FACTORY:", SwingConstants.RIGHT), JNDIFactoryComboBox },
{ new UILabel("PROVIDER_URL:", SwingConstants.RIGHT), PROVIDER_URL_TF }, { new UILabel("SECURITY_PRINCIPAL:", SwingConstants.RIGHT), SECURITY_PRINCIPAL_TF },
{ new UILabel("SECURITY_CREDENTIALS:", SwingConstants.RIGHT), SECURITY_CREDENTIALS_TF } };
Component[][] comps = { { new UILabel("INITIAL_CONTEXT_FACTORY:", SwingConstants.TRAILING), JNDIFactoryComboBox },
{ new UILabel("PROVIDER_URL:", SwingConstants.TRAILING), PROVIDER_URL_TF }, { new UILabel("SECURITY_PRINCIPAL:", SwingConstants.TRAILING), SECURITY_PRINCIPAL_TF },
{ new UILabel("SECURITY_CREDENTIALS:", SwingConstants.TRAILING), SECURITY_CREDENTIALS_TF } };
centerPane.add(TableLayoutHelper.createCommonTableLayoutPane(comps, rowSize, columnSize, 2));
// ActionLabel

2
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.management.search.pane;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils;
import com.fr.design.DesignModelAdapter;
import com.fr.design.constants.UIConstants;
@ -88,6 +89,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
add(contentPane, BorderLayout.CENTER);
setPreferredSize(new Dimension(240, 30));
TableDataTreeSearchManager.getInstance().registerTreeSearchStatusChangeListener(this);
BidiUtils.applyOrientationByLocale(this);
}
private void initContentPane() {

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.filetree.ClassFileTree;
@ -27,6 +28,7 @@ public class ClassNameSelectPane extends BasicPane {
classFileTree.getSelectionModel().setSelectionMode(
TreeSelectionModel.SINGLE_TREE_SELECTION);
this.add(new JScrollPane(classFileTree), BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
@Override

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -1,6 +1,7 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.Parameter;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.ClassTableData;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
@ -78,6 +79,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.add(northPane, BorderLayout.NORTH);
this.add(initSouthPanel(), BorderLayout.SOUTH);
BidiUtils.applyOrientationByLocale(this);
}
private JPanel initSouthPanel() {
JPanel jpanel = new JPanel();

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -2,6 +2,7 @@ package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.Parameter;
import com.fr.base.ParameterHelper;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.core.db.TableProcedure;
import com.fr.data.impl.Connection;
import com.fr.data.impl.DBTableData;
@ -123,6 +124,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
public DBTableDataPane() {
initCards();
initContentPane();
BidiUtils.applyOrientationByLocale(this);
}
/**

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
@ -40,6 +41,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
public EmbeddedTableDataDefinedPane() {
initComponents();
BidiUtils.applyOrientationByLocale(this);
}
protected void initComponents() {

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
@ -48,6 +49,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
*/
public EmbeddedTableDataPane() {
initComponents();
BidiUtils.applyOrientationByLocale(this);
}
// additional methods

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

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.ParameterHelper;
import com.fr.base.Utils;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.core.datasource.FileDataSource;
import com.fr.data.core.datasource.URLDataSource;
import com.fr.data.core.define.XMLColumnNameType;
@ -142,7 +143,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
fileTypeComboBox = new UIComboBox(item);
fileTypeComboBox.setPreferredSize(new Dimension(100, 20));
type.add(fileTypeComboBox);
northPanel.add(type, BorderLayout.WEST);
northPanel.add(type, BorderLayout.LINE_START);
// 最上面的pane,文件选择
JPanel centerPanel = new JPanel();
@ -172,7 +173,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
this.add(northPanel, BorderLayout.NORTH);
this.add(centerPanel, BorderLayout.CENTER);
this.add(southPanel, BorderLayout.EAST);
this.add(southPanel, BorderLayout.LINE_END);
BidiUtils.applyOrientationByLocale(this);
}
private void addToCenterPanel(JPanel centerPanel) {
@ -207,9 +209,9 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
buttonPanel.add(chooseFile);
buttonPanel.add(testConnection);
filePath = FRGUIPaneFactory.createBorderLayout_S_Pane();
filePath.add(textPanel, BorderLayout.WEST);
filePath.add(textPanel, BorderLayout.LINE_START);
filePath.add(textFieldPanel, BorderLayout.CENTER);
filePath.add(buttonPanel, BorderLayout.EAST);
filePath.add(buttonPanel, BorderLayout.LINE_END);
centerPanel.add(filePath, BorderLayout.NORTH);
// 中间的pane,提示信息

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java

@ -2,6 +2,7 @@ package com.fr.design.data.tabledata.tabledatapane;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -67,6 +68,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
};
public MaxMemRowCountPanel() {
this.setLayout(new FlowLayout(FlowLayout.LEADING));
this.setFloatable(false);
this.setRollover(true);
this.setBackground(UIConstants.NORMAL_BACKGROUND);

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

@ -1,6 +1,7 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.*;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.impl.ConditionTableData;
import com.fr.data.impl.MultiTDTableData;
import com.fr.data.impl.UnionTableData;
@ -132,7 +133,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
jpanel.add(editorPane, BorderLayout.CENTER);
return jpanel;
return BidiUtils.applyOrientationByLocale(jpanel);
}
private class RefreshAction extends UITableEditAction {
@ -279,13 +280,14 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
this.name = name;
this.icon = icon;
initUI();
BidiUtils.applyOrientationByLocale(this);
}
private void initUI() {
String tmp = name;
this.setLayout(new FlowLayout(FlowLayout.LEFT));
this.setLayout(new FlowLayout(FlowLayout.LEADING));
JPanel leftPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
JPanel leftPanel = new JPanel(new FlowLayout(FlowLayout.LEADING));
leftPanel.setPreferredSize(new Dimension(190, BAR_HEIGHT));
chekbox = new UICheckBox();
UILabel tabledataName = new UILabel(tmp);
@ -311,7 +313,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
formulaButton.setEnabled(false);
formulaButton.setPreferredSize(new Dimension(25, 23));
formulaButton.addActionListener(getFormulaActionListener());
rightPanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula") + " ="));
rightPanel.add(new UILabel(BidiUtils.concatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula"), " =")));
rightPanel.add(formulaContentTextField);
rightPanel.add(formulaButton);

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -2,6 +2,7 @@ package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.BaseUtils;
import com.fr.base.StoreProcedureParameter;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.core.db.TableProcedure;
import com.fr.data.impl.Connection;
import com.fr.data.impl.NameDatabaseConnection;
@ -129,6 +130,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
this.add(mainSplitPane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
private void initconnectionTableProcedurePane() {

5
designer-base/src/main/java/com/fr/design/dialog/AbstractTemplateServerSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.dialog;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
@ -39,8 +40,8 @@ public abstract class AbstractTemplateServerSettingPane extends BasicPane {
UILabel belowSetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Blow_Set"));
belowSetLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20));
buttonPane = GUICoreUtils.createFlowPane(new Component[] {
belowSetLabel, chooseComboBox}, FlowLayout.LEFT, 0, 0);
buttonPane.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 0));
belowSetLabel, chooseComboBox}, FlowLayout.LEADING, 0, 0);
buttonPane.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 20));
this.setLayout(new BorderLayout());
this.add(buttonPane, BorderLayout.NORTH);

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

@ -1,5 +1,6 @@
package com.fr.design.dialog;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -94,8 +95,8 @@ public abstract class UIDialog extends JDialog {
private JPanel createControlButtonPane() {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
controlPane.add(buttonsPane, BorderLayout.EAST);
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEADING, 10, 0));
controlPane.add(buttonsPane, BorderLayout.LINE_END);
//增加一个自定义按钮, 可以用于eg: 设为全局配置
addCustomButton(buttonsPane);

14
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabMenuFactory.java

@ -28,6 +28,7 @@ import java.util.Map;
/**
* 右侧下拉菜单的工厂类
*
* @author Carlson
* @since 11.0
* created on 2023-04-14
@ -50,6 +51,7 @@ public class MultiTemplateTabMenuFactory {
/**
* 返回右侧下拉菜单的工厂类
*
* @return
*/
public static MultiTemplateTabMenuFactory getInstance() {
@ -134,7 +136,7 @@ public class MultiTemplateTabMenuFactory {
button.setPreferredSize(new Dimension(menu.getWidth(), ITEM_SIZE));
button.setOpaque(true);
button.setBackground(UIConstants.NORMAL_BACKGROUND);
button.setHorizontalAlignment(SwingConstants.LEFT);
button.setHorizontalAlignment(SwingConstants.LEADING);
button.setForeground(UIConstants.FLESH_BLUE);
return button;
}
@ -146,8 +148,8 @@ public class MultiTemplateTabMenuFactory {
return createListDownItem(MultiTemplateTabPane.getInstance().getOpenedJTemplatesByOperator(getCurrentTabOperatorType()));
}
private String getCurrentTabOperatorType(){
JTemplate jTemplate= HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
private String getCurrentTabOperatorType() {
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
return jTemplate.getTemplateTabOperatorType();
}
@ -193,9 +195,9 @@ public class MultiTemplateTabMenuFactory {
menuItemButtonGroup.templateButton.setForeground(UIConstants.FLESH_BLUE);
}
jPanel.add(menuItemButtonGroup.iconButton, BorderLayout.WEST);
jPanel.add(menuItemButtonGroup.iconButton, BorderLayout.LINE_START);
jPanel.add(menuItemButtonGroup.templateButton, BorderLayout.CENTER);
jPanel.add(menuItemButtonGroup.closeButton, BorderLayout.EAST);
jPanel.add(menuItemButtonGroup.closeButton, BorderLayout.LINE_END);
return jPanel;
}
@ -237,7 +239,7 @@ public class MultiTemplateTabMenuFactory {
button.setPreferredSize(new Dimension(menu.getWidth() - ITEM_SIZE * 2, ITEM_SIZE));
button.setOpaque(true);
button.setBackground(UIConstants.NORMAL_BACKGROUND);
button.setHorizontalAlignment(SwingConstants.LEFT);
button.setHorizontalAlignment(SwingConstants.LEADING);
return button;
}

30
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -2,6 +2,7 @@ package com.fr.design.file;
import com.fr.base.GraphHelper;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction;
@ -571,7 +572,8 @@ public class MultiTemplateTabPane extends JComponent {
private void showListDown() {
UIScrollPopUpMenu menu = MultiTemplateTabMenuFactory.getInstance().createMenu();
GUICoreUtils.showPopupMenu(menu, MultiTemplateTabPane.getInstance(), MultiTemplateTabPane.getInstance().getWidth() - menu.getPreferredSize().width, getY() - 1 + getHeight());
int x = BidiUtils.rtl() ? 0 : MultiTemplateTabPane.getInstance().getWidth() - menu.getPreferredSize().width;
GUICoreUtils.showPopupMenu(menu, MultiTemplateTabPane.getInstance(), x, getY() - 1 + getHeight());
}
@ -613,7 +615,7 @@ public class MultiTemplateTabPane extends JComponent {
if (selectedIndex < 0) {
selectedIndex = 0;
}
double templateStartX = 0;
double templateStartX = BidiUtils.rtl() ? maxWidth - realWidth : 0;
startX = new int[maxPaintIndex - minPaintIndex + 1];
isNeedToolTips = new boolean[maxPaintIndex - minPaintIndex + 1];
@ -651,7 +653,7 @@ public class MultiTemplateTabPane extends JComponent {
boolean isLeft = i < selectedIndex;
startX[i - minPaintIndex] = paintUnSelectedTab(g2d, icon, templateStartX, name, selectedIcon, isLeft, mouseOveredIndex, i);
}
templateStartX += realWidth;
templateStartX = BidiUtils.rtl() ? templateStartX - realWidth : templateStartX + realWidth;
}
if (!DesignerMode.isVcsMode()) {
@ -682,7 +684,7 @@ public class MultiTemplateTabPane extends JComponent {
private void paintListDown(Graphics2D g2d, double maxWidth) {
int x = (int) maxWidth + (LIST_BUTTON_WIDTH - listDownMode.getIconWidth()) / 2;
int x = BidiUtils.rtl() ? (LIST_BUTTON_WIDTH - listDownMode.getIconWidth()) / 2 : (int) maxWidth + (LIST_BUTTON_WIDTH - listDownMode.getIconWidth()) / 2;
int y = (getHeight() - listDownMode.getIconHeight()) / 2;
listDownMode.paintIcon(this, g2d, x, y);
}
@ -883,11 +885,11 @@ public class MultiTemplateTabPane extends JComponent {
g2d.draw(new Arc2D.Double(x[3] - CORNOR_RADIUS * 2, y[3], CORNOR_RADIUS * 2, CORNOR_RADIUS * 2, 90, -90, 0));
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
int sheetIconY = (getHeight() - sheeticon.getIconHeight()) / 2;
sheeticon.paintIcon(this, g2d, (int) templateStartX + GAP, sheetIconY);
sheeticon.paintIcon(this, g2d, BidiUtils.rtl() ? (int) templateStartX + realWidth - sheeticon.getIconWidth() - GAP : (int) templateStartX + GAP, sheetIconY);
// 画字符
g2d.setPaint(getForeground());
g2d.drawString(sheetName, (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2);
int closePosition = (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP;
g2d.drawString(sheetName, BidiUtils.rtl() ? (int) templateStartX + realWidth - 2 * GAP - sheeticon.getIconWidth() - getStringWidth(sheetName) : (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2);
int closePosition = BidiUtils.rtl() ? (int) templateStartX + SMALLGAP : (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP;
int closeY = (getHeight() - closeIcon.getIconHeight()) / 2;
if (!DesignerMode.isVcsMode()) {
closeIcon.paintIcon(this, g2d, closePosition, closeY);
@ -941,12 +943,12 @@ public class MultiTemplateTabPane extends JComponent {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
int sheetIconY = (getHeight() - sheeticon.getIconHeight()) / 2;
sheeticon.paintIcon(this, g2d, (int) templateStartX + GAP, sheetIconY);
sheeticon.paintIcon(this, g2d, BidiUtils.rtl() ? (int) templateStartX + realWidth - sheeticon.getIconWidth() - GAP : (int) templateStartX + GAP, sheetIconY);
// 画字符
g2d.setPaint(getForeground());
g2d.drawString(sheetName, (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2);
g2d.drawString(sheetName, BidiUtils.rtl() ? (int) templateStartX + realWidth - 2 * GAP - sheeticon.getIconWidth() - getStringWidth(sheetName) : (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2);
int closeY = (getHeight() - closeIcon.getIconHeight()) / 2;
int closePosition = (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP;
int closePosition = BidiUtils.rtl() ? (int) templateStartX + SMALLGAP : (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP;
if (!DesignerMode.isVcsMode()) {
closeIcon.paintIcon(this, g2d, closePosition, closeY);
}
@ -1126,19 +1128,23 @@ public class MultiTemplateTabPane extends JComponent {
private boolean isOverListDown(int evtX) {
if (BidiUtils.rtl()) {
return evtX >= SMALLGAP && evtX <= (LIST_BUTTON_WIDTH - SMALLGAP);
} else {
int maxWidth = getWidth() - LIST_BUTTON_WIDTH;
return evtX >= (maxWidth + SMALLGAP) && evtX <= (getWidth() - SMALLGAP);
}
}
private int getTemplateIndex(int evtX) {
int textX = 0;
int textX = BidiUtils.rtl() ? (int) (getWidth() - LIST_BUTTON_WIDTH * 1.0D) - realWidth : 0;
for (int i = minPaintIndex; i <= maxPaintIndex; i++) {
int textWidth = showJTemplateTab(openedTemplate.get(i)) ? realWidth : 0;
if (evtX >= textX && evtX < textX + textWidth) {
return i;
}
textX += textWidth;
textX = BidiUtils.rtl() ? textX - textWidth : textX + textWidth;
}
return -1;
}

6
designer-base/src/main/java/com/fr/design/foldablepane/HeaderPane.java

@ -1,6 +1,7 @@
package com.fr.design.foldablepane;
import com.fr.base.GraphHelper;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxUtilities;
@ -59,7 +60,8 @@ public class HeaderPane extends JPanel {
RenderingHints.VALUE_ANTIALIAS_ON);
BufferedImage panelImage = createPanelImage();
g2d.drawImage(panelImage, null, 0, 0);
GraphHelper.drawString(g2d, this.title, TITLE_X, headHeight - fontSize / 2 - 1);
int x = BidiUtils.rtl() ? headWidth - TITLE_X - g2d.getFontMetrics().stringWidth(title) : TITLE_X;
GraphHelper.drawString(g2d, this.title, x, headHeight - fontSize / 2 - 1);
}
private BufferedImage createPanelImage() {
@ -75,7 +77,7 @@ public class HeaderPane extends JPanel {
if (desktopHints != null) {
g2d.setRenderingHints(desktopHints);
}
int leftWdith = headWidth - LEFT_X;
int leftWdith = BidiUtils.rtl() ? TITLE_X : headWidth - LEFT_X;
if (this.isShow) {
image = UIConstants.DRAG_DOWN_SELECTED_SMALL;
g2d.drawImage(image, leftWdith, LEFT_Y, null);

31
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -6,6 +6,7 @@ import com.fr.base.Parameter;
import com.fr.base.ParameterMapNameSpace;
import com.fr.base.TableDataNameSpace;
import com.fr.base.Utils;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.io.IOFile;
import com.fr.data.TableDataSource;
import com.fr.design.actions.UpdateAction;
@ -161,6 +162,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
public FormulaPane() {
initComponents();
BidiUtils.applyOrientationByLocale(this);
}
private void initFormulaTextAreaKeyListener() {
@ -225,6 +227,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private void initFormulaTextArea() {
formulaTextArea = new RSyntaxTextArea();
BidiUtils.setOrientationByLocale(formulaTextArea);
configFormulaArea();
initFormulaTextAreaKeyListener();
initFormulaTextAreaMouseListener();
@ -259,8 +262,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private void initTipsPane() {
// tipsPane
JPanel containerSPane = new JPanel(new BorderLayout(4, 1));
JPanel labelPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0), true);
JPanel searchPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0), true);
JPanel labelPane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0), true);
JPanel searchPane = new JPanel(new FlowLayout(FlowLayout.TRAILING, 0, 0), true);
containerSPane.setPreferredSize(new Dimension(892, 23));
this.add(containerSPane, BorderLayout.NORTH);
@ -269,13 +272,13 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Input_Formula_In_The_Text_Area_Below") + ":");
formulaLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
labelPane.add(formulaLabel, BorderLayout.WEST);
labelPane.add(formulaLabel, BorderLayout.LINE_START);
keyWordTextField.setPreferredSize(new Dimension(240, 23));
searchPane.add(keyWordTextField, BorderLayout.EAST);
searchPane.add(searchButton, BorderLayout.EAST);
searchPane.add(keyWordTextField, BorderLayout.LINE_END);
searchPane.add(searchButton, BorderLayout.LINE_END);
containerSPane.add(labelPane, BorderLayout.WEST);
containerSPane.add(searchPane, BorderLayout.EAST);
containerSPane.add(labelPane, BorderLayout.LINE_START);
containerSPane.add(searchPane, BorderLayout.LINE_END);
initKeyWordTextFieldKeyListener();
tipsList = new JList(listModel);
@ -313,7 +316,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
// text
JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(textPane, BorderLayout.CENTER);
JPanel checkBoxandbuttonPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
JPanel checkBoxandbuttonPane = new JPanel(new BorderLayout());
initFormulaTextArea();
UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea);
@ -329,12 +332,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
//靠左流式布局
JPanel checkBoxPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.WEST);
checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.LINE_START);
//靠右流式布局
JPanel buttonPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
buttonPane.add(checkValidButton, BorderLayout.EAST);
buttonPane.add(calButton, BorderLayout.EAST);
checkBoxandbuttonPane.add(buttonPane, BorderLayout.EAST);
buttonPane.add(checkValidButton, BorderLayout.LINE_END);
buttonPane.add(calButton, BorderLayout.LINE_END);
checkBoxandbuttonPane.add(buttonPane, BorderLayout.LINE_END);
if (autoCompletionCheck == null) {
autoCompletionCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_AutoCompletion"));
autoCompletionCheck.setSelected(true);
@ -343,8 +346,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
checkBeforeColse = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Before_Closed"));
checkBeforeColse.setSelected(true);
}
checkBoxPane.add(autoCompletionCheck, BorderLayout.WEST);
checkBoxPane.add(checkBeforeColse, BorderLayout.WEST);
checkBoxPane.add(autoCompletionCheck, BorderLayout.LINE_START);
checkBoxPane.add(checkBeforeColse, BorderLayout.LINE_START);
extendCheckBoxPane(checkBoxPane);
ParameterTableModel model = new ParameterTableModel(0);

5
designer-base/src/main/java/com/fr/design/formula/FormulaPaneWhenReserveFormula.java

@ -1,6 +1,7 @@
package com.fr.design.formula;
import com.fr.base.BaseFormula;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.icheckbox.UICheckBox;
import javax.swing.JPanel;
@ -40,8 +41,8 @@ public class FormulaPaneWhenReserveFormula extends FormulaPane {
reserveCheckBox4Write = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Save_Formula"));
reserveCheckBox4Write.setSelected(false);
checkBoxPane.add(reserveCheckBox4Result, BorderLayout.WEST);
checkBoxPane.add(reserveCheckBox4Write, BorderLayout.WEST);
checkBoxPane.add(reserveCheckBox4Result, BorderLayout.LINE_START);
checkBoxPane.add(reserveCheckBox4Write, BorderLayout.LINE_START);
}
@Override

2
designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java

@ -1,5 +1,6 @@
package com.fr.design.formula;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.dialog.BasicDialog;
@ -161,6 +162,7 @@ public class FunctionManagerPane extends BasicPane {
descriptionPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description") + ":"), BorderLayout.NORTH);
this.descriptionTextArea = new UITextArea(6, 24);
descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
private String getEscapePath(String path) {

3
designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java

@ -2,6 +2,7 @@ package com.fr.design.gui.columnrow;
import java.awt.BorderLayout;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel;
@ -37,7 +38,7 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":"));
initRowSpinner();
rowPane.add(rowSpinner);
BidiUtils.applyOrientationByLocale(colPane, rowPane);
this.addDocumentListener(d);
}
}

3
designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.controlpane.shortcutfactory.AbstractShortCutFactory;
import com.fr.design.gui.controlpane.shortcutfactory.OldShortCutFactory;
@ -106,7 +107,7 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S
this.creators = this.createNameableCreators();
initCardPane();
// SplitPane
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane);
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, BidiUtils.applyOrientationByLocale(getLeftPane()), cardPane);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);

4
designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -363,11 +364,12 @@ public abstract class JListControlPane extends JControlPane implements ListContr
this.textLabel.setBorder(BorderFactory.createEmptyBorder(1, 0, 1, 1));
this.iconLabel.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 0));
add(this.textLabel, BorderLayout.CENTER);
add(this.iconLabel, BorderLayout.WEST);
add(this.iconLabel, BorderLayout.LINE_START);
this.iconLabel.setBackground(Color.WHITE);
//iconLabel和textLabel的背景颜色不会被JList背景颜色覆盖,开发者自定义
this.textLabel.setOpaque(true);
this.iconLabel.setOpaque(true);
BidiUtils.applyOrientationByLocale(this);
}
@Override

5
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.shortcutfactory.ShortCutFactory;
@ -175,8 +176,8 @@ public abstract class UIControlPane extends JControlPane {
toolBarPane.add(topToolBar, BorderLayout.NORTH);
JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
leftTopPane.add(toolBarPane, BorderLayout.EAST);
leftTopPane.add(addItemLabel, BorderLayout.CENTER);
leftTopPane.add(toolBarPane, BorderLayout.LINE_END);
leftTopPane.add(addItemLabel, BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.CENTER);
return leftTopPane;
}

6
designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
@ -68,13 +69,13 @@ public abstract class EditingStringListPane extends BasicBeanPane<List<String>>
eastPane.add(removeButton);
eastPane.add(moveUpButton);
eastPane.add(moveDownButton);
this.add(GUICoreUtils.createBorderPane(eastPane, BorderLayout.NORTH), BorderLayout.EAST);
this.add(GUICoreUtils.createBorderPane(eastPane, BorderLayout.NORTH), BorderLayout.LINE_END);
JPanel centerPane = new JPanel(new BorderLayout(0, 5));
this.add(centerPane, BorderLayout.CENTER);
JPanel northcenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northcenterPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
northcenterPane.add(addButton, BorderLayout.EAST);
northcenterPane.add(addButton, BorderLayout.LINE_END);
centerPane.add(northcenterPane, BorderLayout.NORTH);
centerPane.add(new JScrollPane(jlist), BorderLayout.CENTER);
@ -82,6 +83,7 @@ public abstract class EditingStringListPane extends BasicBeanPane<List<String>>
this.addButton.setEnabled(false);
this.checkEnableState();
BidiUtils.applyOrientationByLocale(this);
}
private void addListener() {

2
designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java

@ -30,7 +30,7 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + " " +com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"));
buttonPane.add(this.addButton, BorderLayout.WEST);
buttonPane.add(this.addButton, BorderLayout.LINE_START);
this.add(buttonPane, BorderLayout.NORTH);
this.addButton.addActionListener(new ActionListener() {

3
designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.ErrorMsgTextFieldAdapter;
import com.fr.design.beans.UITextFieldAdapter;
@ -84,7 +85,7 @@ public class RegFieldPane extends RegPane {
UILabel tipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip"));
tipLabel.setPreferredSize(new Dimension(60, 20));
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tipLabel, errorMsgTextFieldAdapter.getErrorMsgTextField()}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, LayoutConstants.VGAP_MEDIUM);
this.add(panel);
this.add(BidiUtils.applyOrientationByLocale(panel));
}
private void initRegErrorMsgField() {

2
designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
@ -91,6 +92,7 @@ public class RegPane extends BasicPane {
centerPane.add(cardPane, BorderLayout.NORTH);
jPanel.add(centerPane, BorderLayout.CENTER);
this.add(jPanel, BorderLayout.NORTH);
BidiUtils.applyOrientationByLocale(this);
regComboBox.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
RegExp regExp = (RegExp)regComboBox.getSelectedItem();

2
designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java

@ -5,6 +5,7 @@ package com.fr.design.gui.frpane;
import com.fr.base.Parameter;
import com.fr.base.core.KV;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
@ -81,6 +82,7 @@ public class ReportletParameterViewPane extends BasicPane {
}
this.add(editorPane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}

2
designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.general.ComparatorUtils;
@ -25,6 +26,7 @@ public class UITabbedPane extends JTabbedPane{
public UITabbedPane() {
super();
BidiUtils.setOrientationByLocale(this);
}
public UITabbedPane(int tabPlacement) {

2
designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java

@ -1,5 +1,6 @@
package com.fr.design.gui.icombobox;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.UIObserver;
@ -71,6 +72,7 @@ public class UIComboBox extends JComboBox implements UIObserver, GlobalNameObser
setRenderer(new UIComboBoxRenderer());
setEditor(new UIComboBoxEditor());
initListener();
BidiUtils.applyOrientationByLocale(this);
}
protected void initListener() {

4
designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -1,5 +1,6 @@
package com.fr.design.gui.icombobox;
import com.fr.base.i18n.BidiUtils;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
@ -96,7 +97,8 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
}
g2d.setColor(linecolor);
if (!comboBox.isPopupVisible()) {
g2d.drawRoundRect(0, 0, c.getWidth() - arrowButton.getWidth() + 3, c.getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
int width = BidiUtils.rtl() ? c.getWidth() : c.getWidth() - arrowButton.getWidth() + 3;
g2d.drawRoundRect(0, 0, width, c.getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
} else {
g2d.drawRoundRect(0, 0, c.getWidth(), c.getHeight() + 3, UIConstants.ARC, UIConstants.ARC);
g2d.drawLine(0, c.getHeight() - 1, c.getWidth(), c.getHeight() - 1);

11
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -1,6 +1,7 @@
package com.fr.design.gui.icontainer;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
@ -177,8 +178,12 @@ public class UIEastResizableContainer extends JPanel {
if (topToolPane == null || rightPane == null) {
return;
}
// topToolPane.setBounds(0, 0, containerWidth, topToolPaneHeight);//0,0,10,462
if (BidiUtils.rtl()) {
topToolPane.setBounds(containerWidth - leftPaneWidth, 0, leftPaneWidth, topToolPaneHeight);
leftPane.setBounds(containerWidth - leftPaneWidth, topToolPaneHeight, leftPaneWidth, getHeight() - topToolPaneHeight);
rightPane.setBounds(0, 0, containerWidth - leftPaneWidth, getHeight());
} else {
// topToolPane.setBounds(0, 0, containerWidth, topToolPaneHeight);//0,0,10,462
topToolPane.setBounds(0, 0, leftPaneWidth, topToolPaneHeight);//0,0,10,462
leftPane.setBounds(0, topToolPaneHeight, leftPaneWidth, getHeight() - topToolPaneHeight);
@ -186,6 +191,8 @@ public class UIEastResizableContainer extends JPanel {
rightPane.setBounds(leftPaneWidth, 0, containerWidth - leftPaneWidth, getHeight());//20,0,230,0
}
}
@Override
public void addLayoutComponent(String name, Component comp) {
// do nothing

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

@ -1,5 +1,6 @@
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;
@ -27,19 +28,23 @@ 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) {
@ -64,6 +69,27 @@ public class UILabel extends JLabel implements UITextComponent {
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 && text.charAt(text.length() - 1) == ':') {
text = ":" + 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");

5
designer-base/src/main/java/com/fr/design/gui/imenu/UIMenuEastAttrItem.java

@ -1,5 +1,6 @@
package com.fr.design.gui.imenu;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.stable.Constants;
@ -78,7 +79,7 @@ public class UIMenuEastAttrItem extends JMenuItem {
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) {
ButtonModel model = menuItem.getModel();
FontMetrics fm = SwingUtilities2.getFontMetrics(menuItem, g);
int startX = BidiUtils.rtl() ? textRect.x + 25 : 0;
if(!model.isEnabled()) {
// *** paint the text disabled
if ( UIManager.get("MenuItem.disabledForeground") instanceof Color ) {
@ -97,7 +98,7 @@ public class UIMenuEastAttrItem extends JMenuItem {
} else {
menuItem.setForeground(isArmed() ? Color.white : Color.black);
SwingUtilities2.drawStringUnderlineCharAt(menuItem, g, text,
-1, 0, textRect.y + fm.getAscent());
-1, startX , textRect.y + fm.getAscent());
}
}
}

11
designer-base/src/main/java/com/fr/design/gui/imenu/UIMenuItemUI.java

@ -1,5 +1,6 @@
package com.fr.design.gui.imenu;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.stable.Constants;
@ -34,16 +35,16 @@ public class UIMenuItemUI extends BasicMenuItemUI {
g.setColor(UIConstants.NORMAL_BACKGROUND);
g.fillRect(0, 0, menuWidth, menuHeight);
int bidiX = BidiUtils.rtl() ? 5 : 30;
if (menuItem.isOpaque()) {
if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
GUIPaintUtils.fillPaint((Graphics2D) g, 30, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7);
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7);
} else {
GUIPaintUtils.fillPaint((Graphics2D) g, 30, 0, menuWidth - 30, menuHeight, true, Constants.NULL, menuItem.getBackground(), 7);
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, menuItem.getBackground(), 7);
}
g.setColor(oldColor);
} else if (model.isArmed() || (menuItem instanceof JMenu &&
model.isSelected())) {
GUIPaintUtils.fillPaint((Graphics2D) g, 30, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7);
} else if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7);
g.setColor(oldColor);
}
}

6
designer-base/src/main/java/com/fr/design/gui/imenu/UIMenuUI.java

@ -1,5 +1,6 @@
package com.fr.design.gui.imenu;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUIPaintUtils;
@ -17,11 +18,12 @@ public class UIMenuUI extends BasicMenuUI {
Color oldColor = g.getColor();
int menuWidth = menuItem.getWidth();
int menuHeight = menuItem.getHeight();
int bidiX = BidiUtils.rtl() ? 5 : 30;
if (menuItem.isOpaque()) {
if (menuItem.getParent() instanceof JPopupMenu && model.isSelected()) {
g.setColor(UIConstants.UI_MENU_BACKGOURND);
g.fillRect(0, 0, menuWidth, menuHeight);
GUIPaintUtils.fillPaint((Graphics2D) g, 30, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7);
GUIPaintUtils.fillPaint((Graphics2D) g, bidiX, 0, menuWidth - 30, menuHeight, true, Constants.NULL, UIConstants.FLESH_BLUE, 7);
} else if (model.isSelected()) {
paintPressed(g, menuWidth, menuHeight);
} else {
@ -54,7 +56,7 @@ public class UIMenuUI extends BasicMenuUI {
ButtonModel model = menuItem.getModel();
FontMetrics fm = SwingUtilities2.getFontMetrics(menuItem, g);
int mnemIndex = -1;
BidiUtils.applyOrientationByLocale(menuItem);
if (!model.isEnabled()) {
// *** paint the text disabled
if (UIManager.get("MenuItem.disabledForeground") instanceof Color) {

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

@ -1,5 +1,6 @@
package com.fr.design.gui.itableeditorpane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
@ -58,8 +59,8 @@ public class UITableEditorPane<T> extends BasicPane {
pane.add(scrollPane, BorderLayout.CENTER);
initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(buttonPane, BorderLayout.EAST);
controlPane.add(l, BorderLayout.WEST);
controlPane.add(buttonPane, BorderLayout.LINE_END);
controlPane.add(l, BorderLayout.LINE_START);
pane.add(controlPane, BorderLayout.NORTH);
}

3
designer-base/src/main/java/com/fr/design/gui/itree/UITreeUI.java

@ -1,6 +1,7 @@
package com.fr.design.gui.itree;
import com.fr.base.BaseUtils;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils;
import com.fr.design.utils.ThemeUtils;
@ -29,7 +30,7 @@ public class UITreeUI extends MetalTreeUI {
protected void installDefaults() {
super.installDefaults();
setExpandedIcon(IconUtils.readIcon("/com/fr/design/standard/fileicon/minus.svg"));
setCollapsedIcon(IconUtils.readIcon("/com/fr/design/standard/fileicon/plus.svg"));
setCollapsedIcon(BidiUtils.rtl() ? IconUtils.readIcon("/com/fr/design/standard/fileicon/left.svg") : IconUtils.readIcon("/com/fr/design/standard/fileicon/plus.svg"));
if (tree.getCellRenderer() instanceof DefaultTreeCellRenderer) {
DefaultTreeCellRenderer r = (DefaultTreeCellRenderer) tree.getCellRenderer();
r.setBackgroundNonSelectionColor(ThemeUtils.TEXT_BG_COLOR);

3
designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java

@ -4,6 +4,7 @@ import com.fr.base.CoreDecimalFormat;
import com.fr.base.GraphHelper;
import com.fr.base.Style;
import com.fr.base.TextFormat;
import com.fr.base.i18n.BidiUtils;
import com.fr.data.core.FormatField;
import com.fr.data.core.FormatField.FormatContents;
import com.fr.design.border.UIRoundedBorder;
@ -139,7 +140,7 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName
protected void initLayout() {
JPanel labeledFormatTypeComboBoxPane = new JPanel(new BorderLayout(20, 0));
labeledFormatTypeComboBoxPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Format")), BorderLayout.WEST);
labeledFormatTypeComboBoxPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Format")), BorderLayout.LINE_START);
labeledFormatTypeComboBoxPane.add(typeComboBox, BorderLayout.CENTER);
JPanel labeledRoundingCheckboxPane = new JPanel(new BorderLayout(0, 0));

6
designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java

@ -1,6 +1,7 @@
package com.fr.design.hyperlink;
import com.fr.base.Utils;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
@ -74,8 +75,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
newWindowConfPane.add(widthTextFiled);
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(targetFramePanel, BorderLayout.WEST);
centerPanel.add(newWindowConfPane, BorderLayout.EAST);
centerPanel.add(targetFramePanel, BorderLayout.LINE_START);
centerPanel.add(newWindowConfPane, BorderLayout.LINE_END);
newWindowConfPane.setVisible(false);
centerPane.add(centerPanel);
@ -87,6 +88,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
});
this.add(this.setFootPanel(), BorderLayout.SOUTH);
BidiUtils.applyOrientationByLocale(this);
}
protected String[] getTargetFrames() {

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

@ -148,7 +148,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 选择路径按钮
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
reportletNamePane.add(browserButton, BorderLayout.EAST);
reportletNamePane.add(browserButton, BorderLayout.LINE_END);
browserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
@ -274,7 +274,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
*/
@Override
protected JPanel setFootPanel() {
JPanel content = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
JPanel content = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
// 参数传递方式下拉框
postComboBox = new UIComboBox(new String[]{"GET", "POST"});
@ -285,7 +285,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));
content.add(showParameterInterface);
return content;
}
@ -344,7 +344,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
this.setTargetFrameComboBox(targetFrameComboBox);
targetFrameComboBox.setEditable(false);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
JPanel targetFramePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
JPanel targetFramePanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
targetFramePanel.add(targetFrameComboBox);
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In") + ":"), targetFramePanel};
dialogComponents.add(targetComponents);

3
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java

@ -2,6 +2,7 @@ package com.fr.design.hyperlink;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -63,7 +64,7 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEADING), BorderLayout.SOUTH);
}
@Override

3
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink;
import com.fr.base.i18n.BidiUtils;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.constants.LayoutConstants;
@ -50,7 +51,7 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
urlTextField = new UITextField(headerPane.getWidth());
urlTextField.setText(ProductConstants.WEBSITE_URL);
JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:");
JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, BidiUtils.concatenateStrings("URL", ":"));
if (this.needRenamePane) {
headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_SMALL));

3
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java

@ -1,6 +1,7 @@
package com.fr.design.hyperlink;
import com.fr.base.Parameter;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
@ -45,7 +46,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEADING), BorderLayout.SOUTH);
}
@Override

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

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

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

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

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

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

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

@ -1,5 +1,6 @@
package com.fr.design.javascript;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.border.UIRoundedBorder;
@ -96,6 +97,7 @@ public class JSContentPane extends BasicPane {
private void addNewPaneLabel(){
UILabel advancedEditorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Advanced_Editor"), IconUtils.readIcon("com/fr/design/images/edit/advancedEditor.svg"), SwingConstants.LEFT);
BidiUtils.applyOrientationByLocale(advancedEditorLabel);
advancedEditorLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
advancedEditorLabel.addMouseListener(new MouseAdapter() {
@ -129,7 +131,7 @@ public class JSContentPane extends BasicPane {
advancedEditorDialog.requestFocus();
}
});
labelPane.add(advancedEditorLabel,BorderLayout.EAST);
labelPane.add(advancedEditorLabel, BorderLayout.LINE_END);
}
protected UIScrollPane createContentTextAreaPanel(){
@ -160,6 +162,7 @@ public class JSContentPane extends BasicPane {
protected JPanel createJSParaPane(){
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Format_JavaScript"), IOUtils.readIcon("com/fr/design/images/edit/format.png"), SwingConstants.LEFT);
BidiUtils.applyOrientationByLocale(label);
label.setCursor(new Cursor(Cursor.HAND_CURSOR));
label.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Format_JavaScript"));
label.addMouseListener(new MouseAdapter() {

7
designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java

@ -1,6 +1,7 @@
package com.fr.design.javascript;
import com.fr.base.Parameter;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.data.tabledata.tabledatapane.OneListTableModel;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
@ -9,6 +10,7 @@ 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.hyperlink.AbstractHyperLinkPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.javascript.jsapi.JSImplPopulateAction;
import com.fr.design.javascript.jsapi.JSImplUpdateAction;
import com.fr.design.mainframe.DesignerContext;
@ -20,6 +22,7 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import java.awt.BorderLayout;
@ -67,7 +70,7 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
importedJsPane.setPreferredSize(new Dimension(265, 150));
jsPane = createJSContentPane(defaultArgs);
jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript")));
jsPane.setBorder(BidiUtils.applyTitledBorderJustification(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Toolkit.i18nText("Fine-Design_Report_JavaScript"))));
parameterPane.setPreferredSize(new Dimension(265, 150));
JPanel topPane = new JPanel(new GridLayout(1,2));
@ -143,7 +146,7 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
};
UITableEditorPane<String> importedJsPane = new UITableEditorPane<String>(model);
importedJsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript")));
return importedJsPane;
return BidiUtils.applyOrientationByLocale(importedJsPane);
}
/**

46
designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java

@ -33,21 +33,21 @@ public class FRGUIPaneFactory {
public static final int HEIGHT_OFFSET = 50;
/**
* 创建一个靠右靠左的水平间隙为2的流式布局
* 创建一个靠左的水平间隙为2的流式布局,支持RTL
*
* @return FlowLayout对象
*/
public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多
return new FlowLayout(FlowLayout.LEFT, 2, 0);
return new FlowLayout(FlowLayout.LEADING, 2, 0);
}
/**
* 创建一个靠左的布局
* 创建一个靠左的布局,支持RTL
*
* @return FlowLayout对象
*/
public static LayoutManager createLeftZeroLayout() {
return new FlowLayout(FlowLayout.LEFT, 0, 0);
return new FlowLayout(FlowLayout.LEADING, 0, 0);
}
/**
@ -70,12 +70,12 @@ public class FRGUIPaneFactory {
}
/**
* 创建一个靠左的水平和垂直间隙均为5的流式布局
* 创建一个靠左的水平和垂直间隙均为5的流式布局,支持RTL
*
* @return FlowLayout对象
*/
public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout
return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5
public static LayoutManager createLabelFlowLayout() {
return new FlowLayout(FlowLayout.LEADING); // 默认 5, 5
}
/**
@ -200,7 +200,7 @@ public class FRGUIPaneFactory {
}
/**
* 创建一个带标题边框面板
* 创建一个带标题边框面板支持rtl
*
* @param string 边框标题
* @return JPanel对象
@ -209,12 +209,12 @@ public class FRGUIPaneFactory {
JPanel jp = new JPanel();
UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string);
jp.setBorder(explainBorder);
jp.setLayout(new FlowLayout(FlowLayout.LEFT));
jp.setLayout(new FlowLayout(FlowLayout.LEADING));
return jp;
}
/**
* 创建一个无间隔带标题边框面板
* 创建一个无间隔带标题边框面板支持rtl
*
* @param string 边框标题
* @return JPanel对象
@ -223,7 +223,7 @@ public class FRGUIPaneFactory {
JPanel jp = new JPanel();
UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string);
jp.setBorder(explainBorder);
jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
jp.setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0));
return jp;
}
@ -334,48 +334,48 @@ public class FRGUIPaneFactory {
}
/**
* 创建一个正常靠左空边框面板
* 创建一个正常靠左空边框面板,支持RTL
*
* @return JPanel对象
*/
public static JPanel createNormalFlowInnerContainer_M_Pane() {
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
jp.setLayout(new FlowLayout(FlowLayout.LEFT));
jp.setLayout(new FlowLayout(FlowLayout.LEADING));
return jp;
}
/**
* 创建一个靠左0间距边框面板
* 创建一个靠左0间距边框面板,支持RTL
*
* @return JPanel对象
*/
public static JPanel createLeftFlowZeroGapBorderPane() {
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
jp.setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0));
return jp;
}
/**
* 创建一个靠左流式布局正常流式内嵌
* 创建一个流式布局正常流式内嵌支持RTL
*
* @return JPanel对象
*/
public static JPanel createNormalFlowInnerContainer_S_Pane() {
JPanel jp = new JPanel();
jp.setLayout(new FlowLayout(FlowLayout.LEFT));
jp.setLayout(new FlowLayout(FlowLayout.LEADING));
return jp;
}
/**
* 创建一个靠左流式布局流式内嵌
* 创建一个靠左流式布局流式内嵌支持RTL
*
* @return JPanel对象
*/
public static JPanel createBoxFlowInnerContainer_S_Pane() {
JPanel jp = new JPanel();
jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2));
jp.setLayout(new FlowLayout(FlowLayout.LEADING, 2, 2));
return jp;
}
@ -406,7 +406,7 @@ public class FRGUIPaneFactory {
}
/**
* 创建一个靠左的水平流式布局
* 创建一个靠左的水平流式布局,支持RTL
* @param hgap 水平间距
* @param vgap 竖直间距
* @return JPanel对象
@ -414,20 +414,20 @@ public class FRGUIPaneFactory {
public static JPanel createBoxFlowInnerContainer_S_Pane(int hgap, int vgap) {
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
jp.setLayout(new FlowLayout(FlowLayout.LEFT, hgap, vgap));
jp.setLayout(new FlowLayout(FlowLayout.LEADING, hgap, vgap));
return jp;
}
/**
* 创建一个靠右面板
* 创建一个靠右面板支持RTL
*
* @return JPanel对象
*/
public static JPanel createRightFlowInnerContainer_S_Pane() {
JPanel jp = new JPanel();
jp.setLayout(new FlowLayout(FlowLayout.RIGHT));
jp.setLayout(new FlowLayout(FlowLayout.TRAILING));
return jp;
}

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

@ -18,7 +18,7 @@ public class FRLeftFlowLayout extends FlowLayout {
public void layoutContainer(Container target) {
synchronized (target.getTreeLock()) {
Insets insets = target.getInsets();
int maxwidth = target.getWidth() - (insets.left + insets.right + getHgap()*2);
int maxwidth = target.getPreferredSize().width - (insets.left + insets.right + getHgap()*2);
int nmembers = target.getComponentCount();
int x = 0, y = insets.top + getVgap();
int rowh = 0, start = 0;

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

@ -1,6 +1,7 @@
package com.fr.design.layout;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
@ -252,6 +253,7 @@ public class TableLayoutHelper {
}
}
}
BidiUtils.applyOrientationByLocale(resultPane);
}

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

@ -381,7 +381,6 @@ public class VerticalFlowLayout implements LayoutManager, java.io.Serializable {
synchronized (target.getTreeLock()) {
switch (newAlign) {
case TOP:
y += ltr ? 0 : height;
break;
case CENTER:
y += height / 2;
@ -397,7 +396,7 @@ public class VerticalFlowLayout implements LayoutManager, java.io.Serializable {
if (ltr) {
m.setLocation(isAlignLeft ? x : newX, y);
} else {
m.setLocation(isAlignLeft ? x : newX, target.getHeight() - y - m.getHeight());
m.setLocation(isAlignLeft ? target.getWidth() - m.getWidth() - x : newX, y);
}
y += m.getHeight() + vgap;
}

14
designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.DesignState;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants;
@ -81,7 +82,7 @@ public class CenterRegionContainerPane extends JPanel {
};
toolbarPane.setLayout(FRGUIPaneFactory.createBorderLayout());
eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eastPane.add(largeToolbar = getToolBarMenuDock().createLargeToolbar(), BorderLayout.WEST);
eastPane.add(largeToolbar = getToolBarMenuDock().createLargeToolbar(), BorderLayout.LINE_END);
eastCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
combineUpTooBar();
eastCenterPane.add(combineUp, BorderLayout.NORTH);
@ -108,9 +109,9 @@ public class CenterRegionContainerPane extends JPanel {
* 创建上工具栏
*/
private void combineUpTooBar() {
combineUp = new UIToolbar(FlowLayout.LEFT);
combineUp = new UIToolbar(FlowLayout.LEADING);
combineUp.setBorder(new MatteBorder(new Insets(0, LEFT_ALIGN_GAP, 1, 0), UIConstants.LINE_COLOR));
combineUp.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 2));
combineUp.setLayout(new FlowLayout(FlowLayout.LEADING, 5, 2));
setUpUpToolBar(null);
}
@ -229,7 +230,7 @@ public class CenterRegionContainerPane extends JPanel {
}
// 颜色,字体那些按钮的工具栏
toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER);
toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.CENTER);
JPanel customNorthPane = strategy.customNorthPane(toolbarPane,plus);
if (!isExist(customNorthPane)){
this.removeNorth();
@ -275,9 +276,8 @@ public class CenterRegionContainerPane extends JPanel {
//移除新建模板按钮
templateTabPane.remove(newWorkBookPane);
} else {
eastPane.add(largeToolbar, BorderLayout.WEST);
templateTabPane.add(newWorkBookPane, BorderLayout.WEST);
eastPane.add(largeToolbar, BorderLayout.LINE_START);
templateTabPane.add(newWorkBookPane, BorderLayout.LINE_START);
}
}

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

@ -5,6 +5,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.OptimizeUtil;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@ -75,6 +76,7 @@ import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.WindowConstants;
import java.awt.BorderLayout;
import java.awt.ComponentOrientation;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
@ -266,7 +268,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
basePane.add(CenterRegionContainerPane.getInstance(), BorderLayout.CENTER);
laoyoutWestPane();
basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST);
basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.LINE_END);
basePane.setBounds(0, 0, contentWidth, contentHeight);
// 数值越小。越在底层
@ -310,6 +312,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
this.setDropTarget(new DropTarget(this, DnDConstants.ACTION_MOVE, new FileDropTargetListener(), true));
closeMode = UIConstants.CLOSE_OF_AUTHORITY;
initMenuPane();
BidiUtils.applyOrientationByLocale(this);
}
public void resizeFrame() {
@ -477,7 +480,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
protected void laoyoutWestPane() {
basePane.add(WestRegionContainerPane.getInstance(), BorderLayout.WEST);
basePane.add(WestRegionContainerPane.getInstance(), BorderLayout.LINE_START);
}
// 调整windows大小
@ -820,7 +823,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
DesignerOpenEmptyPanel designerOpenEmptyPanel = new DesignerOpenEmptyPanel();
BorderLayout layout = (BorderLayout) basePane.getLayout();
basePane.remove(layout.getLayoutComponent(BorderLayout.CENTER));
basePane.remove(layout.getLayoutComponent(BorderLayout.EAST));
basePane.remove(layout.getLayoutComponent(BorderLayout.LINE_END));
basePane.add(designerOpenEmptyPanel, BorderLayout.CENTER);
resetToolkitByPlus(ToolBarMenuDock.NULLAVOID);
@ -974,10 +977,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
basePane.add(center, BorderLayout.CENTER);
}
if (west != null) {
basePane.add(west, BorderLayout.WEST);
basePane.add(west, BorderLayout.LINE_START);
}
if (east != null) {
basePane.add(east, BorderLayout.EAST);
basePane.add(east, BorderLayout.LINE_END);
}
jTemplate.setComposite();

14
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.base.FRContext;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager;
@ -1189,7 +1190,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getX() >= ARROW_RANGE_START) {
if ((BidiUtils.rtl() && e.getX() <= 30) || (!BidiUtils.rtl() && e.getX() >= ARROW_RANGE_START)) {
onPop();
}
}
@ -1204,7 +1205,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
@Override
public void mousePressed(MouseEvent e) {
if (e.getX() < ARROW_RANGE_START) {
if ((BidiUtils.rtl() && e.getX() > 30) || (!BidiUtils.rtl() && e.getX() < ARROW_RANGE_START)) {
mouseDownCompCoords = e.getPoint();
}
}
@ -1213,7 +1214,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private MouseMotionListener mouseMotionListener = new MouseMotionListener() {
@Override
public void mouseMoved(MouseEvent e) {
if (e.getX() >= ARROW_RANGE_START) {
if ((BidiUtils.rtl() && e.getX() <= 30) || (!BidiUtils.rtl() && e.getX() >= ARROW_RANGE_START)) {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
@ -1266,7 +1267,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
contentPane.setBackground(originColor);
contentPane.setLayout(new BorderLayout());
UILabel label = new UILabel(title);
contentPane.add(label, BorderLayout.WEST);
contentPane.add(label, BorderLayout.LINE_START);
contentPane.setBorder(new EmptyBorder(5, 10, 5, 0));
setLayout(new BorderLayout());
@ -1321,7 +1322,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else {
button = UIConstants.POP_BUTTON_UP;
}
SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, button, (ARROW_RANGE_START + 8), 4, null));
SvgDrawUtils.doDrawSVG(g, () -> SvgDrawUtils.drawImage(g, button, BidiUtils.rtl() ? 0 : ARROW_RANGE_START + 8, 4, null));
}
}
@ -1375,8 +1376,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
public void adjustLocation() {
this.setLocation(
getLeftPane().getLocationOnScreen().x - CONTENT_WIDTH,
BidiUtils.rtl() ? getLeftPane().getLocationOnScreen().x : getLeftPane().getLocationOnScreen().x - CONTENT_WIDTH,
DesignerContext.getDesignerFrame().getLocationOnScreen().y + 228
);
}

3
designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@ -67,7 +68,7 @@ public class NorthRegionContainerPane extends JPanel {
this.setLayout(new BorderLayout());
this.add(new UIMenuHighLight(), BorderLayout.SOUTH);
this.add(initNorthEastPane(ad), BorderLayout.EAST);
this.add(initNorthEastPane(ad), BorderLayout.LINE_END);
}
/**

4
designer-base/src/main/java/com/fr/design/mainframe/WestRegionContainerPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
@ -11,7 +12,6 @@ import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.Constants;
public class WestRegionContainerPane extends UIResizableContainer {
@ -31,7 +31,7 @@ public class WestRegionContainerPane extends UIResizableContainer {
}
public WestRegionContainerPane() {
super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT);
super(DesignerFrameFileDealerPane.getInstance(), BidiUtils.rtl() ? com.fr.stable.Constants.LEFT : com.fr.stable.Constants.RIGHT);
setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));

3
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.check;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
@ -123,7 +124,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
this.add(hiddenPanel, BorderLayout.CENTER);
this.add(bottomPanel, BorderLayout.SOUTH);
this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse"));
BidiUtils.applyOrientationByLocale(this);
GUICoreUtils.centerWindow(this);
}

2
designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.loghandler;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.StringUtils;
@ -52,6 +53,7 @@ public class LogMessageBar extends JPanel {
return;
}
dlg = new LogDetailPane().showDialog();
BidiUtils.applyOrientationByLocale(dlg);
dlg.setVisible(true);
}
});

2
designer-base/src/main/java/com/fr/design/mainframe/manager/search/searcher/control/pane/TemplateTreeSearchToolbarPane.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.search.event.TreeSearchStatusChangeEvent;
@ -92,6 +93,7 @@ public class TemplateTreeSearchToolbarPane extends JPanel implements TreeSearchS
add(contentPane, BorderLayout.CENTER);
setPreferredSize(new Dimension(240, 30));
TemplateTreeSearchManager.getInstance().registerTreeSearchStatusChangeListener(this);
BidiUtils.applyOrientationByLocale(this);
}
private void initContentPane() {

5
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.theme.FineColorSynchronizer;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
@ -147,7 +148,7 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
JPanel borderContainer = new JPanel(new BorderLayout());
borderContainer.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Title")));
borderContainer.add(content);
BidiUtils.setOrientationByLocale(borderContainer);
JPanel container = new JPanel(new BorderLayout());
container.add(borderContainer, BorderLayout.CENTER);
@ -183,7 +184,7 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
uiTabbedPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 1));
container.add(uiTabbedPane, BorderLayout.CENTER);
initPluginListener();
return container;
return BidiUtils.setOrientationByLocale(container);
}
public void addCustomEditorPane(String title, final Component component) {

5
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.FormThemeConfig;
import com.fr.base.theme.ReportTheme;
@ -180,7 +181,7 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
content.setPreferredSize(new Dimension(content.getPreferredSize().width, 20));
UIToolbar toolBar = ToolBarDef.createJToolBar();
toolBar.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
toolBar.setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0));
content.add(toolBar, BorderLayout.CENTER);
MenuDef addMenuDef = createAddMenuDef();
@ -207,7 +208,7 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
}
}
});
content.add(setTheme4NewTemplateButton, BorderLayout.EAST);
content.add(setTheme4NewTemplateButton, BorderLayout.LINE_END);
JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane();
container.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));

2
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.theme;
import com.fr.base.ScreenResolution;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.FormThemeConfig;
import com.fr.base.theme.ReportTheme;
@ -297,6 +298,7 @@ public class TemplateThemeGridPagesPane extends JPanel {
if (config == reportThemesManagerPane.getConfig()) {
tabbedPane.setSelectedIndex(1);
}
BidiUtils.applyOrientationByLocale(this);
}
@Override

9
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.base.theme.settings.ThemeThumbnail;
@ -74,7 +75,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
setLayout(new BorderLayout(5, 0));
setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 6));
add(createLeftPane(), BorderLayout.CENTER);
add(createRightPane(), BorderLayout.EAST);
add(createRightPane(), BorderLayout.LINE_END);
}
@Override
@ -94,7 +95,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
themePreviewPane.setPreferredSize(new Dimension(PREVIEW_PANE_WIDTH, PREVIEW_PANE_HEIGHT));
previewContainer.add(themePreviewPane, BorderLayout.CENTER);
return titleContainer;
return BidiUtils.applyOrientationByLocale(titleContainer);
}
private JPanel createRightPane() {
themeEditorPane = createThemeEditorPane();
@ -383,8 +384,8 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
leftTitlePromptLabel = new UILabel(Toolkit.i18nText("Fine-Design_Theme_Control_PC_Prompt"));
leftTitleLabel.setForeground(WidgetThemeDisplayConstants.THEME_PREVIEW_TITLE_COLOR);
leftTitlePromptLabel.setForeground(WidgetThemeDisplayConstants.COMPATIBLE_STYLE_FONT_COLOR);
titlePane.add(leftTitleLabel, BorderLayout.WEST);
titlePane.add(leftTitlePromptLabel, BorderLayout.EAST);
titlePane.add(leftTitleLabel, BorderLayout.LINE_START);
titlePane.add(leftTitlePromptLabel, BorderLayout.LINE_END);
return titlePane;
}
}

3
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.theme.edit.chart;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener;
@ -83,7 +84,7 @@ public class ChartFontPane extends BasicPane {
double p = TableLayout.PREFERRED;
double[] rows = {p, p, p};
double[] columnSize = {labelWidth, totalWidth};
UILabel text = new UILabel(getUILabelText(), SwingConstants.LEFT);
UILabel text = new UILabel(getUILabelText(), SwingConstants.LEADING);
Component[][] components = {
new Component[]{null, null},
new Component[]{text, fontNameComboBox},

3
designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.ui;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.BorderFactory;
@ -23,7 +24,7 @@ public class BreadcrumbBar extends JPanel {
private JButton currentCrumb;
public BreadcrumbBar() {
setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0));
}
public void addCrumb(final String text, final BreadcrumbBackListener backListener) {

1
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -62,7 +62,6 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.remote.action.RemoteDesignAuthManagerAction;
import com.fr.design.update.actions.SoftwareUpdateAction;

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

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

4
designer-base/src/main/java/com/fr/design/menu/MenuDef.java

@ -25,6 +25,7 @@ import java.awt.event.ContainerListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.text.Bidi;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@ -240,7 +241,6 @@ public class MenuDef extends ShortCut {
createdJMenu.getPopupMenu().addContainerListener(listener);
}
}
return createdJMenu;
}
@ -490,6 +490,8 @@ public class MenuDef extends ShortCut {
MenuDef.this.updatePopupMenu(popupMenu);
GUICoreUtils.showPopupMenu(popupMenu, button, 0, button.getSize().height);
}
// BidiUtils.applyOrientationByLocale(popupMenu);
// popupMenu.revalidate();
}
};

8
designer-base/src/main/java/com/fr/design/menu/MenuKeySet.java

@ -1,6 +1,8 @@
package com.fr.design.menu;
import com.fr.base.i18n.BidiUtils;
import javax.swing.*;
/**
@ -27,7 +29,11 @@ public abstract class MenuKeySet {
public abstract String getMenuName();
public String getMenuKeySetName(){
return getMenuName()+ "(" +getMnemonic() + ")";
return BidiUtils.concatenateStrings(getMenuName(), "(" + getMnemonic() + ")");
}
public String getMenuKeySetNameWithDot(){
return BidiUtils.concatenateStrings(getMenuKeySetName(), "...");
}
public abstract KeyStroke getKeyStroke();

3
designer-base/src/main/java/com/fr/design/menu/ToolBarDef.java

@ -1,5 +1,6 @@
package com.fr.design.menu;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.itoolbar.UIToolBarUI;
@ -43,7 +44,7 @@ public class ToolBarDef {
* 一个static的方法生成一个JToolBar
*/
public static UIToolbar createJToolBar() {
UIToolbar toolbar = new UIToolbar(FlowLayout.LEFT);
UIToolbar toolbar = new UIToolbar(FlowLayout.LEADING);
toolbar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
return toolbar;
}

2
designer-base/src/main/java/com/fr/design/present/DictPresentPane.java

@ -3,6 +3,7 @@ package com.fr.design.present;
import java.awt.BorderLayout;
import java.awt.event.ItemListener;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.present.DictPresent;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
@ -21,6 +22,7 @@ public class DictPresentPane extends FurtherBasicBeanPane<DictPresent> implement
dictionaryPane = new DictionaryPane();
this.setLayout(new BorderLayout());
this.add(dictionaryPane, BorderLayout.CENTER);
BidiUtils.applyOrientationByLocale(this);
}
@Override

3
designer-base/src/main/java/com/fr/design/report/SelectImagePane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fr.base.Style;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.ImgChooseWrapper;
import com.fr.design.gui.ibutton.UIButton;
@ -83,7 +84,7 @@ public class SelectImagePane extends BasicPane {
previewOwnerPane.add(new JScrollPane(previewPane));
JPanel selectFilePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
previewContainerPane.add(selectFilePane, BorderLayout.EAST);
previewContainerPane.add(selectFilePane, BorderLayout.LINE_END);
selectFilePane.setBorder(BorderFactory
.createEmptyBorder(8, 2, 4, 0));

6
designer-base/src/main/java/com/fr/design/report/WatermarkPane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fr.base.BaseFormula;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.editor.FormulaEditor;
@ -87,6 +88,7 @@ public class WatermarkPane extends BasicPane {
JPanel leftPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.add(leftPane, BorderLayout.CENTER);
leftPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Style_Preview"), null));
BidiUtils.setOrientationByLocale(leftPane);
JPanel previewPaneWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
leftPane.add(previewPaneWrapper, BorderLayout.CENTER);
previewPaneWrapper.setBorder(BorderFactory.createEmptyBorder(2, 8, 4, 8));
@ -95,7 +97,7 @@ public class WatermarkPane extends BasicPane {
// 设置
JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.add(rightPane, BorderLayout.EAST);
contentPane.add(rightPane, BorderLayout.LINE_END);
rightPane.add(initRightPane(), BorderLayout.NORTH);
}
@ -182,7 +184,7 @@ public class WatermarkPane extends BasicPane {
UIScrollPane configPane = new UIScrollPane(rightContentPane);
configPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Config"), null));
return configPane;
return BidiUtils.setOrientationByLocale(configPane);
}
protected void populateFontSize(int fontSize) {

2
designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java

@ -43,7 +43,7 @@ public class ReportFitAttrAction extends JTemplateAction {
private void initMenuStyle() {
this.setMenuKeySet(REPORT_FIT_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetNameWithDot());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon("/com/fr/design/images/reportfit/fit");
}

2
designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateFitAttrPane.java

@ -1,5 +1,6 @@
package com.fr.design.report.fit.menupane;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.report.fit.BaseFitAttrPane;
@ -30,6 +31,7 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
break;
}
}
BidiUtils.applyOrientationByLocale(this);
}
@Override

3
designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java

@ -1,5 +1,6 @@
package com.fr.design.style;
import com.fr.base.i18n.BidiUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
@ -82,7 +83,7 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
triggleButton.addMouseListener(this);
this.add(displayPane, BorderLayout.CENTER);
this.add(triggleButton, BorderLayout.EAST);
this.add(triggleButton, BorderLayout.LINE_END);
this.addAncestorListener(new AncestorListener() {
public void ancestorAdded(AncestorEvent event) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save