Browse Source

Merge pull request #745 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '86bb638de4408f2b68113801bf58ffce24d5aea2':
  修改工具类
  工具类包装下 避免控件高度变化
  工具类包装下 避免控件高度变化
  更新
  REPORT-14268 10.0 设计器日文国际化问题协助修改
bugfix/10.0
Hades 6 years ago
parent
commit
d5037fd7dd
  1. 8
      designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java
  2. 1
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  3. 13
      designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java

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

@ -9,6 +9,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerBean;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import javax.swing.*;
@ -16,6 +18,7 @@ import java.awt.*;
public class VerticalChoosePane extends ChoosePane implements DesignerBean {
private static final int RIGHTBORDER = 5;
private static final int MAX_WIDTH = 60;
public VerticalChoosePane(Previewable previewable) {
this(previewable, -1);
@ -40,8 +43,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
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 l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), UILabel.LEFT);
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);
l1.setPreferredSize(pSize);
@ -52,7 +54,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
Component[][] components = new Component[][]{
new Component[]{l1, dsNameComboBox},
new Component[]{l2, schemaBox},
new Component[]{l3, rs}
new Component[]{l3, UIComponentUtils.wrapWithBorderLayoutPane(rs)}
};
JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE);

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

@ -496,7 +496,6 @@ public abstract class ToolBarMenuDock {
if (WorkContext.getCurrent().isLocal()) {
shortCuts.add(new SoftwareUpdateAction());
}
if (AlphaFineConfigManager.isALPHALicAvailable()) {
shortCuts.add(new AlphaFineAction());
}

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

@ -35,4 +35,17 @@ public class FRWidgetFactory {
UIComponentUtils.setLineWrap(label, lineWidth);
return label;
}
/**
* 创建一个可换行可调整水平对齐的 UILabel
* @param text
* @param lineWidth
* @param horizontalAlignment
* @return com.fr.design.gui.ilable.UILabel
*/
public static UILabel createLineWrapLabel(String text, int lineWidth, int horizontalAlignment) {
UILabel label = createLineWrapLabel(text, lineWidth);
label.setHorizontalAlignment(horizontalAlignment);
return label;
}
}

Loading…
Cancel
Save