pengda
4 years ago
23 changed files with 293 additions and 90 deletions
@ -0,0 +1,28 @@
|
||||
package com.fr.design.formula; |
||||
|
||||
import com.fr.base.BaseFormula; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
import static org.junit.Assert.*; |
||||
|
||||
public class FormulaTextFieldTest { |
||||
|
||||
@Test |
||||
public void testSet() { |
||||
|
||||
FormulaTextField field = new FormulaTextField(); |
||||
BaseFormula aaaa = BaseFormula.createFormulaBuilder().build("aaaa"); |
||||
field.setValueAndText(aaaa, true); |
||||
|
||||
Assert.assertEquals("aaaa", field.getText()); |
||||
|
||||
field.setValueAndText(aaaa, false); |
||||
Assert.assertEquals("=aaaa", field.getText()); |
||||
|
||||
field.setText("bbbb"); |
||||
BaseFormula formula = field.getValue(); |
||||
Assert.assertEquals("bbbb", formula.getPureContent()); |
||||
} |
||||
|
||||
} |
@ -1,12 +1,19 @@
|
||||
package com.fr.van.chart.box.data.table; |
||||
|
||||
import com.fr.chart.chartdata.OneValueCDDefinition; |
||||
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
||||
import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane; |
||||
import com.fr.plugin.chart.box.data.VanBoxOneValueCDDefinition; |
||||
|
||||
import java.awt.Dimension; |
||||
|
||||
public class BoxPlotTableSeriesNameUseFieldValuePane extends SeriesNameUseFieldValuePane { |
||||
|
||||
protected OneValueCDDefinition createOneValueCDDefinition() { |
||||
return new VanBoxOneValueCDDefinition(); |
||||
} |
||||
|
||||
protected Dimension getLabelDimension() { |
||||
return new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue