You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.0 KiB
66 lines
2.0 KiB
7 years ago
|
package com.fr.solution.plugin.design.formula.ui.type;
|
||
|
|
||
|
import com.fr.base.BaseFormula;
|
||
|
import com.fr.design.beans.FurtherBasicBeanPane;
|
||
|
import com.fr.design.gui.frpane.UIRadioPane;
|
||
|
import com.fr.solution.plugin.design.formula.ui.evt.OperateListener;
|
||
|
import com.fr.solution.plugin.design.formula.ui.type.impl.NormalFormulaPane;
|
||
|
import com.fr.solution.plugin.design.formula.ui.type.impl.ScriptFormulaPane;
|
||
|
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
|
||
|
public class CategoryFormulaPane extends UIRadioPane<BaseFormula>{
|
||
|
|
||
|
private static final long serialVersionUID = 6102846618673364636L;
|
||
|
private List<CommonEvent> events;
|
||
|
|
||
|
@Override
|
||
|
protected List<FurtherBasicBeanPane<? extends BaseFormula>> initPaneList() {
|
||
|
List<FurtherBasicBeanPane<? extends BaseFormula>> list = new ArrayList<FurtherBasicBeanPane<? extends BaseFormula>>();
|
||
|
|
||
|
NormalFormulaPane normal = new NormalFormulaPane();
|
||
|
ScriptFormulaPane script = new ScriptFormulaPane();
|
||
|
|
||
|
list.add(normal);
|
||
|
list.add(script);
|
||
|
|
||
|
if (events == null) {
|
||
|
events = new ArrayList<CommonEvent>();
|
||
|
}
|
||
|
events.add(normal);
|
||
|
events.add(script);
|
||
|
|
||
|
return list;
|
||
|
}
|
||
|
|
||
|
public void onDoubleClick(String currentLineContent) {
|
||
|
events.get(cardNamesPane.getSelectedIndex()).onDoubleClick(currentLineContent);
|
||
|
}
|
||
|
|
||
|
public void onSingleClick() {
|
||
|
events.get(cardNamesPane.getSelectedIndex()).onSingleClick();
|
||
|
}
|
||
|
|
||
|
public void applyText(String text) {
|
||
|
events.get(cardNamesPane.getSelectedIndex()).applyText(text);
|
||
|
}
|
||
|
|
||
|
public void checkContentValid() {
|
||
|
events.get(cardNamesPane.getSelectedIndex()).checkContentValid();
|
||
|
}
|
||
|
|
||
|
public void onSearch() {
|
||
|
events.get(cardNamesPane.getSelectedIndex()).onSearch();
|
||
|
}
|
||
|
|
||
|
public void setOperateListener(OperateListener listener) {
|
||
|
events.get(cardNamesPane.getSelectedIndex()).setOperateListener(listener);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
protected String title4PopupWindow() {
|
||
|
return "Formula";
|
||
|
}
|
||
|
}
|