Browse Source

Merge pull request #744 in DESIGN/design from ~PLOUGH/10-design:release/10.0 to release/10.0

* commit '41bf4331b1223a40b589ec332955c9cbe87d5c91':
  REPORT-14057 10.0日文国际化问题处理=>调整代码
  REPORT-14057 10.0日文国际化问题处理=>body绝对布局=>控件坐标显示问题
  REPORT-14057 10.0日文国际化问题处理=>body绝对布局属性面板显示问题
  REPORT-14057 10.0日文国际化问题处理=>69 表单=>label控件属性面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>58 表单=>参数面板,显示不全
  REPORT-14057 10.0日文国际化问题处理=>57 图表=>显示方式,显示不全
  REPORT-14057 10.0日文国际化问题处理=>56 图表=>样式=>背景面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>54 图表=>样式=>坐标轴面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>重构
  REPORT-14057 10.0日文国际化问题处理=>53 图表=>样式=>系列面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>51 图表=>样式面板,按钮显示不全
  REPORT-14057 10.0日文国际化问题处理=>50 图表->数据集面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>48 数据列属性面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>表单body自适应显示不全
  REPORT-14057 10.0日文国际化问题处理=>44 文件数据集面板显示不全
  REPORT-14057 10.0日文国际化问题处理=>列表面板顶部按钮弹出菜单显示不全
  REPORT-14057 10.0日文国际化问题处理=>列表面板顶部工具条显示问题
bugfix/10.0
plough 6 years ago
parent
commit
f4c349a1cf
  1. 5
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  2. 28
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/designer/IntervalConstants.java
  4. 28
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  5. 2
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java
  6. 9
      designer-base/src/main/java/com/fr/design/menu/MenuDef.java
  7. 4
      designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBackgroundPane.java
  8. 34
      designer-base/src/main/java/com/fr/design/utils/gui/UIComponentUtils.java
  9. 38
      designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java
  10. 18
      designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java
  11. 23
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  12. 10
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  13. 19
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  14. 6
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java
  15. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/TableLayout4VanChartHelper.java
  16. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java
  17. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  18. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  19. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderPane.java
  20. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithAlphaPane.java
  21. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithRadiusPane.java
  22. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  23. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  24. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  25. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java
  26. 2
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java
  27. 12
      designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java
  28. 32
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  29. 20
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  30. 24
      designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupDockingPane.java
  31. 22
      designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java
  32. 5
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  33. 5
      designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java
  34. 5
      designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java
  35. 34
      designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java
  36. 8
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

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

@ -24,6 +24,7 @@ import com.fr.design.layout.TableLayoutHelper;
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 com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.Inter;
@ -482,8 +483,8 @@ public class PreferencePane extends BasicPane {
private JPanel createMemoryPane() {
JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Caching_Template"));
UILabel memoryLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Max_Caching_Template"));
UILabel memoryTipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Caching_Template_Tip"));
UIComponentUtils.setLineWrap(memoryTipLabel, MEMORY_TIP_LABEL_MAX_WIDTH);
UILabel memoryTipLabel = FRWidgetFactory.createLineWrapLabel(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Caching_Template_Tip"), MEMORY_TIP_LABEL_MAX_WIDTH);
memoryTipLabel.setBorder(BorderFactory.createEmptyBorder(0, CACHING_GAP, 0, 0));
cachingTemplateSpinner = new UISpinner(0, CACHING_MAX, 1, CACHING_DEFAULT);
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout());

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

@ -32,11 +32,11 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.file.FILE;
import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.ComparatorUtils;
import com.fr.general.data.DataSource;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
@ -45,13 +45,24 @@ import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLReadable;
import com.fr.stable.xml.XMLableReader;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
@ -99,7 +110,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private UIRadioButton commaDismenberRadioButton;// 逗号
private UIRadioButton otherDismenberRadioButton;// 其他
private UITextField otherDismenberTextField;// 其他分隔符编辑
private UICheckBox igoreOneMoreDelimiterCheckBox;// 连续分隔符是否作为单一
private UICheckBox ignoreOneMoreDelimiterCheckBox;// 连续分隔符是否作为单一
private UIComboBox charsetComboBox;
private UILabel encodeLabel;
private UILabel dismenberLabel;
@ -374,7 +385,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
bg2.add(spaceDismenberRadioButton);
bg2.add(commaDismenberRadioButton);
bg2.add(otherDismenberRadioButton);
igoreOneMoreDelimiterCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Series_Dismenber_As_Single"), true);
ignoreOneMoreDelimiterCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Series_Dismenber_As_Single"), true);
UIComponentUtils.setLineWrap(ignoreOneMoreDelimiterCheckBox);
encodeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Encoding_Type") + ":");
charsetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
Component[][] comps = {
@ -384,7 +396,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
{null,spaceDismenberRadioButton,null},
{null,commaDismenberRadioButton,null},
{null,otherDismenberRadioButton,otherDismenberTextField},
{igoreOneMoreDelimiterCheckBox,null,null}
{ignoreOneMoreDelimiterCheckBox,null,null}
};
northPane.add(TableLayoutHelper.createTableLayoutPane(comps, rowSize, columnSize),BorderLayout.EAST);
}
@ -586,7 +598,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
editorPane.populate(ttd.getParams());
needColumnNameCheckBox.setSelected(ttd.needColumnName());
igoreOneMoreDelimiterCheckBox.setSelected(ttd.isIgnoreOneMoreDelimiter());
ignoreOneMoreDelimiterCheckBox.setSelected(ttd.isIgnoreOneMoreDelimiter());
charsetComboBox.setSelectedItem(ttd.getCharset());
}
@ -624,7 +636,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
ttd.setFilePath(filePath);
ttd.setParams(this.params);
ttd.setDelimiter(this.showDelimiter());
ttd.setIgnoreOneMoreDelimiter(igoreOneMoreDelimiterCheckBox.isSelected());
ttd.setIgnoreOneMoreDelimiter(ignoreOneMoreDelimiterCheckBox.isSelected());
ttd.setNeedColumnName(needColumnNameCheckBox.isSelected());
ttd.setCharset((String)charsetComboBox.getSelectedItem());
fileTableData = ttd;

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;
}

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

