ANIMATOR : Move PlayHeader 81/21781/1
authorjinwooim.bae <jinwooim.bae@samsung.com>
Wed, 28 May 2014 02:09:59 +0000 (11:09 +0900)
committerjinwooim.bae <jinwooim.bae@samsung.com>
Wed, 28 May 2014 02:09:59 +0000 (11:09 +0900)
During a play time of a page beyond the mask, move the other page.

Change-Id: Id3310939139aa5d6cf8a79978b758f04dff76e4b
Signed-off-by: jinwooim.bae <jinwooim.bae@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/animator/ui/views/timeline/TimelineContentContainer.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/animator/ui/views/timeline/tool/TimelineToolbar.java

index 7d6a3cd..8def9da 100644 (file)
@@ -378,6 +378,37 @@ public class TimelineContentContainer extends Composite {
     }
 
     /**
+     * Refresh HScroll Current Time
+     * 
+     * @param currentPointTime
+     */
+    public void refreshHCurrentScroll (int currentPointTime) {
+        TimeBar timeBar = contentHeaderContainer.getKeyframeHeader().getTimeBar();
+        ScrollBar hScroll = contentToolsContainer.gethScroll();
+        
+        int startTime = timeBar.getStartTime();
+        Point timeBarSize = timeBar.getSize();
+        double scale = timeBar.getScale();
+        int lastTime = (int) (timeBarSize.x * TimelineConstants.DEFAULT_TIME_INTERVAL / scale);
+        int fullTime = startTime + lastTime;
+        
+        if(fullTime - 30 <= currentPointTime) {
+
+            int lastTimeSel = hScroll.getSelection() + 1;
+            hScroll.setSelection(lastTimeSel);
+
+            // start Time
+            startTime += lastTime - 30;
+
+            timeBar.setStartTime(startTime);
+            timeBar.redraw();
+
+            // loop setting timeElement
+            refeshTimeline();
+        }
+    }
+    
+    /**
      * Show tree item set vertical scroll origin
      * 
      * @param item
index 441ce50..50a2601 100644 (file)
@@ -1018,6 +1018,7 @@ public class TimelineToolbar extends Composite implements IAnimationListener {
             setCurrentTime(time);
             timeText.redraw();
 
+            mainContainer.getContentContainer().refreshHCurrentScroll(millSecond);
         }
     }