From e237993b166f19b6c3af330bf3b40455d2fcb051 Mon Sep 17 00:00:00 2001 From: "youngduk.hwang" Date: Thu, 29 May 2014 14:36:14 +0900 Subject: [PATCH] PAGES: fixed the problem that the page name is not changed on the thunmnail page when a page ID is changed. Change-Id: I62e4965f4d9a9e599c9c0213fe9bc2e9d37bd545 Signed-off-by: youngduk.hwang --- .../tizen/webuibuilder/gef/editparts/HoverViewerEditPart.java | 4 ++++ .../src/org/tizen/webuibuilder/model/page/PageData.java | 6 +++++- .../tizen/webuibuilder/ui/views/pages/ThumbnailEditPart.java | 10 ++++++++++ .../org/tizen/webuibuilder/ui/views/pages/ThumbnailFigure.java | 4 ++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/editparts/HoverViewerEditPart.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/editparts/HoverViewerEditPart.java index e54e4c8..fd338ef 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/editparts/HoverViewerEditPart.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/editparts/HoverViewerEditPart.java @@ -210,6 +210,10 @@ public class HoverViewerEditPart extends AbstractGraphicalEditPart implements IP if(e.getPart() instanceof AnimatorWidgetPart) { ((AnimatorWidgetPart) e.getPart()).widgetPropertyEdit(); } +<<<<<<< Updated upstream +======= + +>>>>>>> Stashed changes } @Override diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/page/PageData.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/page/PageData.java index ba13da0..26efd98 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/page/PageData.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/page/PageData.java @@ -265,7 +265,8 @@ public class PageData implements IPartListener, ICssListener { } public String getName() { - return name; + return pagePart.getIdPropertyValue(); +// return name; } public PageDataPaths getPageDataPaths() { @@ -623,6 +624,9 @@ public class PageData implements IPartListener, ICssListener { element.removeAttribute(propertyName); } else { element.setAttribute(propertyName, value); + if(propertyName.equals(BuilderConstants.PROPERTY_ID)) { + setName(value); + } } // System.out.println("~~~~~~~~~~propertyChanged() no xpath " // + element + ", " + propertyName +"=" + value); diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailEditPart.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailEditPart.java index 2a5abfb..77569f4 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailEditPart.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailEditPart.java @@ -37,6 +37,7 @@ import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.gef.EditPolicy; import org.eclipse.gef.editparts.AbstractGraphicalEditPart; import org.eclipse.swt.widgets.Display; +import org.tizen.webuibuilder.BuilderConstants; import org.tizen.webuibuilder.browserwidget.ImageBufferedBrowser; import org.tizen.webuibuilder.browserwidget.ImageBufferedBrowserWidget.ContentsAreaChangedListener; import org.tizen.webuibuilder.gef.viewer.ImageBufferedBrowserProvider; @@ -210,6 +211,15 @@ public class ThumbnailEditPart extends AbstractGraphicalEditPart implements @Override public void propertyChanged(PartEvent e) { updateThumbnail(); + if( BuilderConstants.PROPERTY_ID.equals(e.getChangedProperty()) && + getFigure() instanceof ThumbnailFigure && + e.getPart() instanceof Part ) { + + Part part = (Part) e.getPart(); + if(part.isPagePart()) { + ((ThumbnailFigure) getFigure()).setPageId(part.getIdPropertyValue()); + } + } } @Override diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailFigure.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailFigure.java index 7ee358d..ee34870 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailFigure.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/views/pages/ThumbnailFigure.java @@ -173,5 +173,9 @@ public class ThumbnailFigure extends Figure implements MouseMotionListener { // public PointList getPolygonPoints() { // return polygonPoints; // } + + public void setPageId(String pageId) { + this.pageId = pageId; + } } -- 2.7.4