@ -6,11 +6,11 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.ShortCut;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -23,7 +23,6 @@ import javax.swing.JSplitPane;
import javax.swing.border.EmptyBorder;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
@ -159,14 +158,21 @@ abstract class UIControlPane extends JControlPane {
}
protected JPanel getLeftTopPane(UIToolbar topToolBar) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f, isNewStyle() ? TOP_TOOLBAR_WIDTH : TOP_TOOLBAR_WIDTH_SHORT};
double[] rowSize = {TOP_TOOLBAR_HEIGHT};
Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), new JPanel(), topToolBar},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
UILabel addItemLabel = FRWidgetFactory.createLineWrapLabel(getAddItemText());
topToolBar.setPreferredSize(
new Dimension(
isNewStyle() ? TOP_TOOLBAR_WIDTH : TOP_TOOLBAR_WIDTH_SHORT,
TOP_TOOLBAR_HEIGHT
));
JPanel toolBarPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
toolBarPane.add(topToolBar, BorderLayout.NORTH);
JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
leftTopPane.add(toolBarPane, BorderLayout.EAST);
leftTopPane.add(addItemLabel, BorderLayout.CENTER);
return leftTopPane;
}
/**

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);
}

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

@ -24,6 +24,7 @@ import java.util.List;
public class MenuDef extends ShortCut {
private static final int MENU_DEFAULTWDITH = 156;
private static final int BLANK_WIDTH = 30;
protected String name;
//右侧属性表弹出框重绘
protected Boolean isEastAttr = false;
@ -410,7 +411,7 @@ public class MenuDef extends ShortCut {
popupMenu = new UIPopupEastAttrMenu();
popupMenu.setInvoker(button);
MenuDef.this.updateEastPopupMenu(popupMenu);
popupMenu.setPopupSize(new Dimension(MENU_DEFAULTWDITH, popupMenu.getPreferredSize().height));
updatePopupMenuSize();
GUICoreUtils.showPopupMenu(popupMenu, button, 0, button.getSize().height);
} else {
popupMenu = new UIPopupMenu();
@ -421,6 +422,12 @@ public class MenuDef extends ShortCut {
}
};
private void updatePopupMenuSize() {
int preferredWidth = popupMenu.getPreferredSize().width - BLANK_WIDTH; // 减少行尾的空白部分
int popupMenuWidth = preferredWidth > MENU_DEFAULTWDITH ? preferredWidth : MENU_DEFAULTWDITH;
popupMenu.setPopupSize(new Dimension(popupMenuWidth, popupMenu.getPreferredSize().height));
}
//ben: for ui test
public JPopupMenu getPopupMenu() {

4
designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBackgroundPane.java

@ -6,6 +6,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.background.BackgroundDetailPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.Background;
import javax.swing.BorderFactory;
@ -42,9 +43,8 @@ public class GradientBackgroundPane extends BackgroundDetailPane {
JPanel blankJp = new JPanel();
gradientBar = new GradientBar(4, 254);
blankJp.add(gradientBar);
UILabel jl = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Drag_To_Select_Gradient"));
UILabel jl = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Drag_To_Select_Gradient"));
jl.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));
UIComponentUtils.setLineWrap(jl);
jl.setHorizontalAlignment(SwingConstants.CENTER);
gradientPanel.add(jl, BorderLayout.NORTH);
gradientPanel.add(blankJp, BorderLayout.SOUTH);

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

@ -1,8 +1,15 @@
package com.fr.design.utils.gui;
import com.fr.design.gui.core.UITextComponent;
import com.fr.design.layout.FRGUIPaneFactory;
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;
/**
* 包含 UI 组件相关的工具方法
* Created by plough on 2019/1/11.
@ -48,4 +55,31 @@ public class UIComponentUtils {
}
comp.setText(prefix + comp.getText());
}
/**
* 将一个组件包装到 BorderLayout 布局的面板中
* @param comp待包装的组件
* @param layoutConstraint添加的方向 BorderLayout.NORTH
* @return 包装好的 JPanel
*/
public static JPanel wrapWithBorderLayoutPane(Component comp, String layoutConstraint) {
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.add(comp, layoutConstraint);
return panel;
}
/**
* 将一个组件包装到 BorderLayout 布局的面板中
* @param comp待包装的组件
* @return 包装好的 JPanel布局方向为 BorderLayout.NORTH
*/
public static JPanel wrapWithBorderLayoutPane(Component comp) {
return wrapWithBorderLayoutPane(comp, BorderLayout.NORTH);
}
public static void setPreferedWidth(JComponent comp, int width) {
Dimension dim = comp.getPreferredSize();
dim.setSize(width, dim.getHeight());
comp.setPreferredSize(dim);
}
}

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;
}
}

