From 2c50ee981b85daf7483d335720996447448b0466 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 16 Jan 2017 10:43:17 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-1390=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=9C=A8=E9=80=89=E4=B8=AD=E2=80=9C=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=85=83=E7=B4=A0=E2=80=9D=E6=97=B6=EF=BC=8C=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=8F=B3=E4=BE=A7=E7=9A=84=E2=80=9C=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7=E8=A1=A8=E2=80=9D=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/CellElementPropertyPane.java | 13 ++++++++++++- .../src/com/fr/grid/selection/CellSelection.java | 6 ++++++ .../src/com/fr/grid/selection/FloatSelection.java | 6 ++++++ designer/src/com/fr/grid/selection/Selection.java | 2 ++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index fa602c8bd..d68bd7757 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -102,12 +102,23 @@ public class CellElementPropertyPane extends DockingView { return element; } + public void removeAll() { + this.remove(titlePane); + this.remove(cellElementEditPane); + } + + public void reInit(ElementCasePane ePane) { + this.add(titlePane, BorderLayout.NORTH); + this.add(cellElementEditPane, BorderLayout.CENTER); + cellElementEditPane.populate(ePane); + } + public void populate(ElementCasePane ePane) { TemplateElementCase elementCase = ePane.getEditingElementCase(); if (elementCase == null) { return; } - cellElementEditPane.populate(ePane); + ePane.getSelection().populatePropertyPane(ePane); } @Override diff --git a/designer/src/com/fr/grid/selection/CellSelection.java b/designer/src/com/fr/grid/selection/CellSelection.java index c08f87088..458d9fd29 100644 --- a/designer/src/com/fr/grid/selection/CellSelection.java +++ b/designer/src/com/fr/grid/selection/CellSelection.java @@ -18,6 +18,7 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.imenu.UIMenu; import com.fr.design.gui.imenu.UIPopupMenu; +import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane.Clear; import com.fr.design.mainframe.JTemplate; @@ -684,4 +685,9 @@ public class CellSelection extends Selection { editor.populate(tc); return editor; } + + @Override + public void populatePropertyPane(ElementCasePane ePane) { + CellElementPropertyPane.getInstance().reInit(ePane); + } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/selection/FloatSelection.java b/designer/src/com/fr/grid/selection/FloatSelection.java index 0c1b1fcb0..5f0be878c 100644 --- a/designer/src/com/fr/grid/selection/FloatSelection.java +++ b/designer/src/com/fr/grid/selection/FloatSelection.java @@ -20,6 +20,7 @@ import com.fr.design.cell.clipboard.CellElementsClip; import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.designer.TargetComponent; +import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; @@ -230,4 +231,9 @@ public class FloatSelection extends Selection { editor.populate(tc); return editor; } + + @Override + public void populatePropertyPane(ElementCasePane ePane) { + CellElementPropertyPane.getInstance().removeAll(); + } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/selection/Selection.java b/designer/src/com/fr/grid/selection/Selection.java index e7466b365..c12dda83b 100644 --- a/designer/src/com/fr/grid/selection/Selection.java +++ b/designer/src/com/fr/grid/selection/Selection.java @@ -87,6 +87,8 @@ public abstract class Selection implements FCloneable, Serializable , Selectable // //////////////////////////Just4CellSelection/////////////////////////////// public abstract boolean containsColumnRow(ColumnRow cr); + + public abstract void populatePropertyPane(ElementCasePane ePane); @Override