|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
package com.fr.design.chart; |
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIStyle; |
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.fr.base.chart.chartdata.CallbackEvent; |
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.design.chart.auto.AutoTypeCalculate; |
|
|
|
@ -66,7 +65,7 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
|
|
|
|
|
private UIButton refreshButton; |
|
|
|
|
|
|
|
|
|
private TableDataComboBox tableNameComboBox; |
|
|
|
|
private DataFieldComboBox dataFieldBox; |
|
|
|
|
private UIComboCheckBox dataFieldBox; |
|
|
|
|
|
|
|
|
|
private AutoProgressBar connectionBar; |
|
|
|
|
private SwingWorker worker; |
|
|
|
@ -101,27 +100,6 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
|
|
|
|
|
this.add(splitPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class DataFieldComboBox extends UIComboCheckBox { |
|
|
|
|
public DataFieldComboBox(Object[] value) { |
|
|
|
|
super(value); |
|
|
|
|
} |
|
|
|
|
@Override |
|
|
|
|
protected void setLayoutAndAddComponents() { |
|
|
|
|
// 使用BorderLayout 将ClickPane添加到中心,不然受到FlatComboBoxUI影响会有两个下拉箭头按钮
|
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
JPanel pane = getClickPane(); |
|
|
|
|
pane.setOpaque(false); |
|
|
|
|
this.add(pane, BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
@Override |
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
// 这里大小设计要和TableDataComboBox保持一致,不然两个多选框会有大小差异
|
|
|
|
|
int comboHeight = FineUIUtils.getAndScaleInt("ComboBox.comboHeight", 24); |
|
|
|
|
return new Dimension(super.getPreferredSize().width, comboHeight); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListCellRenderer iconCellRenderer = new DefaultListCellRenderer() { |
|
|
|
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
|
|
@ -161,7 +139,7 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initButtonGroup() { |
|
|
|
|
dataFieldBox = new DataFieldComboBox(new Object[0]); |
|
|
|
|
dataFieldBox = new UIComboCheckBox(new Object[0]); |
|
|
|
|
dataFieldBox.getClickPane().setOpaque(false); |
|
|
|
|
dataFieldBox.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|