Browse Source

REPORT-14057 10.0日文国际化问题处理=>69 表单=>label控件属性面板显示不全

bugfix/10.0
plough 6 years ago
parent
commit
a71518cb65
  1. 2
      designer-base/src/main/java/com/fr/design/designer/IntervalConstants.java
  2. 8
      designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java
  3. 12
      designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java

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

@ -29,4 +29,6 @@ public class IntervalConstants {
public static final int INTERVAL_W4 = 22;
public static final int INTERVAL_W5 = 10;
}

8
designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java

@ -8,7 +8,6 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
@ -19,19 +18,20 @@ import java.awt.Component;
* Created by plough on 2017/8/7.
*/
public class WidgetBoundsPaneFactory {
private static final int RIGHT_PANE_WIDTH = 145;
public static UIExpandablePane createBoundsPane(UISpinner width, UISpinner height) {
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)},
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)},
new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
};
double[] rowSize = {p, p};
double[] columnSize = {p, f};
double[] columnSize = {f, RIGHT_PANE_WIDTH};
int[][] rowCount = {{1, 1}, {1, 1}};
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6);
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, IntervalConstants.INTERVAL_L6);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
boundsPane.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);

12
designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.style.FRFontPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.ui.designer.component.FormWidgetValuePane;
import com.fr.form.ui.Label;
@ -24,6 +25,7 @@ import java.awt.*;
* Created by ibm on 2017/8/3.
*/
public class LabelDefinePane extends AbstractDataModify<Label> {
private static final int WIDGET_VALUE_PANE_WIDTH = 145;
private FormWidgetValuePane formWidgetValuePane;
private UICheckBox isPageSetupVertically;
private UICheckBox isStyleAlignmentWrapText;
@ -60,20 +62,20 @@ public class LabelDefinePane extends AbstractDataModify<Label> {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p, p, p};
double[] columnSize = {p, f};
double[] columnSize = {f, WIDGET_VALUE_PANE_WIDTH};
int[][] rowCount = {{1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
UILabel widgetValueLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Estate_Widget_Value"));
UILabel widgetValueLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Estate_Widget_Value"));
widgetValueLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel fontLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"));
UILabel fontLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"));
fontLabel.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{widgetValueLabel, formWidgetValuePane},
new Component[]{isStyleAlignmentWrapText, null},
new Component[]{isPageSetupVertically, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Display_Position_Similar")), hAlignmentPane},
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Display_Position_Similar")), hAlignmentPane},
new Component[]{fontLabel, frFontPane},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W4, IntervalConstants.INTERVAL_L1);
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
boundsPane.add(panel);

Loading…
Cancel
Save