Browse Source

Merge remote-tracking branch 'origin/bugfix/10.0' into bugfix/10.0

bugfix/10.0
Yvan 4 years ago
parent
commit
23ca1e533f
  1. 4
      designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java
  2. 36
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  3. 9
      designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java
  4. 3
      designer-base/src/main/java/com/fr/design/preview/FormPreview.java
  5. 14
      designer-base/src/main/java/com/fr/design/report/WatermarkPane.java
  6. 5
      designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java
  7. 54
      designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java
  8. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartSwingUtils.java
  9. 7
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java
  10. 16
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java
  11. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java
  12. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugePlotLabelPane.java
  13. 20
      designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java
  14. 24
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java
  15. 2
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/series/VanChartMapAnchorMarkerPane.java
  16. 11
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java
  17. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java
  18. 7
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  19. 12
      designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java

4
designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java

@ -99,6 +99,10 @@ public class FormulaEditor extends Editor<BaseFormula> {
return formula; return formula;
} }
public UITextField getUITextField() {
return currentTextField;
}
/** /**
* Return the value of the CellEditor. * Return the value of the CellEditor.
*/ */

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

@ -18,6 +18,7 @@ import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginRuntime; import com.fr.plugin.context.PluginRuntime;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
@ -100,14 +101,29 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
REPORT, // 报表 REPORT, // 报表
REPORT_PARA, // 报表参数面板 REPORT_PARA, // 报表参数面板
REPORT_FLOAT, // 报表悬浮元素 REPORT_FLOAT, // 报表悬浮元素
FORM, // 表单 FORM(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings")), // 表单
FORM_REPORT, // 表单报表块 FORM_REPORT, // 表单报表块
POLY, // 聚合报表 POLY, // 聚合报表
POLY_REPORT, // 聚合报表-报表块 POLY_REPORT, // 聚合报表-报表块
POLY_CHART, // 聚合报表-图表块 POLY_CHART(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings")), // 聚合报表-图表块
AUTHORITY_EDITION, // 权限编辑 AUTHORITY_EDITION, // 权限编辑
AUTHORITY_EDITION_DISABLED // 权限编辑 AUTHORITY_EDITION_DISABLED; // 权限编辑
private String title;
PropertyMode() {
this.title = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Settings");
}
PropertyMode(String title) {
this.title = title;
}
public String getTitle() {
return this.title;
}
} }
private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板) private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板)
@ -400,6 +416,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private void updatePropertyItemMap() { private void updatePropertyItemMap() {
for (PropertyItem item : propertyItemMap.values()) { for (PropertyItem item : propertyItemMap.values()) {
item.updateStatus(); item.updateStatus();
item.updateTitle();
} }
} }
@ -734,6 +751,19 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
public void updateTitle() {
try {
if (StringUtils.equals(KEY_WIDGET_SETTINGS, name)) {
title = currentMode.getTitle();
button.setToolTipText(title);
UILabel uiLabel = (UILabel) ((BorderLayout) popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.WEST);
uiLabel.setText(title);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
}
public void reAddContentArea() { public void reAddContentArea() {
propertyPanel.add(contentArea, BorderLayout.CENTER); propertyPanel.add(contentArea, BorderLayout.CENTER);
} }

9
designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java

@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -56,20 +57,24 @@ public class BasicPropertyPane extends BasicPane {
} }
} }
}; };
widgetName.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic")); widgetName.setGlobalName(Toolkit.i18nText("Fine-Design_Report_Basic"));
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rowSize = {p}; double[] rowSize = {p};
double[] columnSize = {p, f}; double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}}; int[][] rowCount = {{1, 1}};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Name")), widgetName}, new Component[]{new UILabel(obtainBasicName()), widgetName},
}; };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.add(panel, BorderLayout.NORTH); this.add(panel, BorderLayout.NORTH);
} }
public String obtainBasicName(){
return Toolkit.i18nText("Fine-Design_Basic_Component_Name");
}
public UITextField getWidgetNameField() { public UITextField getWidgetNameField() {
return widgetName; return widgetName;
} }

3
designer-base/src/main/java/com/fr/design/preview/FormPreview.java