18
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);
@ -53,18 +53,18 @@ public class WidgetBoundsPaneFactory {
double p = TableLayout.PREFERRED;
Component[][] northComponents = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Position")), createRightPane(x, y)},
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Position")), createRightPane(x, y)},
new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_X_Coordinate"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Y_Coordinate"), SwingConstants.CENTER))},
};
Component[][] centerComponents = 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 northPanel = TableLayoutHelper.createGapTableLayoutPane(northComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6);
final JPanel centerPanel = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6);
final JPanel northPanel = TableLayoutHelper.createGapTableLayoutPane(northComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, IntervalConstants.INTERVAL_L6);
final JPanel centerPanel = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, IntervalConstants.INTERVAL_L6);
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));

23
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java

@ -12,10 +12,12 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
@ -29,19 +31,24 @@ public class DatabaseTableDataPane extends BasicPane{
private Object lastSelectObject;
public DatabaseTableDataPane(UILabel label) {
initComponents(label);
}
private void initComponents(UILabel label) {
initTableCombox();
initReviewButton();
this.setLayout(new BorderLayout(0,0));
if(label != null) {
if (label != null) {
this.add(label, BorderLayout.WEST);
}
JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0));
pane.add(tableNameCombox,BorderLayout.CENTER);
JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0));
pane.add(tableNameCombox,BorderLayout.CENTER);
pane.add(reviewButton,BorderLayout.EAST);
pane.add(reviewButton,BorderLayout.EAST);
this.add(pane,BorderLayout.CENTER);
setBorder ();
this.add(UIComponentUtils.wrapWithBorderLayoutPane(pane),BorderLayout.CENTER);
setBorder();
}
protected void setBorder () {

10
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -13,6 +13,7 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.BorderFactory;
import java.awt.BorderLayout;
@ -21,6 +22,8 @@ import java.awt.Dimension;
public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
private static final long serialVersionUID = 4740461028440155147L;
private static final int TOP = -5;
private static final int TABLE_DATA_LABEL_LINE_WRAP_WIDTH = 65;
private static final int TABLE_DATA_PANE_WIDTH = 246;
private DatabaseTableDataPane tableDataPane;
private AbstractTableDataContentPane dataContentPane;
@ -36,8 +39,9 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
}
private void initDataPane() {
UILabel label = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TableData")) ;
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
UILabel label = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TableData"));
UIComponentUtils.setLineWrap(label, TABLE_DATA_LABEL_LINE_WRAP_WIDTH);
tableDataPane = new DatabaseTableDataPane(label) {
@Override
protected void userEvent() {
@ -46,7 +50,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
}
};
tableDataPane.setPreferredSize(new Dimension(246 , 20));
tableDataPane.setPreferredSize(new Dimension(TABLE_DATA_PANE_WIDTH , tableDataPane.getPreferredSize().height));
this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0));
this.add(tableDataPane, BorderLayout.NORTH);
}

