Browse Source

Merge pull request #2143 in DESIGN/design from release/10.0 to bugfix/10.0

* commit 'ad43affa5a352e02c726345f9eff3a43886f70e3':
  调整check的位置
  CHART-15175 调整结果数据的数据点提示
  还原
  布局
  REPORT-37821  frm绝对布局框选多个组件有问题
  CHART-15216 release→final
  CHART-15216 条件属性中不应该出现勾选框
  调整check的位置
  CHART-15175 调整结果数据的数据点提示
  REPORT-37769 表单多tab,设置选中背景,如果增加一个tab,第一个tab0的选中背景就会失效
  还原
  布局
bugfix/10.0
superman 4 years ago
parent
commit
918f9187d6
  1. 121
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  2. 12
      designer-chart/src/main/java/com/fr/design/chartx/component/SeriesValueFieldComboBoxPane.java
  3. 69
      designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java
  4. 15
      designer-chart/src/main/java/com/fr/design/chartx/data/map/AbstractAreaLngLatPane.java
  5. 1
      designer-chart/src/main/java/com/fr/design/chartx/data/map/MapChartDataPane.java
  6. 15
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractCellDataFieldsPane.java
  7. 15
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  8. 7
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java
  9. 2
      designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java
  10. 30
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  11. 22
      designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java
  12. 12
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java
  13. 4
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java
  14. 10
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java
  15. 6
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java
  16. 2
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java
  17. 2
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java
  18. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineMapTooltipConditionPane.java
  19. 36
      designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapPlotTooltipNoCheckPane.java
  20. 2
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java

121
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java

@ -1,19 +1,18 @@
package com.fr.design.chartx.component;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.component.correlation.AbstractCorrelationPane;
import com.fr.design.chartx.component.correlation.CalculateComboBoxEditorComponent;
import com.fr.design.chartx.component.correlation.FieldEditorComponentWrapper;
import com.fr.design.chartx.component.correlation.UIComboBoxEditorComponent;
import com.fr.design.chartx.component.correlation.UITextFieldEditorComponent;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import com.fr.extended.chart.UIComboBoxWithNone;
@ -22,19 +21,25 @@ import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.ArrayList;
import java.util.List;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
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;
import java.util.ArrayList;
import java.util.List;
/**
* Created by shine on 2018/9/12.
* 系列名使用字段名or字段值的抽象的pane 支持多种属性结构的存取
*/
public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<T> {
public abstract class AbstractCustomFieldComboBoxPane<T> extends BasicBeanPane<T> {
private UIButtonGroup<Boolean> nameOrValue;
private JPanel cardPane;
private CardLayout cardLayout;
private AbstractUseFieldValuePane useFieldValuePane;
@ -42,73 +47,43 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
private List<String> fieldList = new ArrayList<String>();
@Override
protected void initLayout() {
this.setLayout(new BorderLayout(0, 6));
JPanel northPane = new JPanel(new BorderLayout());
northPane.add(jcb, BorderLayout.CENTER);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name_From"));
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, 20));
northPane.add(label, BorderLayout.WEST);
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
}
public AbstractCustomFieldComboBoxPane() {
@Override
protected List<FurtherBasicBeanPane<? extends T>> initPaneList() {
useFieldValuePane = createUseFieldValuePane();
customFieldNamePane = createCustomFieldNamePane();
List<FurtherBasicBeanPane<? extends T>> list = new ArrayList<FurtherBasicBeanPane<? extends T>>();
list.add(useFieldValuePane);
list.add(paneWrapper());
return list;
}
private FurtherBasicBeanPane<? extends T> paneWrapper() {
FurtherBasicBeanPane pane = new FurtherBasicBeanPane() {
nameOrValue = new UIButtonGroup<Boolean>(
new String[]{useFieldValuePane.title4PopupWindow(), customFieldNamePane.title4PopupWindow()},
new Boolean[]{false, true});
nameOrValue.setSelectedItem(false);
nameOrValue.addChangeListener(new ChangeListener() {
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Enable_Field_Name");
public void stateChanged(ChangeEvent e) {
checkCardPane();
}
});
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Series_Name_From"), nameOrValue);
@Override
public boolean accept(Object ob) {
return false;
}
@Override
public void reset() {
}
cardLayout = new CardLayout();
cardPane = new JPanel(cardLayout);
cardPane.add(useFieldValuePane, useFieldValuePane.title4PopupWindow());
cardPane.add(customFieldNamePane, customFieldNamePane.title4PopupWindow());
@Override
public void populateBean(Object ob) {
}
@Override
public Object updateBean() {
return null;
}
};
pane.setLayout(new BorderLayout(0, 6));
pane.add(customFieldNamePane, BorderLayout.CENTER);
return pane;
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
}
protected abstract AbstractUseFieldValuePane createUseFieldValuePane();
protected abstract AbstractCustomFieldNamePane createCustomFieldNamePane();
@Override
protected String title4PopupWindow() {
return StringUtils.EMPTY;
}
protected boolean valueComboBoxHasNone() {
return false;
}
public void checkBoxUse(boolean hasUse) {
jcb.setEnabled(hasUse);
nameOrValue.setEnabled(hasUse);
useFieldValuePane.checkBoxUse(hasUse);
}
@ -122,6 +97,19 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
fieldList = columnNameList;
}
private void checkCardPane() {
cardLayout.show(cardPane, nameOrValue.getSelectedItem() ? customFieldNamePane.title4PopupWindow() : useFieldValuePane.title4PopupWindow());
}
protected void populateNameOrValue(boolean b) {
nameOrValue.setSelectedItem(b);
checkCardPane();
}
protected boolean updateNameOrValue() {
return nameOrValue.getSelectedItem();
}
protected void populateCustomFieldNamePane(T t) {
customFieldNamePane.populateBean(t);
}
@ -138,6 +126,16 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
useFieldValuePane.updateBean(t);
}
@Override
public T updateBean() {
return null;
}
@Override
protected String title4PopupWindow() {
return null;
}
protected abstract class AbstractUseFieldValuePane extends FurtherBasicBeanPane<T> {
private UIComboBox series;
private UIComboBox value;
@ -169,11 +167,7 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method"), SwingConstants.LEFT), function},
};
double p = TableLayout.PREFERRED;
double[] columnSize = {78, 122};
double[] rowSize = {p, p, p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = DataLayoutHelper.createDataLayoutPane(components);
this.setLayout(new BorderLayout(0, 6));
this.add(panel, BorderLayout.CENTER);
@ -258,5 +252,10 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
protected Object[] createLine() {
return new String[]{StringUtils.EMPTY, StringUtils.EMPTY, Toolkit.i18nText("Fine-Design_Chart_Use_None")};
}
@Override
protected String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Enable_Field_Name");
}
}
}