@ -1,6 +1,7 @@
package com.fr.design.preview; package com.fr.design.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider; import com.fr.design.fun.impl.AbstractPreviewProvider;
import com.fr.design.i18n.Toolkit;
/** /**
@ -12,7 +13,7 @@ public class FormPreview extends AbstractPreviewProvider {
@Override @Override
public String nameForPopupItem() { public String nameForPopupItem() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Form_Preview"); return Toolkit.i18nText("Fine-Design_Form_M_PC_Preview");
} }
@Override @Override

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

@ -1,14 +1,16 @@
package com.fr.design.report; package com.fr.design.report;
import com.fr.base.BaseFormula;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.UnsignedIntUISpinner; import com.fr.design.gui.ispinner.UnsignedIntUISpinner;
import com.fr.design.gui.style.FRFontPane; import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -50,7 +52,7 @@ public class WatermarkPane extends BasicPane {
// 水印预览面板 // 水印预览面板
private WatermarkPreviewPane watermarkPreviewPane; private WatermarkPreviewPane watermarkPreviewPane;
// 文字 // 文字
private TinyFormulaPane formulaPane; private FormulaEditor formulaPane;
// 字号 // 字号
private UIComboBox fontSizeComboBox; private UIComboBox fontSizeComboBox;
//横向间距 //横向间距
@ -119,16 +121,16 @@ public class WatermarkPane extends BasicPane {
return watermark; return watermark;
} }
public TinyFormulaPane getFormulaPane() { public FormulaEditor getFormulaPane() {
return formulaPane; return formulaPane;
} }
public void setFormulaPane(TinyFormulaPane formulaPane) { public void setFormulaPane(FormulaEditor formulaPane) {
this.formulaPane = formulaPane; this.formulaPane = formulaPane;
} }
protected UIScrollPane initRightPane() { protected UIScrollPane initRightPane() {
formulaPane = new TinyFormulaPane(); formulaPane = new FormulaEditor(Toolkit.i18nText("Fine-Design_Report_Parameter_Formula"));
fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES); fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
fontSizeComboBox.setEditable(true); fontSizeComboBox.setEditable(true);
horizontalGapSpinner = new UnsignedIntUISpinner(100, Integer.MAX_VALUE, 1, 200); horizontalGapSpinner = new UnsignedIntUISpinner(100, Integer.MAX_VALUE, 1, 200);
@ -228,7 +230,7 @@ public class WatermarkPane extends BasicPane {
} }
private void populateFourmula(String formula) { private void populateFourmula(String formula) {
this.formulaPane.populateBean(formula); this.formulaPane.setValue(BaseFormula.createFormulaBuilder().build(formula));
this.formulaPane.getUITextField().getDocument() this.formulaPane.getUITextField().getDocument()
.addDocumentListener(new DocumentListener() { .addDocumentListener(new DocumentListener() {
@Override @Override

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

@ -4,6 +4,7 @@ import com.fr.design.actions.JTemplateAction;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
@ -26,7 +27,7 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Template"); return Toolkit.i18nText("Fine-Designer_PC_Fit_Attr");
} }
@Override @Override
@ -42,7 +43,7 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Elementcase"); return Toolkit.i18nText("Fine-Designer_PC_Element_Case_Fit_Attr");
} }
@Override @Override

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

@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -18,6 +19,30 @@ import java.awt.Component;
* Created by plough on 2017/8/7. * Created by plough on 2017/8/7.
*/ */
public class WidgetBoundsPaneFactory { public class WidgetBoundsPaneFactory {
public enum NameAttribute {
//默认的名称
DEFAULT(Toolkit.i18nText("Fine-Design_Basic_Component_Position"), Toolkit.i18nText("Fine-Design_Basic_Component_Size")),
//控件对应的名称
WIDGET(Toolkit.i18nText("Fine-Design_Basic_Widget_Position"), Toolkit.i18nText("Fine-Design_Basic_Widget_Size"));
private String positionName;
private String sizeName;
NameAttribute(String positionName, String sizeName) {
this.positionName = positionName;
this.sizeName = sizeName;
}
public String getPositionName() {
return positionName;
}
public String getSizeName() {
return sizeName;
}
}
private static final int RIGHT_PANE_WIDTH = 145; private static final int RIGHT_PANE_WIDTH = 145;
public static UIExpandablePane createBoundsPane(UISpinner width, UISpinner height) { public static UIExpandablePane createBoundsPane(UISpinner width, UISpinner height) {
@ -25,8 +50,8 @@ public class WidgetBoundsPaneFactory {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)}, new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_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))}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
}; };
double[] rowSize = {p, p}; double[] rowSize = {p, p};
double[] columnSize = {f, RIGHT_PANE_WIDTH}; double[] columnSize = {f, RIGHT_PANE_WIDTH};
@ -34,9 +59,10 @@ public class WidgetBoundsPaneFactory {
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, 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)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
boundsPane.add(panel); boundsPane.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);
} }
public static JPanel createRightPane(Component com1, Component com2){
public static JPanel createRightPane(Component com1, Component com2) {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rowSize = {p}; double[] rowSize = {p};
@ -48,17 +74,17 @@ public class WidgetBoundsPaneFactory {
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L1); return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L1);
} }
public static UIExpandablePane createAbsoluteBoundsPane(UISpinner x, UISpinner y, UISpinner width, UISpinner height) { public static UIExpandablePane createAbsoluteBoundsPane(UISpinner x, UISpinner y, UISpinner width, UISpinner height, NameAttribute nameAttribute) {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
Component[][] northComponents = new Component[][]{ Component[][] northComponents = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Position")), createRightPane(x, y)}, new Component[]{FRWidgetFactory.createLineWrapLabel(nameAttribute.getPositionName()), 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))}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_X_Coordinate"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Y_Coordinate"), SwingConstants.CENTER))},
}; };
Component[][] centerComponents = new Component[][]{ Component[][] centerComponents = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)}, new Component[]{FRWidgetFactory.createLineWrapLabel(nameAttribute.getSizeName()), 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))}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
}; };
double[] rowSize = {p, p}; double[] rowSize = {p, p};
double[] columnSize = {f, RIGHT_PANE_WIDTH}; double[] columnSize = {f, RIGHT_PANE_WIDTH};
@ -70,7 +96,11 @@ public class WidgetBoundsPaneFactory {
centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
boundsPane.add(northPanel, BorderLayout.NORTH); boundsPane.add(northPanel, BorderLayout.NORTH);
boundsPane.add(centerPanel, BorderLayout.CENTER); boundsPane.add(centerPanel, BorderLayout.CENTER);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 230, 24, boundsPane); return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 230, 24, boundsPane);
}
public static UIExpandablePane createAbsoluteBoundsPane(UISpinner x, UISpinner y, UISpinner width, UISpinner height) {
return createAbsoluteBoundsPane(x, y, width, height, NameAttribute.DEFAULT);
} }
@ -79,7 +109,7 @@ public class WidgetBoundsPaneFactory {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width},
}; };
double[] rowSize = {p}; double[] rowSize = {p};
double[] columnSize = {p, f}; double[] columnSize = {p, f};
@ -87,6 +117,6 @@ public class WidgetBoundsPaneFactory {
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_W1, IntervalConstants.INTERVAL_L6);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
boundsPane.add(panel); boundsPane.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);
} }
} }

