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