|
|
|
@ -2,11 +2,11 @@ package com.fr.van.chart.designer.component.richText;
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.data.util.function.DataFunction; |
|
|
|
|
import com.fr.data.util.function.NoneFunction; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
import com.fr.plugin.chart.base.FirstFunction; |
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat; |
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipFormat; |
|
|
|
|
import com.fr.plugin.chart.base.format.IntervalTimeFormat; |
|
|
|
@ -28,7 +28,7 @@ public class VanChartFieldButton extends JPanel {
|
|
|
|
|
private static final Icon ADD_ICON = BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"); |
|
|
|
|
|
|
|
|
|
private static final int W = 200; |
|
|
|
|
private static final int H = 28; |
|
|
|
|
private static final int H = 24; |
|
|
|
|
|
|
|
|
|
private final String fieldName; |
|
|
|
|
private final String fieldId; |
|
|
|
@ -40,7 +40,7 @@ public class VanChartFieldButton extends JPanel {
|
|
|
|
|
private UIToggleButton fieldButton; |
|
|
|
|
private UIButton addButton; |
|
|
|
|
|
|
|
|
|
private DataFunction dataFunction = new NoneFunction(); |
|
|
|
|
private DataFunction dataFunction = new FirstFunction(); |
|
|
|
|
|
|
|
|
|
public VanChartFieldButton(String fieldName, AttrTooltipFormat format, VanChartFieldListener listener) { |
|
|
|
|
this(fieldName, format, false, false, listener); |
|
|
|
@ -146,6 +146,9 @@ public class VanChartFieldButton extends JPanel {
|
|
|
|
|
listener.addSelectedField(fieldName, fieldId); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
fieldButton.setBorderPaintedOnlyWhenPressed(true); |
|
|
|
|
addButton.setBorderPaintedOnlyWhenPressed(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel getContentPane() { |
|
|
|
@ -160,7 +163,7 @@ public class VanChartFieldButton extends JPanel {
|
|
|
|
|
double[] rowSize = {p}; |
|
|
|
|
double[] columnSize = {e, d}; |
|
|
|
|
|
|
|
|
|
JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 5, 0); |
|
|
|
|
JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0); |
|
|
|
|
content.setPreferredSize(new Dimension(W, H)); |
|
|
|
|
|
|
|
|
|
return content; |
|
|
|
|