2
designer-chart/src/main/java/com/fr/design/chart/ChartSwingUtils.java

@ -31,7 +31,7 @@ public class ChartSwingUtils {
}); });
textField.addKeyListener(new KeyAdapter() { textField.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {
if(box.isSelected()) { if(box.isSelected() && !e.isControlDown()) {
e.consume(); e.consume();
showFormulaPane(textField, null); showFormulaPane(textField, null);
} }

7
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java

@ -6,6 +6,7 @@ import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -19,6 +20,12 @@ public class VanChartCustomDataPane extends ChartDataPane {
super(listener); super(listener);
} }
protected void initContentPane() {
leftContentPane = createContentPane();
leftContentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original));
this.add(leftContentPane, BorderLayout.CENTER);
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout()); JPanel content = new JPanel(new BorderLayout());

16
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java

@ -12,11 +12,13 @@ import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.van.chart.custom.component.VanChartCustomPlotTabPane; import com.fr.van.chart.custom.component.VanChartCustomPlotTabPane;
import com.fr.van.chart.custom.component.VanChartDataPane; import com.fr.van.chart.custom.component.VanChartDataPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.awt.BorderLayout;
/** /**
* Created by Fangjie on 2016/4/29. * Created by Fangjie on 2016/4/29.
@ -37,6 +39,20 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
this.supportCellData = supportCellData; this.supportCellData = supportCellData;
} }
@Override
protected void initLayout() {
JPanel tabPanel = new JPanel(new BorderLayout());
if (NameArray.length > 1) {
tabPanel.setBorder(BorderFactory.createMatteBorder(10, 0, 0, 0, getBackground()));
} else {
tabPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, getBackground()));
}
tabPanel.add(tabPane, BorderLayout.CENTER);
this.setLayout(new BorderLayout(0, 0));
this.add(tabPanel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
@Override @Override
protected void initTabTitle() { protected void initTabTitle() {

19
designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java

@ -166,6 +166,12 @@ public class PlotFactory {
tooltipContentMap.put(VanChartStructurePlot.class, VanChartStructureTooltipContentPane.class); tooltipContentMap.put(VanChartStructurePlot.class, VanChartStructureTooltipContentPane.class);
} }
private static Map<Class<? extends Plot>, Class<? extends VanChartPlotLabelPane>> labelMap = new HashMap<>();
static {
labelMap.put(PiePlot4VanChart.class, VanChartPiePlotLabelPane.class);
labelMap.put(VanChartGaugePlot.class, VanChartGaugePlotLabelPane.class);
}
/** /**
* 监控刷新 自动数据点提示Map * 监控刷新 自动数据点提示Map
@ -208,10 +214,15 @@ public class PlotFactory {
} }
public static VanChartPlotLabelPane createPlotLabelPane(Plot plot, VanChartStylePane stylePane, boolean inCondition) { public static VanChartPlotLabelPane createPlotLabelPane(Plot plot, VanChartStylePane stylePane, boolean inCondition) {
if (plot instanceof VanChartGaugePlot) { Class<? extends Plot> key = plot.getClass();
return new VanChartGaugePlotLabelPane(plot, stylePane); if (labelMap.containsKey(key)) {
} else if (plot instanceof PiePlot4VanChart) { try {
return new VanChartPiePlotLabelPane(plot, stylePane, inCondition); Class<? extends VanChartPlotLabelPane> cl = labelMap.get(key);
Constructor<? extends VanChartPlotLabelPane> constructor = cl.getConstructor(Plot.class, VanChartStylePane.class, boolean.class);
return constructor.newInstance(plot, stylePane, inCondition);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} }
return new VanChartPlotLabelPane(plot, stylePane, inCondition); return new VanChartPlotLabelPane(plot, stylePane, inCondition);
} }

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugePlotLabelPane.java

@ -25,8 +25,8 @@ public class VanChartGaugePlotLabelPane extends VanChartPlotLabelPane {
private VanChartPlotLabelDetailPane gaugeValueLabelPane; private VanChartPlotLabelDetailPane gaugeValueLabelPane;
public VanChartGaugePlotLabelPane(Plot plot, VanChartStylePane parent) { public VanChartGaugePlotLabelPane(Plot plot, VanChartStylePane parent, boolean inCondition) {
super(plot, parent); super(plot, parent, inCondition);
} }
protected void createLabelPane() { protected void createLabelPane() {

20
designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java

@ -17,6 +17,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.base.AttrBorderWithAlpha; import com.fr.plugin.chart.base.AttrBorderWithAlpha;
import com.fr.plugin.chart.base.AttrEffect; import com.fr.plugin.chart.base.AttrEffect;
@ -30,6 +31,7 @@ import com.fr.plugin.chart.map.line.condition.AttrCurve;
import com.fr.plugin.chart.map.line.condition.AttrLineEffect; import com.fr.plugin.chart.map.line.condition.AttrLineEffect;
import com.fr.plugin.chart.type.MapMarkerType; import com.fr.plugin.chart.type.MapMarkerType;
import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.MapType;
import com.fr.stable.StringUtils;
import com.fr.van.chart.bubble.component.VanChartBubblePane; import com.fr.van.chart.bubble.component.VanChartBubblePane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.border.VanChartBorderWithAlphaPane; import com.fr.van.chart.designer.component.border.VanChartBorderWithAlphaPane;
@ -173,18 +175,29 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
} }
private void checkPointCompsEnabledWithLarge(Plot plot) { private void checkPointCompsEnabledWithLarge(Plot plot) {
boolean largeModel = largeModel(plot); checkPointEffectPane(plot);
if (pointEffectPane != null) {
GUICoreUtils.setEnabled(pointEffectPane, !largeModel); if (markerTypeCom == null) {
return;
} }
VanChartMapPlot mapPlot = (VanChartMapPlot) plot; VanChartMapPlot mapPlot = (VanChartMapPlot) plot;
boolean largeModel = largeModel(plot);
refreshMarkerComboboxModel(mapPlot); refreshMarkerComboboxModel(mapPlot);
if (largeModel) { if (largeModel) {
checkLargeModelPlotSelectedItem(mapPlot); checkLargeModelPlotSelectedItem(mapPlot);
} }
} }
private void checkPointEffectPane(Plot plot) {
if (pointEffectPane != null) {
boolean largeModel = largeModel(plot);
boolean imageMark = markerTypeCom == null ? false :
StringUtils.equals(MapMarkerType.IMAGE.toLocalString(), GeneralUtils.objectToString(markerTypeCom.getSelectedItem()));
GUICoreUtils.setEnabled(pointEffectPane, !largeModel && !imageMark);
}
}
private void checkLineCompsEnabledWithLarge(Plot plot) { private void checkLineCompsEnabledWithLarge(Plot plot) {
if (lineMapEffectPane != null) { if (lineMapEffectPane != null) {
//大数据模式 恢复用注释。下面1行删除。 //大数据模式 恢复用注释。下面1行删除。
@ -479,6 +492,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
markerTypeLayout.show(markerContentPane, (String) markerTypeCom.getSelectedItem()); markerTypeLayout.show(markerContentPane, (String) markerTypeCom.getSelectedItem());
checkPointEffectPane(plot);
} }
}); });

24
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java

@ -39,18 +39,14 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
if (mapPlot == null) { if (mapPlot == null) {
return contentPane; return contentPane;
} }
switch (mapPlot.getAllLayersMapType()){ switch (mapPlot.getAllLayersMapType()) {
case POINT: case POINT:
pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent); pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent);
contentPane.add(pointLabelPane, BorderLayout.NORTH); contentPane.add(pointLabelPane, BorderLayout.NORTH);
break; break;
case CUSTOM: case CUSTOM:
areaLabelPane = createAreaMapPlotLabelPane();
pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent);
contentPane.add(new VanMapAreaAndPointGroupPane(areaLabelPane, pointLabelPane), BorderLayout.NORTH);
break;
case DRILL_CUSTOM: case DRILL_CUSTOM:
areaLabelPane = new VanChartPlotLabelPane(mapPlot, parent); areaLabelPane = createAreaMapPlotLabelPane();
pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent); pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent);
contentPane.add(new VanMapAreaAndPointGroupPane(areaLabelPane, pointLabelPane), BorderLayout.NORTH); contentPane.add(new VanMapAreaAndPointGroupPane(areaLabelPane, pointLabelPane), BorderLayout.NORTH);
break; break;
@ -64,7 +60,7 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
} }
private VanChartPlotLabelPane createAreaMapPlotLabelPane() { private VanChartPlotLabelPane createAreaMapPlotLabelPane() {
return new VanChartPlotLabelPane(mapPlot, parent){ return new VanChartPlotLabelPane(mapPlot, parent) {
@Override @Override
protected boolean checkEnabled4Large() { protected boolean checkEnabled4Large() {
return false; return false;
@ -75,7 +71,7 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
@Override @Override
public void populateBean(Chart chart) { public void populateBean(Chart chart) {
Plot plot = chart.getPlot(); Plot plot = chart.getPlot();
if(plot instanceof VanChartMapPlot){ if (plot instanceof VanChartMapPlot) {
mapPlot = (VanChartMapPlot) plot; mapPlot = (VanChartMapPlot) plot;
} }
@ -85,11 +81,11 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
parent.initAllListeners(); parent.initAllListeners();
} }
AttrMapLabel attrMapLabel = (AttrMapLabel)plot.getConditionCollection().getDefaultAttr().getExisted(AttrMapLabel.class); AttrMapLabel attrMapLabel = (AttrMapLabel) plot.getConditionCollection().getDefaultAttr().getExisted(AttrMapLabel.class);
if(attrMapLabel == null){ if (attrMapLabel == null) {
attrMapLabel = new AttrMapLabel(); attrMapLabel = new AttrMapLabel();
} }
if(pointLabelPane != null){ if (pointLabelPane != null) {
pointLabelPane.populate(attrMapLabel.getPointLabel()); pointLabelPane.populate(attrMapLabel.getPointLabel());
} }
if (areaLabelPane != null) { if (areaLabelPane != null) {
@ -103,17 +99,17 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
return; return;
} }
ConditionAttr defaultAttr = chart.getPlot().getConditionCollection().getDefaultAttr(); ConditionAttr defaultAttr = chart.getPlot().getConditionCollection().getDefaultAttr();
AttrMapLabel attrMapLabel = (AttrMapLabel)defaultAttr.getExisted(AttrMapLabel.class); AttrMapLabel attrMapLabel = (AttrMapLabel) defaultAttr.getExisted(AttrMapLabel.class);
if (attrMapLabel != null) { if (attrMapLabel != null) {
defaultAttr.remove(attrMapLabel); defaultAttr.remove(attrMapLabel);
} else { } else {
attrMapLabel = new AttrMapLabel(); attrMapLabel = new AttrMapLabel();
} }
if(areaLabelPane != null){ if (areaLabelPane != null) {
attrMapLabel.setAreaLabel(areaLabelPane.update()); attrMapLabel.setAreaLabel(areaLabelPane.update());
} }
if(pointLabelPane != null){ if (pointLabelPane != null) {
attrMapLabel.setPointLabel(pointLabelPane.update()); attrMapLabel.setPointLabel(pointLabelPane.update());
} }

2
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/series/VanChartMapAnchorMarkerPane.java

@ -22,7 +22,7 @@ public class VanChartMapAnchorMarkerPane extends BasicBeanPane<VanChartAttrMarke
anchorSize = new UISpinner(0, Double.MAX_VALUE, 0.5, 28); anchorSize = new UISpinner(0, Double.MAX_VALUE, 0.5, 28);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Size")), anchorSize} new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height")), anchorSize}
}; };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

11
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java

@ -1,9 +1,12 @@
package com.fr.design.mainframe.widget.ui; package com.fr.design.mainframe.widget.ui;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import java.awt.Component;
/** /**
* Created by ibm on 2017/7/26. * Created by ibm on 2017/7/26.
@ -16,13 +19,17 @@ public class FormBasicWidgetPropertyPane extends BasicSetVisiblePropertyPane {
} }
public UICheckBox createOtherConfig() { public UICheckBox createOtherConfig() {
enableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enabled"), true); enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic")); enableCheckBox.setGlobalName(Toolkit.i18nText("Fine-Design_Report_Basic"));
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
return enableCheckBox; return enableCheckBox;
} }
public String obtainBasicName(){
return Toolkit.i18nText("Fine-Design_Basic_Widget_Name");
}
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
return "basicProperty"; return "basicProperty";

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java

@ -34,7 +34,7 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
y.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size")); y.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"));
width.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size")); width.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"));
height.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size")); height.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"));
this.add(WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height)); this.add(WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height, WidgetBoundsPaneFactory.NameAttribute.WIDGET));
} }
@Override @Override

7
designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.NoneWidget; import com.fr.form.ui.NoneWidget;
@ -25,16 +26,16 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
public BasicWidgetPropertySettingPane() { public BasicWidgetPropertySettingPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
enableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enabled"), true); enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
visibleCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true); visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true);
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree(); widgetNameComboBox.refreshTree();
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form-Widget_Name")), widgetNameComboBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox},
new Component[]{enableCheckBox, null}, new Component[]{enableCheckBox, null},
new Component[]{visibleCheckBox, null}, new Component[]{visibleCheckBox, null},
}; };

12
designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java

@ -573,6 +573,7 @@ public class CellSelection extends Selection {
for (int i = 0; i < removeElementList.size(); i++) { for (int i = 0; i < removeElementList.size(); i++) {
CellElement element = removeElementList.get(i); CellElement element = removeElementList.get(i);
element.setValue(null); element.setValue(null);
setDefault(element);
} }
break; break;
@ -588,6 +589,17 @@ public class CellSelection extends Selection {
return true; return true;
} }
//设置显示内容为default
private void setDefault(CellElement element) {
CellGUIAttr cellGUIAttr = element.getCellGUIAttr();
if (cellGUIAttr != null) {
cellGUIAttr.setShowAsDefault(true);
cellGUIAttr.setShowAsHTML(false);
cellGUIAttr.setShowAsDownload(false);
cellGUIAttr.setShowAsImage(false);
}
}
@Override @Override
public int[] getSelectedColumns() { public int[] getSelectedColumns() {

Loading…
Cancel
Save