19
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java

@ -8,9 +8,16 @@ import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.border.Border;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
@ -18,6 +25,7 @@ import java.util.List;
public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = 2298609199400393886L;
private static final int MIN_TAB_HEIGHT = 25;
protected UIButtonGroup tabPane;
protected String[] nameArray;
public JPanel centerPane;
@ -49,7 +57,12 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
if (!paneList.isEmpty()) {
tabPane = new UIButtonGroup(nameArray);
tabPane.setSelectedIndex(0);
tabPane.setPreferredSize(new Dimension(60 * nameArray.length, 25));
int prefHeight = tabPane.getPreferredSize().height;
int prefWidth = tabPane.getPreferredSize().width + 20; // 暂且加一个偏移量
int minWidth = 60 * nameArray.length;
tabPane.setPreferredSize(
new Dimension(prefWidth > minWidth ? prefWidth : minWidth,
prefHeight > MIN_TAB_HEIGHT ? prefHeight : MIN_TAB_HEIGHT));
tabPane.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

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

@ -11,7 +11,8 @@ import com.fr.design.layout.TableLayout;
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.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.AttrSeriesImageBackground;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.stable.Constants;
@ -91,8 +92,9 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
};
JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(components2, row, col);
UILabel fillImageLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image"));
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);

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

@ -5,6 +5,8 @@ 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 com.fr.design.widget.FRWidgetFactory;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -57,11 +59,11 @@ public class TableLayout4VanChartHelper {
double f = TableLayout.FILL;
double[] columnSize = {f, componentWidth};
double[] rowSize = {p, p};
UILabel label = new UILabel(title);
UILabel label = FRWidgetFactory.createLineWrapLabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
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);
}

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java

@ -14,6 +14,7 @@ import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.plugin.chart.base.VanChartHtmlLabel;
import com.fr.van.chart.designer.style.VanChartStylePane;
@ -56,6 +57,7 @@ public class VanChartHtmlLabelPane extends JPanel{
public VanChartHtmlLabelPane() {
useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html"));
UIComponentUtils.setLineWrap(useHtml);
JPanel widthAndHeightPane = createWidthAndHeightPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;

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

@ -8,7 +8,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.style.color.ColorSelectBox;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -41,10 +42,13 @@ public class VanChartBorderPane extends BasicPane {
}
protected Component[][] getUseComponent() {
UILabel lineStyleLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style"));
UILabel colorLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color"));
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, UIComponentUtils.wrapWithBorderLayoutPane(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}
} ;

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -14,6 +14,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.plugin.chart.attr.VanChartLegend;
import com.fr.stable.Constants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -165,6 +166,7 @@ public class VanChartPlotLegendPane extends BasicPane {
location.setAllToolTips(textArray);
customFloatPositionButton = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Float_Position"));
UIComponentUtils.setLineWrap(customFloatPositionButton);
customFloatPositionButton.setEventBannded(true);
Component[][] components = new Component[][]{

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -17,6 +17,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.plugin.chart.attr.VanChartTitle;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.Constants;
@ -129,6 +130,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
private JPanel createTitleContentPane(double[] row, double[] col){
titleContent = new TinyFormulaPane();
useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html"));
UIComponentUtils.setLineWrap(useHtml);
Component[][] components = new Component[][]{
new Component[]{null ,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"), SwingConstants.LEFT), titleContent},
@ -146,6 +148,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
alignmentPane = new UIButtonGroup<Integer>(alignmentIconArray, alignment);
customFloatPositionButton = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Float_Position"));
UIComponentUtils.setLineWrap(customFloatPositionButton);
customFloatPositionButton.setEventBannded(true);
Component[][] components = new Component[][]{

19
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -20,7 +20,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
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.attr.axis.VanChartAxis;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.type.AxisTickLineType;
@ -123,6 +124,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
titleAlignPane.setSelectedItem(Constants.CENTER);
titleContent = new TinyFormulaPane();
titleUseHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html"));
UIComponentUtils.setLineWrap(titleUseHtml);
titleTextAttrPane = new ChartTextAttrPane();
titleTextRotation = new UINumberDragPane(-ROTATION_MAX,ROTATION_MAX);
if(isXAxis){
@ -136,7 +138,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
new Component[]{null,titleUseHtml},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")),titleAlignPane},
new Component[]{titleTextAttrPane,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")),titleTextRotation},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")),
UIComponentUtils.wrapWithBorderLayoutPane(titleTextRotation)
},
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
@ -168,7 +173,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
labelGapStyle = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Automatic"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Fixed")});
labelGapValue = new UITextField();
Component[][] gapComponents = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")), labelTextRotation},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")),
UIComponentUtils.wrapWithBorderLayoutPane(labelTextRotation)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Label_Interval")), labelGapStyle},
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col);
@ -250,7 +258,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
reversed = new UIButtonGroup<Boolean>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Position")),position},
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Position")),
UIComponentUtils.wrapWithBorderLayoutPane(position)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AxisReversed")),reversed},
} ;

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java

