Browse Source
* commit '918f9187d6fc1ca0a1a8d5b3d9d302307bdefe75': 调整check的位置 CHART-15175 调整结果数据的数据点提示 还原 布局 REPORT-37821 frm绝对布局框选多个组件有问题 CHART-15216 release→final CHART-15216 条件属性中不应该出现勾选框 调整check的位置 CHART-15175 调整结果数据的数据点提示 REPORT-37769 表单多tab,设置选中背景,如果增加一个tab,第一个tab0的选中背景就会失效 还原 布局research/11.0
superman
4 years ago
20 changed files with 222 additions and 165 deletions
@ -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)); |
||||||
|
} |
||||||
|
} |
@ -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()); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue