|
|
|
@ -68,7 +68,8 @@ 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,p,p,p}; |
|
|
|
|
//TODO Bjorn
|
|
|
|
|
double[] rowSize = {p,p,p,p,p,p,p}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{createGaugeLayoutPane()}, |
|
|
|
|
new Component[]{createGaugeStylePane(rowSize, new double[]{f,e})}, |
|
|
|
@ -140,12 +141,14 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
private Component[][] getDiffComponentsWithGaugeStyle() { |
|
|
|
|
GaugeStyle style = plot == null ? GaugeStyle.POINTER : ((VanChartGaugePlot)plot).getGaugeStyle(); |
|
|
|
|
switch (style) { |
|
|
|
|
//TODO Bjorn 仪表盘样式自动逻辑
|
|
|
|
|
case RING: |
|
|
|
|
initRotate(); |
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getPaneBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, paneBackgroundColor}, |
|
|
|
|
getPaneBackgroundColor(), |
|
|
|
|
/* getPaneBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, paneBackgroundColor},*/ |
|
|
|
|
getInnerPaneBackgroundColor(), |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null}, |
|
|
|
|
getChutePercent() |
|
|
|
@ -154,8 +157,9 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getNeedleColor(), |
|
|
|
|
getSlotBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, slotBackgroundColor}, |
|
|
|
|
getSlotBackgroundColor(), |
|
|
|
|
/* getSlotBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, slotBackgroundColor},*/ |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null}, |
|
|
|
|
getChutePercent() |
|
|
|
|
}; |
|
|
|
@ -163,25 +167,33 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
|
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getNeedleColor(), |
|
|
|
|
getSlotBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, slotBackgroundColor}, |
|
|
|
|
getSlotBackgroundColor(), |
|
|
|
|
/*getSlotBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, slotBackgroundColor},*/ |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Length_Set")), null}, |
|
|
|
|
getThermometerWidth() |
|
|
|
|
}; |
|
|
|
|
default: |
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
getHingeColorAuto(), |
|
|
|
|
new Component[]{null, hingeColor}, |
|
|
|
|
getHingeColor(), |
|
|
|
|
/* getHingeColorAuto(), |
|
|
|
|
new Component[]{null, hingeColor},*/ |
|
|
|
|
getHingeBackgroundColor(), |
|
|
|
|
getNeedleColor(), |
|
|
|
|
getPaneBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, paneBackgroundColor}, |
|
|
|
|
getPaneBackgroundColor(), |
|
|
|
|
/* getPaneBackgroundColorAuto(), |
|
|
|
|
new Component[]{null, paneBackgroundColor},*/ |
|
|
|
|
new Component[]{createRadiusPane(Toolkit.i18nText("Fine-Design_Chart_Radius_Set")), null} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getHingeColor() { |
|
|
|
|
hingeColor = new ColorSelectBox(120); |
|
|
|
|
return new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Hinge")), hingeColor}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component[] getHingeColorAuto() { |
|
|
|
|
hingeColor = new ColorSelectBox(120); |
|
|
|
|
hingeColorAuto = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Auto"), |
|
|
|
|