Refresh TimelineView in linux platform.
Change-Id: I0db42bd32d7f477082be6771c0cefe00abb83fd1
Signed-off-by: jinwooim.bae <jinwooim.bae@samsung.com>
/*
* (non-Javadoc)
+ * @see org.eclipse.gef.ui.parts.AbstractEditPartViewer#setContents(java.lang.Object)
+ */
+ public void setContents(Object contents) {
+ super.setContents(contents);
+ refreshTreeItem();
+ }
+
+ /**
+ * RefreshTreeItem
+ */
+ private void refreshTreeItem() {
+ if (Platform.getOS().equals(Platform.OS_LINUX)
+ || Platform.getOS().equals(Platform.OS_MACOSX)) {
+ Tree contentTree = (Tree)getControl();
+ TreeItem[] items = contentTree.getItems();
+
+ for(TreeItem item : items) {
+ TreeItem[] childItems = item.getItems();
+ if(item.getExpanded()) {
+ Event event = new Event();
+ event.item = item;
+ getControl().notifyListeners(SWT.Expand, event);
+ for(TreeItem childItem : childItems) {
+ TimeTreeElement element = (TimeTreeElement)childItem.getData("ReferentTreeWidget");
+ if(element != null) {
+ element.redraw();
+ }
+ }
+ } else {
+ Event event = new Event();
+ event.item = item;
+ getControl().notifyListeners(SWT.Collapse, event);
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
*
* @see
* org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers
TimelineEditPart pageEditPart = getPageEditPart();
pageEditPart.refresh();
- Tree contentTree = (Tree) getControl();
- contentTree.pack();
+ refreshTree();
+
+ refreshTreeItem();
// refreshTimelineViewer();
}
* Create Control
*/
private void createContents() {
-
-
-
+
int iterLationLeft = 10;
int iterSpinnerkHeight = 22;
int infinityLeft = 44;
} else if(Platform.getOS().equals(Platform.OS_LINUX) ||
Platform.getOS().equals(Platform.OS_MACOSX)) {
- iterLationLeft = 20;
+ iterLationLeft = 10;
iterSpinnerkHeight = 26;
infinityLeft = 20;
infinityWidth = 70;
.getKeyframeHeader().getTimeBar();
timeBar.setPosition(0);
+ timeBar.getPlayHeader().refreshPlayHeaderLine();
}
}
import org.tizen.webuibuilder.animator.ui.views.timeline.widget.KeyFrame;
import org.tizen.webuibuilder.animator.ui.views.timeline.widget.KeyFrameComponent;
import org.tizen.webuibuilder.animator.ui.views.timeline.widget.KeyFrameUnit;
+import org.tizen.webuibuilder.utility.Platform;
/**
} else {
int type = keyframe.getKeyFrameType();
if (type == KeyFrame.START_FRAME) {
- int afterPointTime = keyframe.getAfterPoint() * TimelineConstants.DEFAULT_TIME_INTERVAL;
+ int afterPointTime =
+ keyframe.getAfterPoint() * TimelineConstants.DEFAULT_TIME_INTERVAL;
int visibleTime = (int) (getVisibleStartTime() * scale);
- int currentSecondTime = (afterPointTime + visibleTime) / TimelineConstants.DEFAULT_TIME_INTERVAL;
+ int currentSecondTime =
+ (afterPointTime + visibleTime) / TimelineConstants.DEFAULT_TIME_INTERVAL;
currentSecond = (double) (currentSecondTime / timelineScalePoint);
} else {
currentSecond =
setBackground(ColorResource.CHILD_TREEITEM);
}
-/* e.gc.drawRectangle(timeElementClientArea.x, timeElementClientArea.y,
- timeElementClientArea.width -1, timeElementClientArea.height );*/
-
- e.gc.drawLine(timeElementClientArea.x, timeElementClientArea.height-1,
- timeElementClientArea.width*2, timeElementClientArea.height );
- e.gc.drawLine(timeElementClientArea.x , timeElementClientArea.y , timeElementClientArea.x,
- timeElementClientArea.height -1);
- e.gc.drawLine(timeElementClientArea.width -1 , timeElementClientArea.y , timeElementClientArea.width ,
- timeElementClientArea.height *2);
-
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ e.gc.drawLine(timeElementClientArea.x, timeElementClientArea.height - 1,
+ timeElementClientArea.width * 2, timeElementClientArea.height);
+ e.gc.drawLine(timeElementClientArea.x, timeElementClientArea.y,
+ timeElementClientArea.x, timeElementClientArea.height - 1);
+ e.gc.drawLine(timeElementClientArea.width - 1, timeElementClientArea.y,
+ timeElementClientArea.width, timeElementClientArea.height * 2);
+ } else if (Platform.getOS().equals(Platform.OS_LINUX)
+ || Platform.getOS().equals(Platform.OS_MACOSX)) {
+ e.gc.drawRectangle(timeElementClientArea.x, timeElementClientArea.y,
+ timeElementClientArea.width - 1,
+ timeElementClientArea.height - 1);
+ }
+
e.gc.setForeground(ColorResource.LATTICE);
refreshVisibleTime();
switch (KeyFrameType) {
case KeyFrame.START_FRAME: {
setMouseMoveReleasePoint(currentArea.x, xPoint);
-
+
int beforekeyframeEndPoint =
parentUnit.getKeyFrameUnitModelXpoint()
+ parentUnit.getKeyFrameUnitModelWidth()
return;
}
- selectedKeyFrame.setAfterPoint(mouseMoveReleasePoint+ TimelineConstants.DEFAULT_TIMELINE_LEFT_MARGIN);
+ selectedKeyFrame.setAfterPoint(mouseMoveReleasePoint
+ + TimelineConstants.DEFAULT_TIMELINE_LEFT_MARGIN);
int afterkeyframeWidth = beforekeyframeEndPoint - mouseMoveReleasePoint;
if (isSelectedControl == true) {
drawOutlineElement(e.gc, clientArea);
- /*
- * e.gc.drawRectangle(clientArea.x , clientArea.y, clientArea.width -1,
- * clientArea.height );
- */
- e.gc.drawLine(clientArea.x, clientArea.height - 1, clientArea.width * 2,
- clientArea.height);
- e.gc.drawLine(clientArea.x, clientArea.y, clientArea.x, clientArea.height - 1);
- e.gc.drawLine(clientArea.width - 1, clientArea.y, clientArea.width,
- clientArea.height * 2);
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ e.gc.drawLine(clientArea.x, clientArea.height - 1, clientArea.width * 2,
+ clientArea.height);
+ e.gc.drawLine(clientArea.x, clientArea.y, clientArea.x, clientArea.height - 1);
+ e.gc.drawLine(clientArea.width - 1, clientArea.y, clientArea.width,
+ clientArea.height * 2);
+ } else if (Platform.getOS().equals(Platform.OS_LINUX)
+ || Platform.getOS().equals(Platform.OS_MACOSX)) {
+ e.gc.drawRectangle(clientArea.x, clientArea.y, clientArea.width - 1,
+ clientArea.height - 1);
+ }
}
private void drawOutlineElement(GC gc, Rectangle clientArea) {
}
drawImageAndText(e.gc);
- /*e.gc.drawRectangle(clientArea.x, clientArea.y, clientArea.width -1,
- clientArea.height -1);*/
-
- e.gc.drawLine(clientArea.x , clientArea.height - 1 , clientArea.width*2,
- clientArea.height);
- e.gc.drawLine(clientArea.x , clientArea.y , clientArea.x,
- clientArea.height -1);
- e.gc.drawLine(clientArea.width -1 , clientArea.y , clientArea.width ,
- clientArea.height *2);
+
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ e.gc.drawLine(clientArea.x, clientArea.height - 1, clientArea.width * 2,
+ clientArea.height);
+ e.gc.drawLine(clientArea.x, clientArea.y, clientArea.x, clientArea.height - 1);
+ e.gc.drawLine(clientArea.width - 1, clientArea.y, clientArea.width,
+ clientArea.height * 2);
+ } else if (Platform.getOS().equals(Platform.OS_LINUX)
+ || Platform.getOS().equals(Platform.OS_MACOSX)) {
+ e.gc.drawRectangle(clientArea.x, clientArea.y, clientArea.width - 1,
+ clientArea.height - 1);
}
+ }
private void drawImageAndText(GC gc) {
int animationsMargine = 10;