12
designer-chart/src/main/java/com/fr/design/chartx/component/SeriesValueFieldComboBoxPane.java

@ -27,23 +27,21 @@ public class SeriesValueFieldComboBoxPane extends AbstractCustomFieldComboBoxPan
@Override
public void populateBean(SeriesValueCorrelationDefinition ob) {
populateNameOrValue(ob.isCustomFieldValue());
if (ob.isCustomFieldValue()) {
populateCustomFieldNamePane(ob);
jcb.setSelectedIndex(1);
} else {
populateUseFieldValuePane(ob);
jcb.setSelectedIndex(0);
}
}
@Override
public void updateBean(SeriesValueCorrelationDefinition ob) {
if (jcb.getSelectedIndex() == 0) {
ob.setCustomFieldValue(false);
updateUseFieldValuePane(ob);
} else {
ob.setCustomFieldValue(true);
ob.setCustomFieldValue(updateNameOrValue());
if (ob.isCustomFieldValue()) {
updateCustomFieldNamePane(ob);
} else {
updateUseFieldValuePane(ob);
}
}

69
designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java

@ -0,0 +1,69 @@
package com.fr.design.chartx.data;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.Component;
import java.util.Arrays;
/**
* @author shine
* @version 10.0
* Created by shine on 2020/7/22
*/
public class DataLayoutHelper {
public static int WIDTH = 150;
public static int LABEL_HEIGHT = 20;
public static int LABEL_WIDTH = 65;
public static int LEFT_GAP = 15;
public static int RIGHT_GAP = 10;
public static void setWIDTH(int WIDTH) {
DataLayoutHelper.WIDTH = WIDTH;
}
public static void setLabelHeight(int labelHeight) {
LABEL_HEIGHT = labelHeight;
}
public static void setLabelWidth(int labelWidth) {
LABEL_WIDTH = labelWidth;
}
public static void setLeftGap(int leftGap) {
LEFT_GAP = leftGap;
}
public static void setRightGap(int rightGap) {
RIGHT_GAP = rightGap;
}
public static JPanel createDataLayoutPane(Component[][] components) {
int len = components.length;
double p = TableLayout.PREFERRED;
double[] columnSize = {DataLayoutHelper.LABEL_WIDTH, DataLayoutHelper.WIDTH};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
public static JPanel createDataLayoutPane(String label, Component component) {
Component[][] components = new Component[][]{
new Component[]{new UILabel(label, SwingConstants.LEFT), component}
};
return createDataLayoutPane(components);
}
public static void addNormalBorder(JComponent component) {
component.setBorder(BorderFactory.createEmptyBorder(0, DataLayoutHelper.LEFT_GAP, 0, DataLayoutHelper.RIGHT_GAP));
}
}

15
designer-chart/src/main/java/com/fr/design/chartx/data/map/AbstractAreaLngLatPane.java

@ -1,18 +1,15 @@
package com.fr.design.chartx.data.map;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.util.Arrays;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
@ -67,8 +64,10 @@ public abstract class AbstractAreaLngLatPane extends JPanel {
locationType.setSelectedIndex(0);
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("FR-Plugin_Design_Geographic_Location"), locationType);
this.setLayout(new BorderLayout(0, 6));
this.add(locationType, BorderLayout.NORTH);
this.add(northPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
@ -103,12 +102,8 @@ public abstract class AbstractAreaLngLatPane extends JPanel {
for (int i = 0; i < len; i++) {
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
return DataLayoutHelper.createDataLayoutPane(components);
}
}

1
designer-chart/src/main/java/com/fr/design/chartx/data/map/MapChartDataPane.java

@ -38,6 +38,7 @@ public class MapChartDataPane extends AbstractChartDataPane<MapChartDataDefiniti
VanChartMapPlot mapPlot = this.getVanChart().getPlot();
mapType = mapPlot == null ? mapType : mapPlot.getMapType();
}
AreaMapDataSetFieldsPane areaMapDataSetFieldsPane;
PointMapDataSetFieldsPane pointMapDataSetFieldsPane;
LineMapDataSetFieldsPane lineMapDataSetFieldsPane;

15
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractCellDataFieldsPane.java

@ -3,17 +3,13 @@ package com.fr.design.chartx.fields;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.ColumnField;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.Arrays;
import java.awt.BorderLayout;
import java.awt.Component;
@ -46,8 +42,6 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
if (south != null) {
this.add(south, BorderLayout.SOUTH);
}
this.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
}
protected JPanel createCenterPane() {
@ -65,12 +59,7 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), formulaPanes[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
return DataLayoutHelper.createDataLayoutPane(components);
}

15
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java

@ -4,25 +4,21 @@ import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.ColumnField;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.Arrays;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems;
@ -49,7 +45,6 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
protected void initComponents() {
this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(6, 24, 0, 15));
JPanel north = createNorthPane(),
center = createCenterPane(),
@ -86,12 +81,8 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
for (int i = 0; i < len; i++) {
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
return DataLayoutHelper.createDataLayoutPane(components);
}
protected JPanel createSouthPane() {

7
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java

@ -5,23 +5,24 @@ import com.fr.base.Utils;
import com.fr.chartx.TwoTuple;
import com.fr.chartx.data.field.diff.ColumnFieldCollectionWithSeriesValue;
import com.fr.design.chartx.component.MapAreaMatchPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.plugin.chart.map.data.MapMatchResult;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.MapMatchResult;
import com.fr.plugin.chart.map.server.ChartGEOJSONHelper;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.Set;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Set;
/**
* @author Bjorn
@ -53,7 +54,7 @@ public abstract class MapDataSetFieldsPane<T extends ColumnFieldCollectionWithSe
public JPanel createAreaPanel(final UIComboBox areaBox) {
JPanel areaPanel = new JPanel(new BorderLayout(10, 0));
areaBox.setPreferredSize(new Dimension(91, 20));
areaBox.setPreferredSize(new Dimension(DataLayoutHelper.WIDTH - 10 - 20, DataLayoutHelper.LABEL_HEIGHT));
areaPanel.add(areaBox, BorderLayout.WEST);
UIButton uiButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/config.png"));
uiButton.addActionListener(new ActionListener() {

2
designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.CellDataDefinition;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.i18n.Toolkit;
@ -23,6 +24,7 @@ public class CellDataPane extends FurtherBasicBeanPane<CellDataDefinition> {
this.setLayout(new BorderLayout());
this.add(cellDataFieldsPane, BorderLayout.CENTER);
DataLayoutHelper.addNormalBorder(this);
}
@Override

30
designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

@ -3,25 +3,20 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.DataSetDefinition;
import com.fr.data.impl.NameTableData;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.design.utils.gui.UIComponentUtils;
import java.util.List;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.List;
/**
* Created by shine on 2019/5/21.
*/
public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
private static final int TABLE_DATA_LABEL_LINE_WRAP_WIDTH = 65;
private static final int TABLE_DATA_PANE_WIDTH = 246;
private DatabaseTableDataPane tableDataPane;
@ -32,24 +27,27 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
}
private void initComps(AbstractDataSetFieldsPane dataSetFieldsPane) {
UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data"));
UIComponentUtils.setLineWrap(label, TABLE_DATA_LABEL_LINE_WRAP_WIDTH);
UIComponentUtils.setPreferedWidth(label, ChartDataPane.LABEL_WIDTH);
tableDataPane = new DatabaseTableDataPane(label) {
tableDataPane = new DatabaseTableDataPane(null) {
@Override
protected void userEvent() {
refreshBoxListAndTableName();
checkBoxUse();
}
@Override
protected void setBorder() {
}
};
tableDataPane.setPreferredSize(new Dimension(TABLE_DATA_PANE_WIDTH, tableDataPane.getPreferredSize().height));
this.dataSetFieldsPane = dataSetFieldsPane;
this.setLayout(new BorderLayout());
this.add(tableDataPane, BorderLayout.NORTH);
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Table_Data"), tableDataPane);
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
this.add(dataSetFieldsPane, BorderLayout.CENTER);
DataLayoutHelper.addNormalBorder(this);
checkBoxUse();
}

22
designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java

@ -3,28 +3,22 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
/**
* Created by shine on 2019/5/21.
*/
public class SingleDataPane extends BasicBeanPane<AbstractDataDefinition> {
private static final int TABLE_DATA_LABEL_LINE_WIDTH = 81;
private UIComboBoxPane<AbstractDataDefinition> comboBoxPane;
private DataSetPane dataSetPane;
@ -50,18 +44,12 @@ public class SingleDataPane extends BasicBeanPane<AbstractDataDefinition> {
}
protected void initLayout() {
this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE, 6));
JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE, 0));
this.setLayout(new BorderLayout(0, 6));
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb);
DataLayoutHelper.addNormalBorder(northPane);
UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Data_Source"));
UIComponentUtils.setPreferedWidth(label, TABLE_DATA_LABEL_LINE_WIDTH);
northPane.add(label,BorderLayout.WEST);
northPane.add(jcb, BorderLayout.CENTER);
northPane.setBorder(BorderFactory.createEmptyBorder(5,24,0,15));
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
}
@Override

