Browse Source

CHART-16560 仪表盘半径设置

feature/big-screen
白岳 4 years ago
parent
commit
9f4560e4a9
  1. 18
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  2. 2
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

18
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -9,11 +9,16 @@ import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.GradientStyle;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.UINumberDragPane;
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.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
@ -39,9 +44,11 @@ import com.fr.van.chart.pie.RadiusCardLayoutPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* 图表样式-系列抽象界面
@ -183,7 +190,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//半径界面
protected JPanel createRadiusPane(String title) {
radiusPane = initRadiusPane();
radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(title, radiusPane);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
double[] rowSize = {p};
UILabel label = FRWidgetFactory.createLineWrapLabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{label, radiusPane},
};
radiusPaneWithTitle = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, TableLayout4VanChartHelper.COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle;
}

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

@ -68,7 +68,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p,p};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createGaugeLayoutPane()},
new Component[]{createGaugeStylePane(rowSize, new double[]{f,e})},

Loading…
Cancel
Save