From d6e3c6045c26bb8d3fb4b4cfe8bc03b2cdc8d913 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 5 Sep 2017 11:32:19 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1=E5=9C=A8?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=9A=84sheet=E5=88=87=E6=8D=A2=E4=B8=8D?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E7=BB=A7=E6=89=BF=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E7=BC=A9=E6=94=BE=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/ElementCasePane.java | 9 ++++++--- .../design/mainframe/ReportComponentComposite.java | 13 +++++++++++++ designer/src/com/fr/poly/PolyDesigner.java | 7 +++++-- .../src/com/fr/design/mainframe/JSliderPane.java | 4 ++++ .../src/com/fr/design/mainframe/FormArea.java | 6 +++--- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index a04de9538..1559c2352 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -1325,7 +1325,7 @@ public abstract class ElementCasePane extends Tar * @return 返回正在编辑的状态. */ public EditingState createEditingState() { - return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue()); + return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue(), this.resolution); } public void setCellNeedTOFormat(CellSelection selection) { @@ -1341,8 +1341,9 @@ public abstract class ElementCasePane extends Tar protected Selection selection; protected int verticalValue = 0; protected int horizontalValue = 0; + protected int resolution = ScreenResolution.getScreenResolution(); - protected ElementCaseEditingState(Selection selection, int verticalValue, int horizontalValue) { + protected ElementCaseEditingState(Selection selection, int verticalValue, int horizontalValue, int resolution) { try { this.selection = selection.clone(); } catch (CloneNotSupportedException e) { @@ -1350,6 +1351,7 @@ public abstract class ElementCasePane extends Tar } this.verticalValue = verticalValue; this.horizontalValue = horizontalValue; + this.resolution = resolution; } @Override @@ -1363,7 +1365,8 @@ public abstract class ElementCasePane extends Tar ElementCasePane.this.getVerticalScrollBar().setValue(this.verticalValue); ElementCasePane.this.getHorizontalScrollBar().setValue(this.horizontalValue); - +// ElementCasePane.this.setResolution(this.resolution); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(this.resolution); // 重绘. ElementCasePane.this.repaint(); } diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 41154d75b..b8749d128 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -120,12 +120,16 @@ public class ReportComponentComposite extends JComponent { EditingState reportPaneEditState = templateStateList.get(newIndex); if (reportPaneEditState != null) { reportPaneEditState.revert(); + updateJSlider(); } } else { while (templateStateList.size() <= newIndex) { templateStateList.add(null); } centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement()); + if (jSliderContainer != null){ + jSliderContainer.reset(); + } } if (centerCardPane.editingComponet.elementCasePane == null) { @@ -141,6 +145,15 @@ public class ReportComponentComposite extends JComponent { } } + private void updateJSlider(){ + if (centerCardPane.editingComponet.elementCasePane == null) { + jSliderContainer.getShowVal().setValue(centerCardPane.getPolyDezi().getResolution() * HUND / ScreenResolution.getScreenResolution()); + }else { + jSliderContainer.getShowVal().setValue(centerCardPane.editingComponet.elementCasePane.getResolution() * HUND / ScreenResolution.getScreenResolution()); + } + + } + /** * 移除选中状态 * diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index fcafd4c8c..ab311457f 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -687,14 +687,16 @@ public class PolyDesigner extends ReportComponent