Browse Source

REPORT-80690 批量操作单元格

【问题原因】
【改动思路】增加批量操作单元格功能
【review建议】
feature/x
Leo.Qin 2 years ago
parent
commit
aca1701772
  1. 6
      designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java
  2. 6
      designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

6
designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java

@ -68,7 +68,7 @@ public abstract class AbstractCellElementAction extends CellSelectionAction {
if (isNeedShinkToFit()) { if (isNeedShinkToFit()) {
// shink to fit.(如果value是String) // shink to fit.(如果value是String)
Object editElementValue = editCellElement.getValue(); Object editElementValue = editCellElement.getValue();
if (editElementValue != null && (editElementValue instanceof String || editElementValue instanceof Number)) { if (checkValueType(editElementValue)) {
// TODO ALEX_SEP 暂时用FIT_DEFAULT替代,不取reportsetting里面的设置,因为也不知道是应该放在report里面还是elementcase里面 // TODO ALEX_SEP 暂时用FIT_DEFAULT替代,不取reportsetting里面的设置,因为也不知道是应该放在report里面还是elementcase里面
GridUtils.shrinkToFit(ReportConstants.AUTO_SHRINK_TO_FIT_DEFAULT, tplEC, editCellElement); GridUtils.shrinkToFit(ReportConstants.AUTO_SHRINK_TO_FIT_DEFAULT, tplEC, editCellElement);
} }
@ -78,6 +78,10 @@ public abstract class AbstractCellElementAction extends CellSelectionAction {
} }
ePane.fireTargetModified(); ePane.fireTargetModified();
} }
private boolean checkValueType(Object editElementValue) {
return editElementValue instanceof String || editElementValue instanceof Number;
}
}); });
//控件设置记住dlg,提交入库智能添加单元格后可以show出来 //控件设置记住dlg,提交入库智能添加单元格后可以show出来
DesignerContext.setReportWritePane(dialog); DesignerContext.setReportWritePane(dialog);

6
designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

@ -82,7 +82,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
*/ */
protected UITextField columnRowTextField; protected UITextField columnRowTextField;
protected TemplateCellElement cellElement; protected TemplateCellElement cellElement;
protected TextFormatPane formatPane; private TextFormatPane formatPane;
private final JPanel topContentContainer; private final JPanel topContentContainer;
private final JComponent centerBodyContainer; private final JComponent centerBodyContainer;
@ -437,6 +437,10 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
return columnRowTextField; return columnRowTextField;
} }
/**
* 创建格式化面板
* @return
*/
private JPanel createFormatPane() { private JPanel createFormatPane() {
formatPane = new TextFormatPane(); formatPane = new TextFormatPane();
AbstractAttrNoScrollPane container = new AbstractAttrNoScrollPane() { AbstractAttrNoScrollPane container = new AbstractAttrNoScrollPane() {

Loading…
Cancel
Save