Browse Source

REPORT-14057 10.0日文国际化问题处理=>53 图表=>样式=>系列面板显示不全

bugfix/10.0
plough 6 years ago
parent
commit
3e213834d4
  1. 2
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java
  2. 5
      designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java
  3. 38
      designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java
  4. 5
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java
  5. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/TableLayout4VanChartHelper.java
  6. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  7. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  8. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderPane.java
  9. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithAlphaPane.java
  10. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithRadiusPane.java

2
designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -3,6 +3,7 @@ package com.fr.design.gui.ibutton;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import sun.swing.SwingUtilities2;
@ -213,6 +214,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
protected void initButton(UIToggleButton labelButton) {
labelButton.setBorderPainted(false);
UIComponentUtils.setLineWrap(labelButton);
labelButtonList.add(labelButton);
this.add(labelButton);
}

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

@ -7,6 +7,7 @@ import com.fr.stable.StringUtils;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
@ -61,7 +62,7 @@ public class UIComponentUtils {
* @param layoutConstraint添加的方向 BorderLayout.NORTH
* @return 包装好的 JPanel
*/
public static JPanel wrapWithBorderLayoutPane(JComponent comp, String layoutConstraint) {
public static JPanel wrapWithBorderLayoutPane(Component comp, String layoutConstraint) {
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.add(comp, layoutConstraint);
return panel;
@ -72,7 +73,7 @@ public class UIComponentUtils {
* @param comp待包装的组件
* @return 包装好的 JPanel布局方向为 BorderLayout.NORTH
*/
public static JPanel wrapWithBorderLayoutPane(JComponent comp) {
public static JPanel wrapWithBorderLayoutPane(Component comp) {
return wrapWithBorderLayoutPane(comp, BorderLayout.NORTH);
}

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

@ -0,0 +1,38 @@
package com.fr.design.widget;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.UIComponentUtils;
/**
* 创建 widget 的静态工厂
* Created by plough on 2019/1/15.
*/
public class FRWidgetFactory {
// 不可实例化
private FRWidgetFactory() {
throw new AssertionError();
}
/**
* 创建一个可换行的 UILabel
* @param text 标签文字
* @return com.fr.design.gui.ilable.UILabel
*/
public static UILabel createLineWrapLabel(String text) {
UILabel label = new UILabel(text);
UIComponentUtils.setLineWrap(label);
return label;
}
/**
* 创建一个可换行的 UILabel
* @param text 标签文字
* @param lineWidth 最大行宽
* @return com.fr.design.gui.ilable.UILabel
*/
public static UILabel createLineWrapLabel(String text, int lineWidth) {
UILabel label = new UILabel(text);
UIComponentUtils.setLineWrap(label, lineWidth);
return label;
}
}

5
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java

@ -12,6 +12,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.plugin.chart.base.AttrSeriesImageBackground;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.stable.Constants;
@ -91,8 +92,10 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
};
JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(components2, row, col);
UILabel fillImageLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image"));
UIComponentUtils.setLineWrap(fillImageLabel);
Component[][] components3 = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image")),isFillWithImage},
new Component[]{fillImageLabel, UIComponentUtils.wrapWithBorderLayoutPane(isFillWithImage)},
};
JPanel panel3 = TableLayout4VanChartHelper.createGapTableLayoutPane(components3, row, col);

4
designer-chart/src/main/java/com/fr/van/chart/designer/TableLayout4VanChartHelper.java

@ -5,6 +5,7 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -59,9 +60,10 @@ public class TableLayout4VanChartHelper {
double[] rowSize = {p, p};
UILabel label = new UILabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
UIComponentUtils.setLineWrap(label);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{label, component},
new Component[]{label, UIComponentUtils.wrapWithBorderLayoutPane(component)},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
}

7
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java

@ -6,6 +6,8 @@ import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.type.LineStyle;
import com.fr.stable.Constants;
@ -52,7 +54,10 @@ public class VanChartLineTypePane extends BasicPane {
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),lineWidth},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(lineWidth)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Present")),lineStyle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Break")),nullValueBreak},
};

7
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java

@ -13,6 +13,8 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.TrendLineType;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.base.VanChartConstants;
@ -65,7 +67,10 @@ public class VanChartTrendLinePane extends BasicPane{
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Name")), trendLineName},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")), trendLineStyle},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(trendLineStyle)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")), trendLineColor},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Type")), trendLineType},
new Component[]{label, periodPane}

10
designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderPane.java

@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -41,10 +42,15 @@ public class VanChartBorderPane extends BasicPane {
}
protected Component[][] getUseComponent() {
UILabel lineStyleLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style"));
UIComponentUtils.setLineWrap(lineStyleLabel);
UILabel colorLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color"));
UIComponentUtils.setLineWrap(colorLabel);
return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),currentLineCombo},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),currentLineColorPane},
new Component[]{lineStyleLabel, currentLineCombo},
new Component[]{colorLabel, currentLineColorPane},
};
}

7
designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithAlphaPane.java

@ -3,6 +3,8 @@ package com.fr.van.chart.designer.component.border;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.base.AttrBorderWithAlpha;
@ -29,7 +31,10 @@ public class VanChartBorderWithAlphaPane extends VanChartBorderPane{
protected Component[][] getUseComponent() {
return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),currentLineCombo},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(currentLineCombo)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),currentLineColorPane},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha")), transparent}
};

7
designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithRadiusPane.java

@ -4,6 +4,8 @@ import com.fr.chart.base.AttrBorder;
import com.fr.chart.chartglyph.GeneralInfo;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import javax.swing.JSeparator;
@ -28,7 +30,10 @@ public class VanChartBorderWithRadiusPane extends VanChartBorderPane {
protected Component[][] getUseComponent() {
return new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),currentLineCombo},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(currentLineCombo)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),currentLineColorPane},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Radius")),radius}
} ;

Loading…
Cancel
Save