Browse Source

REPORT-27771 && REPORT-27493 && REPORT-27954

feature/big-screen
hades 4 years ago
parent
commit
9dde39c35a
  1. 11
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java
  2. 3
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  3. 30
      designer-realize/src/main/java/com/fr/design/actions/cell/NewPresentAction.java

11
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java

@ -33,9 +33,16 @@ public class TableDataManagerPane extends LoadingBasicPane {
);
}
tableDataPane = pane == null ? new TableDataPaneListPane() {
public void rename(String oldName, String newName) {
@Override
public void rename(final String oldName, final String newName) {
super.rename(oldName, newName);
renameConnection(oldName, newName);
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() {
renameConnection(oldName, newName);
return null;
}
};
}
} : pane;
container.add(tableDataPane.getPanel(), BorderLayout.CENTER);

3
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -5,6 +5,7 @@ import com.fr.base.PaperSize;
import com.fr.base.Parameter;
import com.fr.base.extension.FileExtension;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
import com.fr.design.actions.FormMobileAttrAction;
import com.fr.design.actions.TemplateParameterAction;
@ -12,6 +13,7 @@ import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.cell.FloatElementsProvider;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.designer.beans.actions.CopyAction;
import com.fr.design.designer.beans.actions.CutAction;
@ -587,6 +589,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
//下面这句话是防止撤销之后直接退出编辑再编辑撤销的东西会回来,因为撤销不会保存EC
formDesign.setElementCase(dataTable);
}
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}

30
designer-realize/src/main/java/com/fr/design/actions/cell/NewPresentAction.java

@ -9,9 +9,13 @@ import com.fr.general.GeneralUtils;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.StableUtils;
import java.awt.*;
public class NewPresentAction extends PresentCheckBoxAction {
private String itemName = null;
@ -28,10 +32,28 @@ public class NewPresentAction extends PresentCheckBoxAction {
if (!ComparatorUtils.equals(this.itemName, "NOPRESENT")) {
CellElementPropertyPane.getInstance().GoToPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Present"), this.itemName);
} else {
TemplateCellElement ce = getSelectedCellElement();
// 只有原来ce设置了形态的情况下才有undo操作
if (ce != null && ce.getPresent() != null) {
ce.setPresent(null);
ElementCasePane ePane = this.getEditingComponent();
TemplateElementCase elementCase = ePane.getEditingElementCase();
Selection sel = ePane.getSelection();
if (sel instanceof CellSelection) {
CellSelection cs = (CellSelection) sel;
int cellRectangleCount = cs.getCellRectangleCount();
for (int rect = 0; rect < cellRectangleCount; rect++) {
Rectangle cellRectangle = cs.getCellRectangle(rect);
for (int j = 0; j < cellRectangle.height; j++) {
for (int i = 0; i < cellRectangle.width; i++) {
int column = i + cellRectangle.x;
int row = j + cellRectangle.y;
TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row);
if (cellElement == null) {
cellElement = new DefaultTemplateCellElement(column, row);
elementCase.addCellElement(cellElement);
} else if (cellElement.getPresent() != null) {
cellElement.setPresent(null);
}
}
}
}
return true;
} else {
return false;

Loading…
Cancel
Save