@ -9,6 +9,8 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -149,7 +151,7 @@ public class VanChartPlotTooltipPane extends BasicPane {
double[] rowSize = { p,p,p};
Component[][] components = new Component[3][2];
components[0] = new Component[]{null,null};
components[1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Prompt_Box")),followMouse};
components[1] = new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Prompt_Box")), UIComponentUtils.wrapWithBorderLayoutPane(followMouse)};
if(plot.isSupportTooltipSeriesType() && hasTooltipSeriesType()){
components[2] = new Component[]{showAllSeries,null};

2
designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

@ -22,6 +22,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.Background;
@ -104,6 +105,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
labelNameTextField = new UITextField();
displayReport = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Display_Nothing_Before_Query"));
UIComponentUtils.setLineWrap(displayReport);
useParamsTemplate = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Use_Params_Template"));
background = new AccessibleBackgroundEditor();
Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),

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);

32
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -5,27 +5,25 @@ import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.properties.items.FRLayoutTypeItems;
import com.fr.design.designer.properties.items.Item;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor;
import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.ui.designer.component.WidgetBoundPane;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.WAbsoluteBodyLayout;
import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WBodyLayoutType;
import com.fr.log.FineLoggerFactory;
import com.fr.report.core.ReportUtils;
import javax.swing.BorderFactory;
@ -33,14 +31,12 @@ import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Arrays;
import java.util.Comparator;
/**
* Created by ibm on 2017/8/2.
*/
public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
private static final int EACH_ROW_COUNT = 4;
private static final int MAX_LABEL_WIDTH = 80;
private AccessibleWLayoutBorderStyleEditor borderStyleEditor;
private AccessibleBodyWatermarkEditor watermarkEditor;
@ -77,10 +73,22 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
public JPanel createThirdPane() {
initLayoutComboBox();
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout_Type")), layoutCombox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Scaling_Mode")), comboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = {p};
double[] colSize = {MAX_LABEL_WIDTH, f};
UILabel layoutTypeLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout_Type"));
JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(
new Component[][]{
new Component[]{layoutTypeLabel, UIComponentUtils.wrapWithBorderLayoutPane(layoutCombox)}},
rowSize, colSize, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
UILabel scaleModeLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Scaling_Mode"));
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(
new Component[][]{
new Component[]{scaleModeLabel, UIComponentUtils.wrapWithBorderLayoutPane(comboBox)}},
rowSize, colSize, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
jPanel.add(northPane, BorderLayout.NORTH);
jPanel.add(centerPane, BorderLayout.CENTER);
centerPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, 0, 0));