12
designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java

@ -27,21 +27,19 @@ public class ExtendedCustomFieldComboBoxPane extends AbstractCustomFieldComboBox
public void populateBean(AbstractDataConfig ob) {
if (ob.isCustomName()) {
populateCustomFieldNamePane(ob);
jcb.setSelectedIndex(1);
} else {
populateUseFieldValuePane(ob);
jcb.setSelectedIndex(0);
}
populateNameOrValue(ob.isCustomName());
}
@Override
public void updateBean(AbstractDataConfig ob) {
if (jcb.getSelectedIndex() == 0) {
ob.setCustomName(false);
updateUseFieldValuePane(ob);
} else {
ob.setCustomName(true);
ob.setCustomName(updateNameOrValue());
if (ob.isCustomName()) {
updateCustomFieldNamePane(ob);
} else {
updateUseFieldValuePane(ob);
}
}

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

@ -25,8 +25,4 @@ public class VanChartBoxPlotTooltipPane extends VanChartPlotTooltipPane {
protected boolean hasTooltipSeriesType() {
return false;
}
public void checkContentVisible(boolean isDetailed) {
((VanChartBoxTooltipContentPane) tooltipContentPane).checkFormatVisible(isDetailed);
}
}

10
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java

@ -32,7 +32,7 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane, boolean isDetailed) {
super(parent, showOnPane);
this.detailed = isDetailed;
checkFormatVisible(isDetailed);
}
protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) {
@ -83,8 +83,6 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
commonPanel.add(createDataNumberPane(), BorderLayout.CENTER);
commonPanel.add(createDataDetailPane(), BorderLayout.SOUTH);
checkFormatVisible(detailed);
return commonPanel;
}
@ -178,7 +176,7 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
}
protected AttrTooltipContent createAttrTooltip() {
return new AttrBoxTooltipContent();
return new AttrBoxTooltipContent(detailed);
}
protected void populateFormatPane(AttrTooltipContent attrTooltipContent) {
@ -195,6 +193,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
q1.populate(boxTooltipContent.getQ1());
min.populate(boxTooltipContent.getMin());
outlier.populate(boxTooltipContent.getOutlier());
checkFormatVisible(boxTooltipContent.isDetailed());
}
}
@ -212,6 +212,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
q1.update(boxTooltipContent.getQ1());
min.update(boxTooltipContent.getMin());
outlier.update(boxTooltipContent.getOutlier());
boxTooltipContent.setDetailed(this.detailed);
}
}

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

