Browse Source

Merge pull request #1536 in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit '76f3423349e4b955828404c771221b77e6926a37':
  CHART-13052 为仪表盘坐标轴轴标签htmlPane分配parentPane
  CHART-13064 修改含有自动button的颜色选择器高度
  CHART-13065 调整字符间距
  CHART-13063 修改试管仪表盘布局文案
feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
3877a21cf4
  1. 10
      designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java
  2. 12
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java
  3. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeAxisPane.java
  4. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  5. 13
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

10
designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java

@ -16,6 +16,7 @@ import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -46,6 +47,8 @@ public abstract class ColorControlWindowWithAuto extends ColorControlWindow {
class ColorSelectionPopupPaneWithAuto extends NewColorSelectPane { class ColorSelectionPopupPaneWithAuto extends NewColorSelectPane {
private static final long serialVersionUID = 7822856562329146354L; private static final long serialVersionUID = 7822856562329146354L;
private final static int BUTTON_HEIGHT = 15;
public ColorSelectionPopupPaneWithAuto(boolean isSupportTransparent) { public ColorSelectionPopupPaneWithAuto(boolean isSupportTransparent) {
super(isSupportTransparent); super(isSupportTransparent);
@ -111,6 +114,13 @@ public abstract class ColorControlWindowWithAuto extends ColorControlWindow {
} }
} }
public Dimension getPreferredSize() {
if (isSupportTransparent()) {
return new Dimension(super.getPreferredSize().width, TRANSPARENT_WINDOW_HEIGHT + BUTTON_HEIGHT);
}
return new Dimension(super.getPreferredSize().width, WINDOW_HEIGHT + BUTTON_HEIGHT);
}
} }
} }

12
designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

@ -40,8 +40,8 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
// 是否支持透明 // 是否支持透明
private boolean isSupportTransparent; private boolean isSupportTransparent;
private final static int TRANSPANENT_WINDOW_HEIGHT = 165; public final static int TRANSPARENT_WINDOW_HEIGHT = 165;
private final static int WINDWO_HEIGHT = 150; public final static int WINDOW_HEIGHT = 150;
// 最近使用颜色 // 最近使用颜色
private UsedColorPane usedColorPane; private UsedColorPane usedColorPane;
@ -105,6 +105,10 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
centerPane.add(centerPane1); centerPane.add(centerPane1);
} }
public boolean isSupportTransparent() {
return isSupportTransparent;
}
public void setSupportTransparent(boolean supportTransparent) { public void setSupportTransparent(boolean supportTransparent) {
isSupportTransparent = supportTransparent; isSupportTransparent = supportTransparent;
} }
@ -208,9 +212,9 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
if (isSupportTransparent) { if (isSupportTransparent) {
return new Dimension(super.getPreferredSize().width, TRANSPANENT_WINDOW_HEIGHT); return new Dimension(super.getPreferredSize().width, TRANSPARENT_WINDOW_HEIGHT);
} }
return new Dimension(super.getPreferredSize().width, WINDWO_HEIGHT); return new Dimension(super.getPreferredSize().width, WINDOW_HEIGHT);
} }
/** /**

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeAxisPane.java

@ -24,6 +24,8 @@ public class VanChartGaugeAxisPane extends VanChartAxisPane {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
gaugeAxisPane = new VanChartAxisScrollPaneWithGauge(); gaugeAxisPane = new VanChartAxisScrollPaneWithGauge();
this.add(gaugeAxisPane, BorderLayout.CENTER); this.add(gaugeAxisPane, BorderLayout.CENTER);
gaugeAxisPane.setParentPane(parent);
} }
@Override @Override

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

@ -30,6 +30,7 @@ import java.awt.Dimension;
*/ */
public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
private static final int TEXT_FONT_PANE_HEIGHT = 50;
private GaugeStyle gaugeStyle; private GaugeStyle gaugeStyle;
private UIButtonGroup<Integer> align; private UIButtonGroup<Integer> align;
private JPanel alignPane; private JPanel alignPane;
@ -198,7 +199,7 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
protected void checkStyleUse() { protected void checkStyleUse() {
textFontPane.setVisible(true); textFontPane.setVisible(true);
textFontPane.setPreferredSize(new Dimension(0, 60)); textFontPane.setPreferredSize(new Dimension(0, TEXT_FONT_PANE_HEIGHT));
} }
protected boolean hasLabelAlign(Plot plot) { protected boolean hasLabelAlign(Plot plot) {

13
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

@ -74,7 +74,18 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createGaugeLayoutPane() { private JPanel createGaugeLayoutPane() {
gaugeLayout = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")}); gaugeLayout = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Report_Page_Setup_Orientation"),gaugeLayout);
String title = Toolkit.i18nText("Fine-Design_Report_Page_Setup_Orientation");
if (plot instanceof VanChartGaugePlot) {
VanChartGaugePlot gaugePlot = (VanChartGaugePlot) plot;
if (gaugePlot.getGaugeStyle() == GaugeStyle.THERMOMETER) {
title = Toolkit.i18nText("Fine-Design_Report_Page_Setup_Sort_Orientation");
}
}
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(title, gaugeLayout);
gaugeLayout.addChangeListener(new ChangeListener() { gaugeLayout.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {

Loading…
Cancel
Save