20
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -24,9 +24,10 @@ import com.fr.design.mainframe.FormSelectionUtils;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor;
import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.design.widget.ui.designer.component.PaddingBoundPane;
import com.fr.form.main.Form;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteBodyLayout;
@ -35,7 +36,6 @@ import com.fr.form.ui.container.WBodyLayoutType;
import com.fr.form.ui.container.WFitLayout;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.report.core.ReportUtils;
import javax.swing.BorderFactory;
@ -49,6 +49,7 @@ import java.awt.Dimension;
* Created by ibm on 2017/8/2.
*/
public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
private static final int ADAPT_LABEL_MAX_WIDTH = 80;
private XWFitLayout xWFitLayout;
private WFitLayout wFitLayout;
private UIComboBox layoutComboBox;
@ -95,19 +96,28 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
layoutComboBox = initUIComboBox(FRLayoutTypeItems.ITEMS);
adaptComboBox = initUIComboBox(FRFitConstraintsItems.ITEMS);
JPanel adaptComboBoxPane = UIComponentUtils.wrapWithBorderLayoutPane(adaptComboBox);
componentIntervel = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
JPanel componentIntervelPane = UIComponentUtils.wrapWithBorderLayoutPane(componentIntervel);
UILabel adaptLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Component_Scale"));
UILabel intervalLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Component_Interval"));
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p};
double[] columnSize = {p, f};
double adaptLabelColumnWidth = adaptLabel.getPreferredSize().width > ADAPT_LABEL_MAX_WIDTH ? ADAPT_LABEL_MAX_WIDTH : p;
double[] columnSize = {adaptLabelColumnWidth, f};
int[][] rowCount = {{1, 1}, {1, 1}};
JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout_Type")), layoutComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
northPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0));
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Component_Scale")), adaptComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Component_Interval")), componentIntervel}
new Component[]{adaptLabel, adaptComboBoxPane},
new Component[]{intervalLabel, componentIntervelPane}
};
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
centerPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, 0, 0));

24
designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupDockingPane.java

@ -8,14 +8,22 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.CellExpandAttr;
import com.fr.report.cell.cellattr.core.group.*;
import com.fr.report.cell.cellattr.core.group.CustomGrouper;
import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.report.cell.cellattr.core.group.FunctionGrouper;
import com.fr.report.cell.cellattr.core.group.RecordGrouper;
import com.fr.report.cell.cellattr.core.group.SummaryGrouper;
import com.fr.stable.Constants;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@ -30,6 +38,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
private static final int BIND_GROUP = 0;
private static final int BIND_SELECTED = 1;
private static final int BIND_SUMMARY = 2;
private static final int DATA_SET_LABEL_WIDTH = 60;
private UIButton advancedButton;
private FunctionComboBox functionComboBox;
@ -56,11 +65,10 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
private JPanel layoutPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
UILabel dataSetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Setting"));
dataSetLabel.setPreferredSize(new Dimension(60, 20));
UILabel dataSetLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Setting"));
Component[][] components = new Component[][]
{
new Component[]{dataSetLabel, goBox},
new Component[]{dataSetLabel, UIComponentUtils.wrapWithBorderLayoutPane(goBox)},
new Component[]{null, cardPane}
};
goBox.addItemListener(new ItemListener() {
@ -85,7 +93,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
}
});
double[] columnSize = {p, f};
double[] columnSize = {DATA_SET_LABEL_WIDTH, f};
double[] rowSize = {p, p};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 8, 10);
}

22
designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java

@ -18,7 +18,8 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.data.TableDataColumn;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.TemplateCellElement;
@ -193,19 +194,18 @@ public class SelectedDataColumnPane extends BasicPane {
columnNameComboBox.setEditable(true);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
UILabel dsLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_TableData"));
UILabel dpLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Dynamic_Parameter"));
UILabel dcLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Data_Column"));
dsLabel.setPreferredSize(new Dimension(60, 20));
dpLabel.setPreferredSize(new Dimension(60, 20));
dcLabel.setPreferredSize(new Dimension(60, 20));
UILabel dsLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_TableData"));
UILabel dpLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Dynamic_Parameter"));
UILabel dcLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Data_Column"));
double[] rowSize = new double[]{p, p, p};
double[] colSize = new double[]{60, f};
Component[][] components = {
{dsLabel, tableNameComboBox},
{dpLabel, paramButton},
{dcLabel, columnNameComboBox}
{dsLabel, UIComponentUtils.wrapWithBorderLayoutPane(tableNameComboBox)},
{dpLabel, UIComponentUtils.wrapWithBorderLayoutPane(paramButton)},
{dcLabel, UIComponentUtils.wrapWithBorderLayoutPane(columnNameComboBox)}
};
this.setLayout(new BorderLayout());
this.add(TableLayoutHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f}, 8, 10));
this.add(TableLayoutHelper.createGapTableLayoutPane(components, rowSize, colSize, 8, 10));
}

