Browse Source
* commit 'b9fcc636b6cdf8ebdecedf959caee8fb714f7d0e': 增加词云的数据配置 有助于理解计算的开发工作 柱形图数据配置界面少了一点 上次处理代码质量出的bugresearch/10.0
zheng
6 years ago
8 changed files with 185 additions and 43 deletions
@ -0,0 +1,20 @@
|
||||
package com.fr.design.chartx; |
||||
|
||||
import com.fr.design.chartx.fields.diff.WordCloudCellDataFieldsPane; |
||||
import com.fr.design.chartx.fields.diff.WordCloudDataSetFieldsPane; |
||||
import com.fr.design.chartx.single.SingleDataPane; |
||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||
|
||||
/** |
||||
* Created by shine on 2019/5/22. |
||||
*/ |
||||
public class WordCloudChartDataPane extends MultiCategoryChartDataPane { |
||||
public WordCloudChartDataPane(AttributeChangeListener listener) { |
||||
super(listener); |
||||
} |
||||
|
||||
@Override |
||||
protected SingleDataPane createSingleDataPane() { |
||||
return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane()); |
||||
} |
||||
} |
@ -1,20 +0,0 @@
|
||||
package com.fr.design.chartx; |
||||
|
||||
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane; |
||||
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane; |
||||
import com.fr.design.chartx.single.SingleDataPane; |
||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||
|
||||
/** |
||||
* Created by shine on 2019/5/22. |
||||
*/ |
||||
public class WordCloundChartDataPane extends MultiCategoryChartDataPane { |
||||
public WordCloundChartDataPane(AttributeChangeListener listener) { |
||||
super(listener); |
||||
} |
||||
|
||||
@Override |
||||
protected SingleDataPane createSingleDataPane() { |
||||
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane()); |
||||
} |
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.design.chartx.fields.diff; |
||||
|
||||
import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection; |
||||
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; |
||||
import com.fr.design.formula.TinyFormulaPane; |
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.design.i18n.Toolkit; |
||||
|
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* Created by shine on 2019/6/18. |
||||
*/ |
||||
public class WordCloudCellDataFieldsPane extends AbstractCellDataFieldsPane<WordCloudColumnFieldCollection> { |
||||
|
||||
private UITextField name; |
||||
private TinyFormulaPane wordName; |
||||
private TinyFormulaPane wordValue; |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
name = new UITextField(); |
||||
wordName = new TinyFormulaPane(); |
||||
wordValue = new TinyFormulaPane(); |
||||
|
||||
super.initComponents(); |
||||
} |
||||
|
||||
@Override |
||||
protected String[] fieldLabels() { |
||||
return new String[]{ |
||||
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), |
||||
Toolkit.i18nText("Fine-Design_Chart_Word_Name"), |
||||
Toolkit.i18nText("Fine-Design_Chart_Word_Value") |
||||
}; |
||||
} |
||||
|
||||
@Override |
||||
protected TinyFormulaPane[] formulaPanes() { |
||||
return new TinyFormulaPane[]{ |
||||
wordName, |
||||
wordValue |
||||
}; |
||||
} |
||||
|
||||
@Override |
||||
protected Component[] fieldComponents() { |
||||
return new Component[]{ |
||||
name, |
||||
wordName, |
||||
wordValue |
||||
}; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(WordCloudColumnFieldCollection ob) { |
||||
name.setText(ob.getTargetName()); |
||||
populateField(wordName, ob.getWordName()); |
||||
populateField(wordValue, ob.getWordValue()); |
||||
} |
||||
|
||||
@Override |
||||
public WordCloudColumnFieldCollection updateBean() { |
||||
WordCloudColumnFieldCollection result = new WordCloudColumnFieldCollection(); |
||||
result.setTargetName(name.getText()); |
||||
updateField(wordName, result.getWordName()); |
||||
populateField(wordValue, result.getWordValue()); |
||||
return result; |
||||
} |
||||
} |
@ -0,0 +1,74 @@
|
||||
package com.fr.design.chartx.fields.diff; |
||||
|
||||
import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection; |
||||
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; |
||||
|
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* Created by shine on 2019/6/18. |
||||
*/ |
||||
public class WordCloudDataSetFieldsPane extends AbstractDataSetFieldsPane<WordCloudColumnFieldCollection> { |
||||
private UITextField name; |
||||
private UIComboBox wordName; |
||||
private UIComboBox wordValue; |
||||
private CalculateComboBox calculateCombox; |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
name = new UITextField(); |
||||
wordName = new UIComboBox(); |
||||
wordValue = new UIComboBox(); |
||||
calculateCombox = new CalculateComboBox(); |
||||
|
||||
super.initComponents(); |
||||
} |
||||
|
||||
@Override |
||||
protected String[] fieldLabels() { |
||||
return new String[]{ |
||||
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), |
||||
Toolkit.i18nText("Fine-Design_Chart_Word_Name"), |
||||
Toolkit.i18nText("Fine-Design_Chart_Word_Value"), |
||||
Toolkit.i18nText("Fine-Design_Chart_Summary_Method") |
||||
}; |
||||
} |
||||
|
||||
@Override |
||||
protected UIComboBox[] filedComboBoxes() { |
||||
return new UIComboBox[]{ |
||||
wordName, |
||||
wordValue |
||||
}; |
||||
} |
||||
|
||||
@Override |
||||
protected Component[] fieldComponents() { |
||||
return new Component[]{ |
||||
name, |
||||
wordName, |
||||
wordValue, |
||||
calculateCombox |
||||
}; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(WordCloudColumnFieldCollection ob) { |
||||
name.setText(ob.getTargetName()); |
||||
populateField(wordName, ob.getWordName()); |
||||
populateFunctionField(wordValue, calculateCombox, ob.getWordValue()); |
||||
} |
||||
|
||||
@Override |
||||
public WordCloudColumnFieldCollection updateBean() { |
||||
WordCloudColumnFieldCollection result = new WordCloudColumnFieldCollection(); |
||||
result.setTargetName(name.getText()); |
||||
updateField(wordName, result.getWordName()); |
||||
updateFunctionField(wordValue, calculateCombox, result.getWordValue()); |
||||
return result; |
||||
} |
||||
} |
Loading…
Reference in new issue