Implements merge/split keyframe when keyframe is edited by user from timeline view including undo/redo
Change-Id: Ie4825a47310665dc1704d575066d8aecdc60ce72
Signed-off-by: seongwon.shim <seongwon.shim@samsung.com>
public static final String MODEL_ID_PREFIX_ANIMATION = "TizenAnimation";
public static final String MODEL_ID_PREFIX_SELECTOR = "TizenSelector";
public static final String MODEL_ID_PREFIX_KEYFRAME = "TizenKeyframe";
+ public static final String MODEL_ID_PREFIX_FRAME = "TizenFrame";
public static final String MODEL_ID_PREFIX_TRIGGER = "TizenTrigger";
public static final String MODEL_ID_PREFIX_ACTION = "TizenAction";
import org.tizen.webuibuilder.animator.model.AnimatorTrigger;
import org.tizen.webuibuilder.animator.model.part.AnimatorPagePart;
import org.tizen.webuibuilder.animator.model.part.AnimatorPart;
+import org.tizen.webuibuilder.animator.utils.AnimatorUtils;
import org.tizen.webuibuilder.ui.views.properties.action.ActionAnimationGroupComposite.ActionAnimationGroupTypes;
if (afterActionAnimation == null) {
afterActionAnimation =
pagePart
- .createAnimatorActionAnimation(groupId,
+ .createAnimatorActionAnimation(AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(),
+ groupId,
convertActionAnimationGroupTypes(type),
time, trigger);
}
import org.tizen.webuibuilder.animator.model.AnimatorTrigger;
import org.tizen.webuibuilder.animator.model.part.AnimatorPagePart;
import org.tizen.webuibuilder.animator.model.part.AnimatorPart;
+import org.tizen.webuibuilder.animator.utils.AnimatorUtils;
import org.tizen.webuibuilder.ui.views.properties.action.ActionAnimationGroupComposite.ActionAnimationGroupTypes;
if (actionAnimation == null) {
actionAnimation =
pagePart
- .createAnimatorActionAnimation(groupId,
+ .createAnimatorActionAnimation(AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(),
+ groupId,
convertActionAnimationGroupTypes(type),
time, trigger);
}
import java.util.Map;
import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.sse.core.internal.model.ModelManagerImpl;
import org.tizen.webuibuilder.animator.model.AnimatorFrame;
import org.tizen.webuibuilder.animator.model.AnimatorKeyframe;
import org.tizen.webuibuilder.animator.model.AnimatorModelEvent;
if(frame == null) {
keyframe = currentSelector.getCurrentKeyframe(currentTime);
if (keyframe == null) {
- keyframe = currentSelector.createKeyframe("custom", currentTime);
+ keyframe = currentSelector.createKeyframe(animatorModelManager.getModelFactory(), "custom", currentTime);
currentSelector.addChild(keyframe);
isKeyframeCreate = true;
}
- frame = keyframe.createAnimatorFrame(currentTime);
+ frame = keyframe.createAnimatorFrame(animatorModelManager.getModelFactory(), currentTime);
keyframe.addChild(frame, false);
isFrameCreate = true;
} else {
if (frame != null) {
AnimatorKeyframe keyframe = (AnimatorKeyframe)frame.getParent();
if (keyframe != null) {
- frame.removeOrReplaceProperties(oldProperties, properties);
+ frame.removeOrReplaceProperties(animatorModelManager.getModelFactory(), oldProperties, properties);
//It is possible that keyframe has been changed in removeOrReplaceProperties
keyframe = (AnimatorKeyframe)frame.getParent();
if(frames == null) {
frames = animatorModelManager.getPredefinedAnimationFactory()
.createPredefinedFrames(preDefinedAnimationDescriptor, delay);
- keyframe = currentSelector.createKeyframe(preDefinedAnimationDescriptor.getDisplayName(), delay);
+ keyframe = currentSelector.createKeyframe(animatorModelManager.getModelFactory(), preDefinedAnimationDescriptor.getDisplayName(), delay);
} else {
for(AnimatorFrame frame : frames) {
currentSelector.removeChild(keyframe);
}
- currentSelector.mergeOrSplitKeyframe();
+// currentSelector.mergeOrSplitKeyframe(animatorModelManager.getModelFactory());
currentSelector.updateSelectorTime();
currentSelector.setKeyframeNames(names);
AnimatorModelEvent.EventType.SELECTOR_REFRESH, Origin.PROPERTY, currentSelector);*/
AnimatorModelManager animatorModelManager = AnimatorUtils.getAppManager().getAnimatorModelManager();
- frame.removeOrReplaceProperty(Key, oldValue);
+ frame.removeOrReplaceProperty(animatorModelManager.getModelFactory(), Key, oldValue);
animatorModelManager.fireEvent(AnimatorModelEvent.EventType.FRAME_EDIT, Origin.PROPERTY,
frame);
}
pagePart.findAnimatorSelector(AnimatorUtils.getActiveAnimatorBrowserViewer()
.getCurrentAnimationGroupId(), part.getPropertyValue("id"), part.getUiSelector());
- AnimationPathModel test = new AnimationPathModel(selector);
+ AnimationPathModel test = new AnimationPathModel(
+ AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(), selector);
editpart.setModel(test);
editpart.setParent(this);
editpart.setSelected(SELECTED);
pagePart.findAnimatorSelector(AnimatorUtils.getActiveAnimatorBrowserViewer()
.getCurrentAnimationGroupId(), part.getPropertyValue("id"), part.getUiSelector());
- AnimationPathModel test = new AnimationPathModel(selector);
+ AnimationPathModel test = new AnimationPathModel(
+ AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(), selector);
editpart.setModel(test);
editpart.refresh();
}
* The Class AnimationPathModel.
*/
public class AnimationPathModel implements IPropertySource {
+ private AnimatorModelFactory modelFactory = null;
private AnimatorSelector selector;
private List<AnimationPathKeyframe> keyframes = null;
* @param selector
* the selector
*/
- public AnimationPathModel(AnimatorSelector selector) {
+ public AnimationPathModel(AnimatorModelFactory modelFactory, AnimatorSelector selector) {
+ this.modelFactory = modelFactory;
this.selector = selector;
this.keyframes = getPathPointsFromAnimatorKeyFrame(selector);
}
*
* @return the css keyframes
*/
- public List<AnimatorFrame> getCssKeyframes(AnimatorModelFactory modelFactory) {
+ public List<AnimatorFrame> getCssKeyframes() {
List<AnimatorFrame> frames = new ArrayList<AnimatorFrame>();
WidgetPosition widgetPosition = selector.getPartLink().getWidgetPosition();
int top = translateInDesigner.height;
int i = 0;
- List<AnimatorFrame> mergedFrames = selector.getMergedFramesWithWidgetProperty();
+ List<AnimatorFrame> mergedFrames = selector.getMergedFramesWithWidgetProperty(modelFactory);
Set<String> propertiesUsed = selector.getAllPropertiesUsed(mergedFrames);
for (AnimatorFrame frame : mergedFrames) {
int left = translateInDesigner.width;
int top = translateInDesigner.height;
- int width = selector.getPartLink().getPositionProperty().width;
- int height = selector.getPartLink().getPositionProperty().height;
+ int width = widgetPosition.width;
+ int height = widgetPosition.height;
/*
* Hard coding origin origin is displayed in css : ex) -webkit-transform-origin:-35% 50%;
int originX = 50;
int originY = 50;
- List<AnimatorFrame> frameList = selector.getMergedFramesWithWidgetProperty();
+ List<AnimatorFrame> frameList = selector.getMergedFramesWithWidgetProperty(modelFactory);
for (AnimatorModel frameElement : frameList) {
AnimatorFrame frame = ((AnimatorFrame) frameElement).getFrameLink();
properties.put(Constants.translateX, AnimatorUtils.convertPixToString(p.x));
properties.put(Constants.translateY, AnimatorUtils.convertPixToString(p.y));
- editingFrame.editProperties(properties);
+ editingFrame.editProperties(AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(), properties);
// editingFrame.addProperty(Constants.translateX,
// AnimatorUtils.convertPixToString(p.x));
*
* @param part
*/
- public void updateAnimatorWidget(Part part) {
- AnimatorModelManager manager = AnimatorUtils.getAppManager().getAnimatorModelManager();
+ public void updateAnimatorWidget(AnimatorModelManager manager, Part part) {
// Update current exist animatorWidget's PartLink
Iterator<AnimatorModel> iter = getChildren().iterator();
while (iter.hasNext()) {
}
// Create added animatorWidget by PagePart's children
- List<AnimatorModel> animaotrWidgets = updateAnimatorWidget(getId(), part.getChildren());
+ List<AnimatorModel> animaotrWidgets = updateAnimatorWidget(manager.getModelFactory(), getId(), part.getChildren());
if (animaotrWidgets.size() > 0) {
addChildren(animaotrWidgets);
manager.fireEvent(this, EventType.WIDGET_ADD, Origin.EDITOR, null, animaotrWidgets);
* @param partChildren
* @return List of AnimatorWidget
*/
- public List<AnimatorModel> composeAnimatorWidget(List<Part> partChildren) {
+ public List<AnimatorModel> composeAnimatorWidget(AnimatorModelFactory modelFactory, List<Part> partChildren) {
List<AnimatorModel> animatorWidgets = new ArrayList<AnimatorModel>();
for (Part partChild : partChildren) {
- AnimatorWidget animatorWidget = createAnimatorWidget(partChild);
+ AnimatorWidget animatorWidget = createAnimatorWidget(modelFactory, partChild);
animatorWidgets.add(animatorWidget);
if (partChild.getChildren().size() >= 1) {
List<AnimatorModel> childAnimatorWidgets =
- composeAnimatorWidget(partChild.getChildren());
+ composeAnimatorWidget(modelFactory, partChild.getChildren());
animatorWidgets.addAll(childAnimatorWidgets);
}
}
* @param part
* @return Created AnimatorWidget
*/
- public AnimatorWidget createAnimatorWidget(Part part) {
+ public AnimatorWidget createAnimatorWidget(AnimatorModelFactory modelFactory, Part part) {
- AnimatorWidget animatorWidget = (AnimatorWidget)getModelFactory()
+ AnimatorWidget animatorWidget = (AnimatorWidget)modelFactory
.createAnimatorModel(AnimatorModelType.WIDGET);
animatorWidget.setPartLink(part);
animatorWidget.setId(part.getPropertyValue("id"));
// FIXME - by returned value
AnimatorSelector animatorSelector =
- animatorWidget.createAnimatorSelector(part.getUiSelector());
+ animatorWidget.createAnimatorSelector(modelFactory, part.getUiSelector());
animatorWidget.addChild(animatorSelector);
}
return animatorWidget;
}
- private List<AnimatorModel> updateAnimatorWidget(String animationGroup, List<Part> partChildren) {
+ private List<AnimatorModel> updateAnimatorWidget(AnimatorModelFactory modelFactory, String animationGroup, List<Part> partChildren) {
List<AnimatorModel> animatorWidgets = new ArrayList<AnimatorModel>();
for (Part partChild : partChildren) {
}
if (!isExist) {
- AnimatorWidget animatorWidget = createAnimatorWidget(partChild);
+ AnimatorWidget animatorWidget = createAnimatorWidget(modelFactory, partChild);
animatorWidgets.add(animatorWidget);
}
if (partChild.getChildren().size() >= 1) {
List<AnimatorModel> childAnimatorWidgets =
- updateAnimatorWidget(animationGroup, partChild.getChildren());
+ updateAnimatorWidget(modelFactory, animationGroup, partChild.getChildren());
animatorWidgets.addAll(childAnimatorWidgets);
}
}
return animatorWidgets;
}
- public List<AnimatorModel> createAnimatorWidgetsForWidget(Part child) {
+ public List<AnimatorModel> createAnimatorWidgetsForWidget(AnimatorModelFactory modelFactory, Part child) {
List<AnimatorModel> widgetList = new ArrayList<AnimatorModel>();
- AnimatorWidget animatorWidget = createAnimatorWidget(child);
+ AnimatorWidget animatorWidget = createAnimatorWidget(modelFactory, child);
widgetList.add(animatorWidget);
for (Part part : child.getChildren()) {
- widgetList.addAll(createAnimatorWidgetsForWidget(part));
+ widgetList.addAll(createAnimatorWidgetsForWidget(modelFactory, part));
}
return widgetList;
public AnimatorCurveFrame() {
}
- public AnimatorCurveFrame cloneAnimatorCurveFrame() {
- AnimatorCurveFrame curveFrame = (AnimatorCurveFrame)getModelFactory().createAnimatorModel(AnimatorModelType.CURVEFRAME);
+ public AnimatorCurveFrame cloneAnimatorCurveFrame(AnimatorModelFactory modelFactory) {
+ AnimatorCurveFrame curveFrame = (AnimatorCurveFrame)modelFactory.cloneAnimatorModel(this);
cloneAnimatorModel(curveFrame);
curveFrame.setLocation(this.location.getCopy());
}
- public AnimatorFrame cloneAnimatorFrame() {
+ public AnimatorFrame cloneAnimatorFrame(AnimatorModelFactory modelFactory) {
- AnimatorFrame frame = (AnimatorFrame)getModelFactory().createAnimatorModel(AnimatorModelType.FRAME);
+ AnimatorFrame frame = (AnimatorFrame)modelFactory.cloneAnimatorModel(this);
cloneAnimatorModel(frame);
frame.setPredefined(isPredefined());
}
for (AnimatorCurveFrame curveFrame : getCurveFrames())
- frame.addCurveFrame(curveFrame.cloneAnimatorCurveFrame());
+ frame.addCurveFrame(curveFrame.cloneAnimatorCurveFrame(modelFactory));
return frame;
}
*
* @return frame
*/
- public AnimatorFrame cloneAnimatorFrameWithFrameLink() {
+ public AnimatorFrame cloneAnimatorFrameWithFrameLink(AnimatorModelFactory modelFactory) {
- AnimatorFrame frame = (AnimatorFrame)getModelFactory().createAnimatorModel(AnimatorModelType.FRAME);
+ AnimatorFrame frame = (AnimatorFrame)modelFactory.cloneAnimatorModel(this);
frame.setFrameTime(frameTime);
frame.setFrameLink(this);
}
for (AnimatorCurveFrame curveFrame : getCurveFrames())
- frame.addCurveFrame(curveFrame.cloneAnimatorCurveFrame());
+ frame.addCurveFrame(curveFrame.cloneAnimatorCurveFrame(modelFactory));
return frame;
}
*
* @param properties
*/
- public void editProperties(Map<String, String> properties) {
+ public void editProperties(AnimatorModelFactory modelFactory,
+ Map<String, String> properties) {
Iterator<Entry<String, String>> editingPropertiesIterator =
properties.entrySet().iterator();
while (editingPropertiesIterator.hasNext()) {
if (nextFrame != null) {
if (nextFrame.hasSamePropertyValue(this)) {
AnimatorKeyframe nextKeyframe =
- selector.createKeyframe("custom", nextFrame.getFrameTime());
+ selector.createKeyframe(modelFactory, "custom", nextFrame.getFrameTime());
keyframe.splitFrame(nextKeyframe, nextFrame, true);
selector.addChild(nextKeyframe);
}
if (previousFrame != null) {
if (previousFrame.hasSamePropertyValue(this)) {
AnimatorKeyframe previousKeyframe =
- selector.createKeyframe("custom", previousFrame.getFrameTime());
+ selector.createKeyframe(modelFactory, "custom", previousFrame.getFrameTime());
keyframe.splitFrame(previousKeyframe, this, true);
selector.addChild(previousKeyframe);
}
* @param key
* @param oldValue
*/
- public void removeOrReplaceProperty(String key, String oldValue) {
+ public void removeOrReplaceProperty(AnimatorModelFactory modelFactory, String key, String oldValue) {
AnimatorKeyframe keyframe = (AnimatorKeyframe) getParent();
String currentValue = getProperty(key);
addProperty(key, oldValue);
if (currentValue != null)
- keyframe.splitKeyframe(this);
+ keyframe.splitKeyframe(modelFactory, this);
}
/**
* @param oldProperties
* @param properties
*/
- public void removeOrReplaceProperties(Map<String, String> oldProperties,
+ public void removeOrReplaceProperties(AnimatorModelFactory modelFactory,
+ Map<String, String> oldProperties,
Map<String, String> properties) {
AnimatorKeyframe keyframe = (AnimatorKeyframe) getParent();
Iterator<Entry<String, String>> editingPropertiesIterator =
} else
removeProperty(editingPropertyKey);
}
- keyframe.splitKeyframe(this);
+ keyframe.splitKeyframe(modelFactory, this);
}
/**
* @param frame
* @param keyframe
*/
- public void findAnimatedPropertyAndSetInFrame(AnimatorFrame previousFrame, AnimatorFrame nextFrame) {
+ public void findAnimatedPropertyAndSetInFrame(AnimatorModelFactory modelFactory, AnimatorFrame previousFrame, AnimatorFrame nextFrame) {
if(previousFrame == null || nextFrame == null) {
return;
}
Point p;
p =
AnimationPathModel
- .findTranslateValueAtTime(getModelFactory(), getFrameTime(), previousFrame,
+ .findTranslateValueAtTime(modelFactory, getFrameTime(), previousFrame,
nextFrame,
AnimatorUtils.getEasingMethod(easingProperty));
}
- public AnimatorKeyframe cloneAnimatorKeyframe() {
- AnimatorKeyframe keyframe = (AnimatorKeyframe)getModelFactory().createAnimatorModel(AnimatorModelType.KEYFRAME);
+ public AnimatorKeyframe cloneAnimatorKeyframe(AnimatorModelFactory modelFactory) {
+ AnimatorKeyframe keyframe = (AnimatorKeyframe)modelFactory.cloneAnimatorModel(this);
cloneAnimatorModel(keyframe);
keyframe.setName(getName());
keyframe.setDelay(getDelay());
for(AnimatorModel model : getChildren()) {
- AnimatorFrame frame = ((AnimatorFrame)model).cloneAnimatorFrame();
+ AnimatorFrame frame = ((AnimatorFrame)model).cloneAnimatorFrame(modelFactory);
keyframe.addChild(frame);
}
*
* @param frame
*/
- public void splitKeyframe(AnimatorFrame frame) {
+ public void splitKeyframe(AnimatorModelFactory modelFactory, AnimatorFrame frame) {
AnimatorSelector selector = (AnimatorSelector) getParent();
AnimatorFrame nextFrame = (AnimatorFrame) getNextChild(frame);
if (nextFrame != null) {
if (nextFrame.hasSamePropertyValue(frame)) {
AnimatorKeyframe nextKeyframe =
- selector.createKeyframe("custom", frame.getFrameTime());
+ selector.createKeyframe(modelFactory, "custom", frame.getFrameTime());
splitFrame(nextKeyframe, nextFrame, true);
selector.addChild(nextKeyframe);
}
if (previousFrame != null) {
if (previousFrame.hasSamePropertyValue(frame)) {
AnimatorKeyframe currentKeyframe =
- selector.createKeyframe("custom", frame.getFrameTime());
+ selector.createKeyframe(modelFactory, "custom", frame.getFrameTime());
splitFrame(currentKeyframe, frame, true);
selector.addChild(currentKeyframe);
}
splitFrame(keyframe, nextFrame);
}
- public AnimatorFrame createAnimatorFrame(double currentTime) {
- AnimatorFrame frame = (AnimatorFrame)getModelFactory().createAnimatorModel(AnimatorModelType.FRAME);
+ public AnimatorFrame createAnimatorFrame(AnimatorModelFactory modelFactory, double currentTime) {
+ AnimatorFrame frame = (AnimatorFrame)modelFactory.createAnimatorModel(AnimatorModelType.FRAME);
frame.setFrameTime(currentTime);
frame.setParent(this);
}
- public List<AnimatorFrame> getClonedFrames() {
+ public List<AnimatorFrame> getClonedFrames(AnimatorModelFactory modelFactory) {
List<AnimatorFrame> frames = new ArrayList<AnimatorFrame>();
for(AnimatorModel model : getChildren()) {
AnimatorFrame frame = (AnimatorFrame)model;
- frames.add(frame.cloneAnimatorFrame());
+ frames.add(frame.cloneAnimatorFrame(modelFactory));
}
return frames;
}
-
- public void setChildrenByClonedAnimatorFrames(List<AnimatorModel> children) {
-
+ public AnimatorFrame getFrameById(String id) {
+ for(AnimatorModel model : getChildren()) {
+ AnimatorFrame frame = (AnimatorFrame)model;
+ if(frame.getId().equals(id)) {
+ return frame;
+ }
+ }
+ return null;
}
}
private AnimatorModel parent = null;
private List<AnimatorModel> children = new ArrayList<AnimatorModel>();
private Part partLink = null;
- private AnimatorModelFactory modelFactory = null;
private List<IAnimatorModelListener> animatorListeners =
new ArrayList<IAnimatorModelListener>();
return null;
}
- public AnimatorModelFactory getModelFactory() {
- return modelFactory;
- }
-
- public void setModelFactory(AnimatorModelFactory modelFactory) {
- this.modelFactory = modelFactory;
- }
-
/**
* Get child index
*
public AnimatorModelFactory(IDGenerator idGenerator) {
this.idGenerator = idGenerator;
}
-
- public AnimatorModel createAnimatorModel(AnimatorModelType modelType) {
+
+ public AnimatorModel createAnimatorModel(AnimatorModelType modelType, boolean isIdGenerate) {
AnimatorModel model = null;
switch(modelType) {
case ANIMATION:
model = new AnimatorAnimation();
- model.setId(idGenerator.generateAnimationId());
+ if(isIdGenerate) {
+ model.setId(idGenerator.generateAnimationId());
+ }
break;
case WIDGET:
model = new AnimatorWidget();
break;
case SELECTOR:
model = new AnimatorSelector();
- model.setId(idGenerator.generateSelectorId());
+ if(isIdGenerate) {
+ model.setId(idGenerator.generateSelectorId());
+ }
break;
case KEYFRAME:
model = new AnimatorKeyframe();
- model.setId(idGenerator.generateKeyframeId());
+ if(isIdGenerate) {
+ model.setId(idGenerator.generateKeyframeId());
+ }
break;
case FRAME:
model = new AnimatorFrame();
+ if(isIdGenerate) {
+ model.setId(idGenerator.generateframeId());
+ }
break;
case CURVEFRAME:
model = new AnimatorCurveFrame();
break;
case ACTION:
model = new AnimatorAction();
- model.setId(idGenerator.generateActionId());
+ if(isIdGenerate) {
+ model.setId(idGenerator.generateActionId());
+ }
break;
case ACTION_ANIMATION:
model = new AnimatorActionAnimation();
- model.setId(idGenerator.generateActionId());
+ if(isIdGenerate) {
+ model.setId(idGenerator.generateActionId());
+ }
break;
case ACTION_TIMER:
case ACTION_AUDIO:
case ACTION_VIDEO:
}
- if(model != null)
- model.setModelFactory(this);
-
return model;
}
+
+ public AnimatorModel createAnimatorModel(AnimatorModelType modelType) {
+ return createAnimatorModel(modelType, true);
+ }
+
+ public AnimatorModel cloneAnimatorModel(AnimatorModel model) {
+ AnimatorModelType modelType = null;
+ if(model instanceof AnimatorAnimation) {
+ modelType = AnimatorModelType.ANIMATION;
+ } else if(model instanceof AnimatorWidget) {
+ modelType = AnimatorModelType.WIDGET;
+ } else if(model instanceof AnimatorSelector) {
+ modelType = AnimatorModelType.SELECTOR;
+ } else if(model instanceof AnimatorKeyframe) {
+ modelType = AnimatorModelType.KEYFRAME;
+ } else if(model instanceof AnimatorFrame) {
+ modelType = AnimatorModelType.FRAME;
+ } else if(model instanceof AnimatorCurveFrame) {
+ modelType = AnimatorModelType.CURVEFRAME;
+ } else if(model instanceof AnimatorTrigger) {
+ modelType = AnimatorModelType.TRIGGER;
+ } else if(model instanceof AnimatorAction) {
+ modelType = AnimatorModelType.ACTION;
+ } else if(model instanceof AnimatorActionAnimation) {
+ modelType = AnimatorModelType.ACTION_ANIMATION;
+ }
+
+ AnimatorModel clonedModel = createAnimatorModel(modelType, false);
+ clonedModel.setId(model.getId());
+
+ return clonedModel;
+ }
}
*
* @param newRootPart
*/
- public void updateAnimatorModel(Part newRootPart) {
- Part oldRootPart = getAppManager().getPageDataSet().getBaseRootPart();
+ public void updateAnimatorModel(Part newRootPart, Part oldRootPart) {
if (!oldRootPart.equals(newRootPart)) {
for (Part oldPart : oldRootPart.getChildren()) {
for (Part newPart : newRootPart.getChildren()) {
AnimatorPart part = (AnimatorPart)newPart;
if (part.getPropertyValue("id").equals(oldPart.getPropertyValue("id"))) {
part.updateAnimatorTrigger((AnimatorPart)oldPart);
- ((AnimatorPagePart) newPart).updateAnimatorAnimation((AnimatorPagePart) oldPart);
+ ((AnimatorPagePart) newPart).updateAnimatorAnimation(this, (AnimatorPagePart) oldPart);
break;
}
}
}
- public AnimatorSelector cloneAnimatorSelector() {
- AnimatorSelector selector = (AnimatorSelector)getModelFactory().createAnimatorModel(AnimatorModelType.SELECTOR);
+ public AnimatorSelector cloneAnimatorSelector(AnimatorModelFactory modelFactory) {
+ AnimatorSelector selector = (AnimatorSelector)modelFactory.cloneAnimatorModel(this);
cloneAnimatorModel(selector);
selector.setSelector(getSelector());
selector.setHoldEnd(isHoldEnd());
for(AnimatorModel model : getChildren()) {
- AnimatorKeyframe clonedKeyframe = ((AnimatorKeyframe)model).cloneAnimatorKeyframe();
+ AnimatorKeyframe clonedKeyframe = ((AnimatorKeyframe)model).cloneAnimatorKeyframe(modelFactory);
selector.addChild(clonedKeyframe);
}
*
* @return all the frames used in this Selector
*/
- public List<AnimatorFrame> getMergedFrames() {
+ public List<AnimatorFrame> getMergedFrames(AnimatorModelFactory modelFactory) {
updateSelectorTime();
for (AnimatorModel frameModel : keyframe.getChildren()) {
AnimatorFrame frame = (AnimatorFrame) frameModel;
- AnimatorFrame newFrame = frame.cloneAnimatorFrameWithFrameLink();
+ AnimatorFrame newFrame = frame.cloneAnimatorFrameWithFrameLink(modelFactory);
newFrame.setFrameTime(calculateMergeFrameTime(keyframe.getCurrentTime(frame
.getFrameTime())));
return frames;
}
- public List<AnimatorFrame> getMergedFramesWithComputedProperty() {
- List<AnimatorFrame> mergedFrames = getMergedFrames();
+ public List<AnimatorFrame> getMergedFramesWithComputedProperty(AnimatorModelFactory modelFactory) {
+ List<AnimatorFrame> mergedFrames = getMergedFrames(modelFactory);
Set<String> propertiesUsed = getAllPropertiesUsed(mergedFrames);
Map<String, String> widgetProperties = getWidgetProperties(propertiesUsed);
return mergedFrames;
}
- public List<AnimatorFrame> getMergedFramesWithWidgetProperty() {
+ public List<AnimatorFrame> getMergedFramesWithWidgetProperty(AnimatorModelFactory modelFactory) {
- List<AnimatorFrame> mergedFrames = getMergedFramesWithComputedProperty();
+ List<AnimatorFrame> mergedFrames = getMergedFramesWithComputedProperty(modelFactory);
Set<String> propertiesUsed = getAllPropertiesUsed(mergedFrames);
Map<String, String> widgetProperties = getWidgetProperties(propertiesUsed);
* @param frameTime
* @return
*/
- public AnimatorKeyframe createKeyframe(String name, double frameTime) {
- AnimatorKeyframe keyframe = (AnimatorKeyframe)getModelFactory().createAnimatorModel(AnimatorModelType.KEYFRAME);
+ public AnimatorKeyframe createKeyframe(AnimatorModelFactory modelFactory, String name, double frameTime) {
+ AnimatorKeyframe keyframe = (AnimatorKeyframe)modelFactory.createAnimatorModel(AnimatorModelType.KEYFRAME);
keyframe.setName(name);
keyframe.setDuration(0.0);
keyframe.setDelay(frameTime);
return null;
}
+
+ public AnimatorFrame getAnimatorFrameById(String id) {
+ for(AnimatorModel model : getChildren()) {
+ AnimatorKeyframe keyframe = (AnimatorKeyframe)model;
+ AnimatorFrame frame = keyframe.getFrameById(id);
+ if(frame != null) {
+ return frame;
+ }
+ }
+
+ return null;
+ }
/**
* Merge Frame if two frame at same time If next frame has property that has previous frame,
}
- public boolean mergeOrSplitKeyframe() {
- boolean result = false;
+ public boolean mergeOrSplitKeyframe(AnimatorModelFactory modelFactory, List<AnimatorKeyframe> removedKeyframes) {
+ boolean result = false;
AnimatorFrame currentFrame = getNextAnimatorFrameByTime(null);
while(currentFrame != null) {
AnimatorKeyframe currentKeyframe = (AnimatorKeyframe)currentFrame.getParent();
AnimatorKeyframe expectedPreviousKeyframe = (AnimatorKeyframe)previousFrame.getParent();
if(previousFrame.hasSamePropertyValue(currentFrame)) {
if(expectedPreviousKeyframe.equals(currentKeyframe)) {
- AnimatorKeyframe newKeyframe =
- createKeyframe("custom", currentKeyframe.getDelay() + currentFrame.getFrameTime());
+ AnimatorKeyframe nextKeyframe = (AnimatorKeyframe)getNextChild(currentKeyframe);
+ if(nextKeyframe == null) {
+ nextKeyframe =
+ createKeyframe(modelFactory, "custom", currentKeyframe.getDelay() + currentFrame.getFrameTime());
+ addChild(nextKeyframe);
+ }
currentKeyframe.removeChild(currentFrame, true);
- newKeyframe.addChild(currentFrame, true);
- addChild(newKeyframe);
+ nextKeyframe.addChild(currentFrame, true);
result = true;
}
} else {
if(!previousFrame.getParent().equals(currentFrame.getParent())) {
currentKeyframe.removeChild(currentFrame, true);
expectedPreviousKeyframe.addChild(currentFrame, true);
+ if(currentKeyframe.getChildrenSize() == 0) {
+ removedKeyframes.add(currentKeyframe);
+ }
result = true;
}
}
builder.append("@-webkit-keyframes " + id + " {");
builder.append("\n");
builder.append("\t");
- List<AnimatorFrame> frames = new AnimationPathModel(this).getCssKeyframes(modelFactory);
+ List<AnimatorFrame> frames = new AnimationPathModel(modelFactory, this).getCssKeyframes();
Set<String> propertiesUsed = getAllPropertiesUsed(frames);
for (AnimatorModel frame : frames) {
return result;
}
- public AnimatorFrame createAnimatorFrame(double currentTime) {
+ public AnimatorFrame createAnimatorFrame(AnimatorModelFactory modelFactory, double currentTime) {
AnimatorKeyframe keyframe = getCurrentKeyframe(currentTime);
if (keyframe == null) {
- keyframe = createKeyframe("custom", currentTime);
+ keyframe = createKeyframe(modelFactory, "custom", currentTime);
addChild(keyframe);
}
- AnimatorFrame frame = keyframe.createAnimatorFrame(currentTime);
+ AnimatorFrame frame = keyframe.createAnimatorFrame(modelFactory, currentTime);
keyframe.addChild(frame, true);
return frame;
* @param currentTime
* @return
*/
- public AnimatorFrame createOrGetAnimatorFrame(double currentTime) {
+ public AnimatorFrame createOrGetAnimatorFrame(AnimatorModelFactory modelFactory, double currentTime) {
AnimatorFrame frame = null;
AnimatorKeyframe keyframe = getCurrentKeyframe(currentTime);
if (keyframe == null)
- keyframe = createKeyframe("custom", currentTime);
+ keyframe = createKeyframe(modelFactory, "custom", currentTime);
AnimatorFrame currentframe = keyframe.getFrameByCurrentTime(currentTime);
if (currentframe == null) {
- frame = keyframe.createAnimatorFrame(currentTime);
+ frame = keyframe.createAnimatorFrame(modelFactory, currentTime);
}
return frame;
}
return null;
}
+
+ public void rearrangementByAnimatorSelector(AnimatorModelManager modelManager, AnimatorSelector oldSelector, List<AnimatorKeyframe> removedKeyframes) {
+
+ for(AnimatorModel keyframeModel : oldSelector.getChildren()) {
+ AnimatorKeyframe oldKeyframe = (AnimatorKeyframe)keyframeModel;
+ for(AnimatorModel frameModel : oldKeyframe.getChildren()) {
+ AnimatorFrame oldFrame = (AnimatorFrame)frameModel;
+ Double currentTime = oldKeyframe.getDelay() + oldFrame.getFrameTime();
+ AnimatorFrame currentFrame = getAnimatorFrameById(oldFrame.getId());
+ if(currentFrame != null) {
+ AnimatorKeyframe currentKeyframe = (AnimatorKeyframe)currentFrame.getParent();
+ //oldKeyframe's id and currentKeyframe's id is not equal
+ //I means currentFrame has been moved to other keyframe
+ if(!oldKeyframe.getId().equals(currentKeyframe.getId())) {
+ //find keyframe that has same id with oldKeyframe from currentSelector
+ AnimatorKeyframe currentKeyframeById = null;
+ for(AnimatorModel currentKeyframeModel : getChildren()) {
+ AnimatorKeyframe candidateKeyframe = (AnimatorKeyframe)currentKeyframeModel;
+ if(candidateKeyframe.getId().equals(oldKeyframe.getId())) {
+ currentKeyframeById = candidateKeyframe;
+ break;
+ }
+ }
+ if(currentKeyframeById != null) {
+ //If there is keyframe that has same id
+ currentKeyframe.removeChild(currentFrame, true);
+ currentFrame.setFrameTime(currentTime);
+ currentKeyframeById.addChild(currentFrame, true);
+ } else {
+ //Keyframe has been removed
+ //find removedKeyframe list
+ for(AnimatorKeyframe removedKeyframe : removedKeyframes) {
+ if(removedKeyframe.getId().equals(oldKeyframe.getId())) {
+ currentKeyframeById = removedKeyframe;
+ break;
+ }
+ }
+
+ //if currentKeyframeById is still null
+ //it is.. not possible
+ if(currentKeyframeById == null) {
+ currentKeyframeById = (AnimatorKeyframe)modelManager.getModelFactory().cloneAnimatorModel(oldKeyframe);
+ }
+
+ currentKeyframe.removeChild(currentFrame, true);
+ currentFrame.setFrameTime(currentTime);
+ currentKeyframeById.addChild(currentFrame, false);
+ addChild(currentKeyframeById);
+// modelManager.fireEvent(true, this, AnimatorModelEvent.EventType.KEYFRAME_ADD,
+// AnimatorModelEvent.Origin.TIMELINE, currentKeyframeById);
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ public AnimatorKeyframe getAnimatorKeyframeById(String id) {
+ for(AnimatorModel model : getChildren()) {
+ AnimatorKeyframe currentKeyframeById = (AnimatorKeyframe)model;
+ if(currentKeyframeById.getId().equals(id)) {
+ return currentKeyframeById;
+ }
+ }
+ return null;
+ }
}
getParent().removeChild(this);
}
- public AnimatorActionAnimation createAnimatorActionAnimation(
+ public AnimatorActionAnimation createAnimatorActionAnimation(AnimatorModelFactory modelFactory,
AnimatorAnimation animation, String actionType, double time) {
AnimatorActionAnimation actionAnimation =
- (AnimatorActionAnimation)getModelFactory().createAnimatorModel(AnimatorModelType.ACTION_ANIMATION);
+ (AnimatorActionAnimation)modelFactory.createAnimatorModel(AnimatorModelType.ACTION_ANIMATION);
actionAnimation.setAnimation(animation);
actionAnimation.setActionType(actionType);
* @param widget
* @return
*/
- public AnimatorSelector createAnimatorSelector(String selector) {
+ public AnimatorSelector createAnimatorSelector(AnimatorModelFactory modelFactory, String selector) {
AnimatorSelector animatorSelector =
- (AnimatorSelector)getModelFactory().createAnimatorModel(AnimatorModelType.SELECTOR);
+ (AnimatorSelector)modelFactory.createAnimatorModel(AnimatorModelType.SELECTOR);
animatorSelector.setSelector(selector);
animatorSelector.setDelay(0.0);
animatorSelector.setDuration(0.0);
public String generateKeyframeId() {
return getIdOfMap(AnimatorConstants.MODEL_ID_PREFIX_KEYFRAME);
}
+
+ /**
+ * Generate frame id
+ *
+ * @return frame id
+ */
+ public String generateframeId() {
+ return getIdOfMap(AnimatorConstants.MODEL_ID_PREFIX_FRAME);
+ }
/**
* Generate action id
private void clearMap() {
idMap.clear();
}
-
- /**
- * Decrease animation id
- */
- public void decreaseAnimationId() {
- idMap.put(AnimatorConstants.MODEL_ID_PREFIX_ANIMATION,
- (int) idMap.get(AnimatorConstants.MODEL_ID_PREFIX_ANIMATION) - 1);
- }
-
- /**
- * Decrease selector id
- */
- public void decreaseSelectorId() {
- idMap.put(AnimatorConstants.MODEL_ID_PREFIX_SELECTOR,
- (int) idMap.get(AnimatorConstants.MODEL_ID_PREFIX_SELECTOR) - 1);
- }
-
- /**
- * Decrease keyframe id
- */
- public void decreaseKeyframeId() {
- idMap.put(AnimatorConstants.MODEL_ID_PREFIX_KEYFRAME,
- (int) idMap.get(AnimatorConstants.MODEL_ID_PREFIX_KEYFRAME) - 1);
- }
-
- /**
- * Decrease action id
- */
- public void decreaseActionId() {
- idMap.put(AnimatorConstants.MODEL_ID_PREFIX_ACTION,
- (int) idMap.get(AnimatorConstants.MODEL_ID_PREFIX_ACTION) - 1);
- }
}
return animationGroup;
}
- public void updateAnimatorAnimation(Part oldPagePart) {
+ public void updateAnimatorAnimation(AnimatorModelManager modelManager, Part oldPagePart) {
for (AnimatorModel model : ((AnimatorPagePart)oldPagePart).getAnimations()) {
AnimatorAnimation animation = (AnimatorAnimation) model;
animation.setPartLink(this);
- animation.updateAnimatorWidget(this);
+ animation.updateAnimatorWidget(modelManager, this);
addAnimation(animation);
}
}
createAnimatorAnimation(modelManager.getModelFactory());
List<AnimatorModel> makeAnimatorWidget =
- animationGroup.composeAnimatorWidget(getChildren());
+ animationGroup.composeAnimatorWidget(modelManager.getModelFactory(), getChildren());
animationGroup.setChildren(makeAnimatorWidget);
return animationGroup;
* @param child
* @return
*/
- public List<AnimatorModel> createAnimatorWidgetsForAllAnimations(Part child) {
+ public List<AnimatorModel> createAnimatorWidgetsForAllAnimations(AnimatorModelFactory modelFactory, Part child) {
List<AnimatorModel> widgetList = new ArrayList<AnimatorModel>();
for (AnimatorAnimation animation : getAnimations())
- widgetList.addAll(animation.createAnimatorWidgetsForWidget(child));
+ widgetList.addAll(animation.createAnimatorWidgetsForWidget(modelFactory, child));
return widgetList;
}
* @param clonedParts
* @return
*/
- public List<AnimatorModel> createAnimatorWidgetsForAllAnimations(List<Part> clonedParts) {
+ public List<AnimatorModel> createAnimatorWidgetsForAllAnimations(AnimatorModelFactory modelFactory, List<Part> clonedParts) {
List<AnimatorModel> widgetList = new ArrayList<AnimatorModel>();
for (AnimatorAnimation animation : getAnimations()) {
for (Part part : clonedParts) {
- widgetList.addAll(animation.createAnimatorWidgetsForWidget(part));
+ widgetList.addAll(animation.createAnimatorWidgetsForWidget(modelFactory, part));
}
}
* @param trigger
* @return
*/
- public AnimatorActionAnimation createAnimatorActionAnimation(String animationGroup,
+ public AnimatorActionAnimation createAnimatorActionAnimation(AnimatorModelFactory modelFactory,
+ String animationGroup,
String actionType, double time,
AnimatorTrigger trigger) {
AnimatorActionAnimation actionAnimation = null;
AnimatorAnimation animation = getAnimation(animationGroup);
if (animation != null) {
- actionAnimation = trigger.createAnimatorActionAnimation(animation, actionType, time);
+ actionAnimation = trigger.createAnimatorActionAnimation(modelFactory, animation, actionType, time);
}
return actionAnimation;
import org.tizen.webuibuilder.bridge.DesignerGoingBridge.WidgetPosition;
import org.tizen.webuibuilder.model.Part;
import org.tizen.webuibuilder.model.PartEvent;
-import org.tizen.webuibuilder.model.app.AppManager;
import org.tizen.webuibuilder.model.descriptors.PartDescriptor;
import com.google.gson.annotations.Expose;
double pointTime =\r
viewer.getMainContainer().getContentContainer().getContentHeaderContainer()\r
.getKeyframeHeader().getTimeBar().getPlayHeader().getCurrentPointTime();\r
- CompoundCommand command = new CompoundCommand();\r
+ CompoundCommand command = new CompoundCommand();
for (AnimatorModel selectorModel : children) {\r
AnimatorSelector selector = (AnimatorSelector) selectorModel;\r
for (AnimatorModel model : cloneModels) {\r
pointTime, null));\r
} else {\r
AnimatorKeyframe newKeyframe =\r
- selector.createKeyframe(keyframe.getName(), pointTime);\r
+ selector.createKeyframe(appManager.getAnimatorModelManager().getModelFactory(), \r
+ keyframe.getName(), pointTime);\r
List<AnimatorFrame> frames = new ArrayList<AnimatorFrame>();\r
for (AnimatorModel modelFrame : keyframe.getChildren()) {\r
AnimatorFrame frame = (AnimatorFrame) modelFrame;\r
- AnimatorFrame clonedFrame = frame.cloneAnimatorFrame();\r
+ AnimatorFrame clonedFrame = frame.cloneAnimatorFrame(\r
+ appManager.getAnimatorModelManager().getModelFactory());\r
clonedFrame.setParent(newKeyframe);\r
frames.add(clonedFrame);\r
}\r
.getProperties(),\r
AnimatorModelEvent.Origin.TIMELINE));\r
}\r
- }\r
+ }
}\r
\r
if (!command.isEmpty()) {\r
}
if(currentFrame == null) {
- currentFrame = currentSelector.createOrGetAnimatorFrame(currentTime);
+ currentFrame = currentSelector.createOrGetAnimatorFrame(animatorModelManager.getModelFactory(), currentTime);
}
//if there is a exist frame at the same current time currentFrame is null
if (!currentSelector.isExistKeyframe(keyframe)) {// case 1
currentSelector.addChild(keyframe);
} else {// case 2
- currentFrame.findAnimatedPropertyAndSetInFrame((AnimatorFrame) keyframe.getPrevChild(currentFrame),
+ currentFrame.findAnimatedPropertyAndSetInFrame(animatorModelManager.getModelFactory(), (AnimatorFrame) keyframe.getPrevChild(currentFrame),
(AnimatorFrame) keyframe.getNextChild(currentFrame));
}
if(!isExist) {
package org.tizen.webuibuilder.animator.ui.views.timeline.command;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
private double afterDuration = 0.0;
private AnimatorSelector currentSelector = null;
+ private AnimatorSelector oldSelector = null;
private List<String> names = null;
private AnimatorKeyframe keyframe = null;
+ private boolean isMerged = false;
+ private List<AnimatorKeyframe> removedKeyframes = null;
/**
* Construct
* @param start
* start Time
* @param duration
- * duratio Time
+ * duration Time
*/
public TimelineKeyframeEditCommand(AnimatorKeyframe keyframe, double start, double duration) {
this.beforeStart = keyframe.getDelay();
this.keyframe = keyframe;
this.currentSelector = (AnimatorSelector)keyframe.getParent();
this.names = currentSelector.getAnimatorKeyframeNames();
+ this.removedKeyframes = new ArrayList<AnimatorKeyframe>();
}
/*
AnimatorModelManager animatorModelManager = AnimatorUtils.getAppManager().getAnimatorModelManager();
+ keyframe = currentSelector.getAnimatorKeyframeById(keyframe.getId());
+
keyframe.setDelay(afterStart);
if (beforeDuration != afterDuration) {
currentSelector.removeChild(keyframe);
currentSelector.addChild(keyframe);
-
currentSelector.updateSelectorTime();
-// if(!currentSelector.mergeOrSplitKeyframe()) {
-//
- animatorModelManager.fireEvent(true, currentSelector,
- AnimatorModelEvent.EventType.KEYFRAME_EDIT, AnimatorModelEvent.Origin.TIMELINE, keyframe);
-// }
+
+ if(oldSelector == null) {
+ oldSelector = currentSelector.cloneAnimatorSelector(animatorModelManager.getModelFactory());
+ }
+
+ isMerged = currentSelector.mergeOrSplitKeyframe(animatorModelManager.getModelFactory(), removedKeyframes);
+
+ animatorModelManager.fireEvent(true, currentSelector,
+ AnimatorModelEvent.EventType.KEYFRAME_EDIT, AnimatorModelEvent.Origin.TIMELINE, keyframe);
+
}
/*
// animatorModelManager.fireEvent(true, currentSelector,
// AnimatorModelEvent.EventType.SELECTOR_REFRESH, AnimatorModelEvent.Origin.TIMELINE, currentSelector);
-
AnimatorModelManager animatorModelManager = AnimatorUtils.getAppManager().getAnimatorModelManager();
-
+
+ if(isMerged) {
+ currentSelector.rearrangementByAnimatorSelector(animatorModelManager, oldSelector, removedKeyframes);
+ }
+
+ keyframe = currentSelector.getAnimatorKeyframeById(keyframe.getId());
+
keyframe.setDelay(beforeStart);
if (beforeDuration != afterDuration) {
currentSelector.removeChild(keyframe);
currentSelector.addChild(keyframe);
-
currentSelector.updateSelectorTime();
-// if(!currentSelector.mergeOrSplitKeyframe()) {
- animatorModelManager.fireEvent(true, currentSelector,
- AnimatorModelEvent.EventType.KEYFRAME_EDIT, AnimatorModelEvent.Origin.TIMELINE, keyframe);
-// }
currentSelector.setKeyframeNames(names);
+
+ animatorModelManager.fireEvent(true, currentSelector,
+ AnimatorModelEvent.EventType.KEYFRAME_EDIT, AnimatorModelEvent.Origin.TIMELINE, keyframe);
}
}
\ No newline at end of file
if (animatorWidgetList.size() == 0) {
animatorWidgetList =
- ((AnimatorPagePart)child.getOwnerPage()).createAnimatorWidgetsForAllAnimations(child);
+ ((AnimatorPagePart)child.getOwnerPage()).createAnimatorWidgetsForAllAnimations(
+ AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(), child);
}
((AnimatorPagePart)child.getOwnerPage()).addAnimatorWidgets(animatorWidgetList, Origin.EDITOR);
if (animatorWidgetGroup.size() == 0)
animatorWidgetGroup =
- ((AnimatorPagePart)parentPart.getOwnerPage()).createAnimatorWidgetsForAllAnimations(clonedParts);
+ ((AnimatorPagePart)parentPart.getOwnerPage()).createAnimatorWidgetsForAllAnimations(
+ AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory(),clonedParts);
((AnimatorPagePart)parentPart.getOwnerPage()).addAnimatorWidgets(animatorWidgetGroup, Origin.EDITOR);
}
}
}
- setRootPart(appManager.getPageDataSet().getBaseRootPart());
+
GraphicalViewer viewer = getGraphicalViewer();
// viewer.setContents(appManager.getRootPart(currentPageIndex));
((HoverBrowserViewer) viewer).getRootEditPart().refresh();
AnimatorModelManager manager = appManager.getAnimatorModelManager();
- manager.updateAnimatorModel(getRootPart());
- manager.setPagePart((AnimatorPagePart) getRootPart().getChildren().get(0));
+ manager.updateAnimatorModel(appManager.getPageDataSet().getBaseRootPart(), getRootPart());
+ manager.setPagePart((AnimatorPagePart) appManager.getPageDataSet().getBaseRootPart().getChildren().get(0));
+
+ setRootPart(appManager.getPageDataSet().getBaseRootPart());
AnimatorBrowserViewer animatorViewer = getAnimatorViewer();
if (animatorViewer != null) {
if (animatorSelector == null) {
return null;
}
- List<AnimatorFrame> frameList = animatorSelector.getMergedFrames();
+ List<AnimatorFrame> frameList = animatorSelector.getMergedFrames(
+ AnimatorUtils.getAppManager().getAnimatorModelManager().getModelFactory());
double delayTime = animatorSelector.getDelay();
/* search current time */
double currentTime = AnimatorUtils.getActiveAnimatorBrowserViewer().getPointTime();