Browse Source

刚发现添加了一个CellFormulaQuickEditor,这样文字和公式可以分开了

master
vito 7 years ago
parent
commit
65c38b21d2
  1. 7
      designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java
  2. 7
      designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java

7
designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

@ -3,6 +3,8 @@ package com.fr.quickeditor.cellquick;
import com.fr.base.Formula;
import com.fr.base.Style;
import com.fr.base.TextFormat;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.FormulaCellAction;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
@ -77,6 +79,11 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
return content;
}
@Override
public Object getComboBoxSelected() {
return ActionFactory.createAction(FormulaCellAction.class);
}
private void changeReportPaneCell(String tmpText) {
isEditing = true;

7
designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java

@ -3,8 +3,6 @@ package com.fr.quickeditor.cellquick;
import com.fr.base.Formula;
import com.fr.base.Style;
import com.fr.base.TextFormat;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.FormulaCellAction;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.grid.selection.CellSelection;
import com.fr.quickeditor.CellQuickEditor;
@ -25,7 +23,6 @@ import java.awt.event.KeyEvent;
*/
public class CellStringQuickEditor extends CellQuickEditor {
private Object selectedItem;
//instance
private static CellStringQuickEditor THIS;
//文本域
@ -101,7 +98,6 @@ public class CellStringQuickEditor extends CellQuickEditor {
textFormula.setReserveInResult(reserveInResult);
textFormula.setReserveOnWriteOrAnaly(reserveOnWriteOrAnaly);
cellElement.setValue(textFormula);
selectedItem = ActionFactory.createAction(FormulaCellAction.class);
} else {
Style style = cellElement.getStyle();
if (style != null && style.getFormat() != null && style.getFormat() == TextFormat.getInstance()) {
@ -109,7 +105,6 @@ public class CellStringQuickEditor extends CellQuickEditor {
} else {
cellElement.setValue(ReportHelper.convertGeneralStringAccordingToExcel(tmpText));
}
selectedItem = null;
}
fireTargetModified();
stringTextField.requestFocus();
@ -158,7 +153,7 @@ public class CellStringQuickEditor extends CellQuickEditor {
@Override
public Object getComboBoxSelected() {
return selectedItem;
return null;
}
}
Loading…
Cancel
Save