@ -4,7 +4,6 @@ import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.box.VanChartBoxPlot;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import com.fr.van.chart.designer.style.tooltip.VanChartTooltipPane;
@ -25,11 +24,6 @@ public class VanChartBoxTooltipPane extends VanChartTooltipPane {
if (tooltipPane instanceof VanChartBoxPlotTooltipPane) {
tooltipPane.populate((AttrTooltip) attr);
VanChartBoxPlotTooltipPane boxPlotTooltipPane = (VanChartBoxPlotTooltipPane) tooltipPane;
VanChartBoxPlot boxPlot = (VanChartBoxPlot) plot;
boxPlotTooltipPane.checkContentVisible(boxPlot.isDetailed());
}
}
}

2
designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java

@ -101,7 +101,7 @@ public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane
boolean isDetailed = dataType.getSelectedIndex() == 0;
report.setDetailed(isDetailed);
((VanChartBoxPlot) initplot).setDetailed(isDetailed);
((VanChartBoxPlot) initplot).updateDetailedAttr(isDetailed);
}
if (detailedDataSeriesPane != null) {
detailedDataSeriesPane.updateBean(collection);

2
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java

@ -154,7 +154,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
boolean isDetailed = dataType.getSelectedIndex() == 0;
table.setDetailed(isDetailed);
((VanChartBoxPlot) initplot).setDetailed(isDetailed);
((VanChartBoxPlot) initplot).updateDetailedAttr(isDetailed);
}
if (seriesTypeComboxPane != null) {
seriesTypeComboxPane.updateBean(collection);

4
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineMapTooltipConditionPane.java

@ -4,7 +4,7 @@ package com.fr.van.chart.designer.other.condition.item;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import com.fr.van.chart.map.line.VanChartLineMapPlotTooltipPane;
import com.fr.van.chart.map.line.VanChartLineMapPlotTooltipNoCheckPane;
/**
* Created by hufan on 2016/12/23.
@ -16,6 +16,6 @@ public class VanChartLineMapTooltipConditionPane extends VanChartTooltipConditio
}
protected VanChartPlotTooltipPane createTooltipContentsPane() {
return new VanChartLineMapPlotTooltipPane(getPlot(), null);
return new VanChartLineMapPlotTooltipNoCheckPane(getPlot(), null);
}
}

36
designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapPlotTooltipNoCheckPane.java

@ -0,0 +1,36 @@
package com.fr.van.chart.map.line;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.van.chart.designer.style.VanChartStylePane;
import java.awt.BorderLayout;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2020-08-20
*/
public class VanChartLineMapPlotTooltipNoCheckPane extends VanChartLineMapPlotTooltipPane {
public VanChartLineMapPlotTooltipNoCheckPane(Plot plot, VanChartStylePane parent) {
super(plot, parent);
}
protected void addComponents(Plot plot) {
isTooltipShow = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Use_Tooltip"));
tooltipPane = createTooltipPane(plot);
this.setLayout(new BorderLayout());
this.add(tooltipPane, BorderLayout.CENTER);
}
@Override
public void populate(AttrTooltip attr) {
super.populate(attr);
isTooltipShow.setSelected(true);
tooltipPane.setEnabled(isTooltipShow.isSelected());
}
}

2
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java

@ -143,7 +143,7 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
fitLayout.setInitialBackground(layout.getTemplateStyle().getTabDefaultBackground());
fitLayout.setCustomStyle(true);
}
tabFitLayout.setxCardSwitchButton((XCardSwitchButton)this.getComponent(0));
tabFitLayout.setxCardSwitchButton((XCardSwitchButton)this.getComponent(index));
tabFitLayout.checkButonType();
tabFitLayout.setBackupParent(cardLayout);
cardLayout.add(tabFitLayout, widgetName);

Loading…
Cancel
Save