|
|
|
@ -6,8 +6,12 @@ import com.fr.plugin.chart.base.AttrTooltipContent;
|
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat; |
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipFormat; |
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; |
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipTargetValueFormat; |
|
|
|
|
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; |
|
|
|
|
import com.fr.plugin.chart.gauge.attr.GaugeValueTooltipContent; |
|
|
|
|
import com.fr.van.chart.designer.component.VanChartTooltipContentPane; |
|
|
|
|
import com.fr.van.chart.designer.component.format.TargetValueFormatPaneWithCheckBox; |
|
|
|
|
import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; |
|
|
|
|
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
|
|
|
|
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
|
|
|
|
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
|
|
|
@ -24,19 +28,38 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -1973565663365672717L; |
|
|
|
|
|
|
|
|
|
public TooltipContentPaneWithOutSeries(VanChartStylePane parent, JPanel showOnPane){ |
|
|
|
|
private TargetValueFormatPaneWithCheckBox targetValueFormatPane; |
|
|
|
|
|
|
|
|
|
public TooltipContentPaneWithOutSeries(VanChartStylePane parent, JPanel showOnPane) { |
|
|
|
|
super(parent, showOnPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected double[] getRowSize(double p){ |
|
|
|
|
return new double[]{p,p,p}; |
|
|
|
|
public TargetValueFormatPaneWithCheckBox getTargetValueFormatPane() { |
|
|
|
|
return targetValueFormatPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { |
|
|
|
|
super.initFormatPane(parent, showOnPane); |
|
|
|
|
setValueFormatPane(new ValueFormatPaneWithCheckBox(parent, showOnPane) { |
|
|
|
|
@Override |
|
|
|
|
protected String getCheckBoxText() { |
|
|
|
|
return Toolkit.i18nText("Fine-Design_Chart_Value_Pointer"); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.targetValueFormatPane = new TargetValueFormatPaneWithCheckBox(parent, showOnPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected double[] getRowSize(double p) { |
|
|
|
|
return new double[]{p, p, p, p}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Component[][] getPaneComponents(){ |
|
|
|
|
protected Component[][] getPaneComponents() { |
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{getCategoryNameFormatPane(),null}, |
|
|
|
|
new Component[]{getValueFormatPane(),null}, |
|
|
|
|
new Component[]{getPercentFormatPane(),null}, |
|
|
|
|
new Component[]{getCategoryNameFormatPane(), null}, |
|
|
|
|
new Component[]{getValueFormatPane(), null}, |
|
|
|
|
new Component[]{targetValueFormatPane, null}, |
|
|
|
|
new Component[]{getPercentFormatPane(), null} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -57,7 +80,8 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane
|
|
|
|
|
protected String[] getRichTextFieldNames() { |
|
|
|
|
return new String[]{ |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Use_Value"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Value_Pointer"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Target_Value"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Use_Percent") |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
@ -66,7 +90,52 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane
|
|
|
|
|
return new AttrTooltipFormat[]{ |
|
|
|
|
new AttrTooltipCategoryFormat(), |
|
|
|
|
new AttrTooltipValueFormat(), |
|
|
|
|
new AttrTooltipTargetValueFormat(), |
|
|
|
|
new AttrTooltipPercentFormat() |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { |
|
|
|
|
super.populateFormatPane(attrTooltipContent); |
|
|
|
|
if (attrTooltipContent instanceof GaugeValueTooltipContent) { |
|
|
|
|
GaugeValueTooltipContent gaugeValueTooltipContent = (GaugeValueTooltipContent) attrTooltipContent; |
|
|
|
|
targetValueFormatPane.populate(gaugeValueTooltipContent.getTargetValueFormat()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { |
|
|
|
|
super.updateFormatPane(attrTooltipContent); |
|
|
|
|
GaugeValueTooltipContent gaugeValueTooltipContent = (GaugeValueTooltipContent) attrTooltipContent; |
|
|
|
|
targetValueFormatPane.update(gaugeValueTooltipContent.getTargetValueFormat()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void updateTooltipFormat(AttrTooltipContent target, AttrTooltipContent source) { |
|
|
|
|
super.updateTooltipFormat(target, source); |
|
|
|
|
|
|
|
|
|
if (target instanceof GaugeValueTooltipContent && source instanceof GaugeValueTooltipContent) { |
|
|
|
|
GaugeValueTooltipContent targetGauge = (GaugeValueTooltipContent) target; |
|
|
|
|
GaugeValueTooltipContent sourceGauge = (GaugeValueTooltipContent) source; |
|
|
|
|
targetGauge.setRichTextTargetValueFormat(sourceGauge.getRichTextTargetValueFormat()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void setDirty(boolean isDirty) { |
|
|
|
|
super.setDirty(isDirty); |
|
|
|
|
targetValueFormatPane.setDirty(isDirty); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean isDirty() { |
|
|
|
|
return super.isDirty() || targetValueFormatPane.isDirty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected AttrTooltipContent createAttrTooltip() { |
|
|
|
|
GaugeValueTooltipContent gaugeValueTooltipContent = new GaugeValueTooltipContent(); |
|
|
|
|
gaugeValueTooltipContent.getTargetValueFormat().setEnable(true); |
|
|
|
|
gaugeValueTooltipContent.getRichTextTargetValueFormat().setEnable(true); |
|
|
|
|
return gaugeValueTooltipContent; |
|
|
|
|
} |
|
|
|
|
} |