5
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -17,7 +17,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
@ -200,8 +200,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
fileNamePane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
UILabel showContentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Content"), SwingConstants.LEFT);
UILabel toolTipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_CellWrite_ToolTip"));
UIComponentUtils.setLineWrap(toolTipLabel);
UILabel toolTipLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_CellWrite_ToolTip"));
JPanel toolTipTextFieldWrapper = new JPanel(new BorderLayout());
toolTipTextFieldWrapper.add(tooltipTextField, BorderLayout.NORTH);

5
designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java

@ -6,7 +6,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.file.FILE;
import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter;
@ -46,8 +46,7 @@ public class WebCssPane extends BasicPane {
northPane.add(localText, FlowLayout.CENTER);
northPane.add(chooseFile, FlowLayout.RIGHT);
outnorth.add(northPane,BorderLayout.NORTH);
UILabel infor = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_CSS_Warning"));
UIComponentUtils.setLineWrap(infor);
UILabel infor = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_CSS_Warning"));
infor.setForeground(new Color(207, 42, 39));
outnorth.add(infor,BorderLayout.CENTER);
this.add(outnorth, BorderLayout.NORTH);

5
designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java

@ -8,7 +8,7 @@ import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.file.FILE;
import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter;
@ -96,8 +96,7 @@ public class WebJsPane extends BasicPane {
northPane.add(localText);
northPane.add(chooseFile);
firstnorth.add(northPane,BorderLayout.NORTH);
infor1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JS_WARNING1"));
UIComponentUtils.setLineWrap(infor1);
infor1 = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JS_WARNING1"));
infor1.setForeground(new Color(207, 42, 39));
firstnorth.add(infor1,BorderLayout.CENTER);

34
designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

@ -16,7 +16,8 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.menu.ShortCut;
import com.fr.design.selection.QuickEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.cellquick.layout.CellElementBarLayout;
import com.fr.report.cell.TemplateCellElement;
@ -46,19 +47,9 @@ import java.util.ArrayList;
*/
public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
/**
* 面板配置
*/
protected UITextField columnRowTextField;
protected TemplateCellElement cellElement;
/**
* 占位label
*/
protected final Dimension LABEL_DIMENSION = new Dimension(60, 20);
protected final UILabel EMPTY_LABEL = new UILabel();
protected static final Dimension LABEL_DIMENSION = new Dimension(60, 20);
protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 3;
private static final int INSERT_CONTENT_LABEL_WIDTH = 60;
/**
* 滚动条相关配置
@ -70,6 +61,15 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
private int maxHeight = 280;
private static final int TITLE_HEIGHT = 50;
/**
* 面板配置
*/
protected UITextField columnRowTextField;
protected TemplateCellElement cellElement;
// 占位label
protected final UILabel EMPTY_LABEL = new UILabel();
private UIComboBox comboBox;
private UpdateAction[] cellInsertActions;
private int selectedIndex;
@ -207,16 +207,14 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
private JPanel initTopContent() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] columnSize = {INSERT_CONTENT_LABEL_WIDTH, f};
double[] rowSize = {p, p};
UILabel cellLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell"));
cellLabel.setPreferredSize(LABEL_DIMENSION);
UILabel insertContentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Insert_Cell_Element"));
insertContentLabel.setPreferredSize(LABEL_DIMENSION);
UILabel insertContentLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Insert_Cell_Element"));
initCellElementEditComboBox();
Component[][] components = new Component[][]{
new Component[]{cellLabel, columnRowTextField = initColumnRowTextField()},
new Component[]{insertContentLabel, comboBox},
new Component[]{insertContentLabel, UIComponentUtils.wrapWithBorderLayoutPane(comboBox)},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP);
}

8
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -26,8 +26,9 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.cell.AbstractDSCellEditorPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.IOUtils;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.TemplateCellElement;
@ -251,8 +252,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
groupPane.setListener(groupListener);
double[] rowSize = {P}, columnSize = {P, F};
UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
uiLabel.setPreferredSize(LABEL_DIMENSION);
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
condition = new DSColumnConditionAction();
if (tc != null) {
condition.setEditingComponent(tc);
@ -262,7 +262,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
condition.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
conditionUIButton = new UIButton(condition);
Component[][] components = new Component[][]{
new Component[]{uiLabel, conditionUIButton}
new Component[]{uiLabel, UIComponentUtils.wrapWithBorderLayoutPane(conditionUIButton)}
};
conditionPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP);
this.createScrollPane();

Loading…
Cancel
Save