/**
* A SetCssStyleAnimationPropertyCommand class
*/
-public class SetCssStyleAnimationPropertyCommand extends Command {
+public class AnimationPropertyChangeCommand extends Command {
private AnimatorFrame frame;
private String Key;
* @param key
* @param value
*/
- public SetCssStyleAnimationPropertyCommand(AnimatorFrame frame, String key, String value) {
+ public AnimationPropertyChangeCommand(AnimatorFrame frame, String key, String value) {
this(frame, key, value, true);
}
* @param value
* @param undoable
*/
- public SetCssStyleAnimationPropertyCommand(AnimatorFrame frame, String key, String value,
+ public AnimationPropertyChangeCommand(AnimatorFrame frame, String key, String value,
boolean undoable) {
this.frame = frame;
this.Key = key;
package org.tizen.webuibuilder.animator.model;
-import java.util.Map;
-import java.util.Set;
-
import org.tizen.webuibuilder.animator.AnimatorConstants;
import org.tizen.webuibuilder.animator.utils.AnimatorUtils;
* @param origin
* @param model
*/
- public void fireEvent(EventType event, Origin origin, AnimatorModel model) {
- if(rootPart instanceof AnimatorPart){
- ((AnimatorPart)rootPart).fireEvent(new AnimatorModelEvent(event, origin, model));
- }
+ public void fireEvent(EventType event, Origin origin, AnimatorModel model) {
+ eventSource.fireEvent(event, origin, model);
}
/**
* @param animatorProperty
*/
public void fireEvent(EventType event, Origin origin, AnimatorModel model,
- AnimatorProperty animatorProperty) {
- if(rootPart instanceof AnimatorPart){
- ((AnimatorPart)rootPart).fireEvent(new AnimatorModelEvent(event, origin, model, animatorProperty));
- }
+ AnimatorProperty animatorProperty) {
+ eventSource.fireEvent(event, origin, model, animatorProperty);
}
/**
*/
public void fireEvent(AnimatorModel fireModel, EventType event, Origin origin,
AnimatorModel model) {
- if (fireModel != null)
- fireModel.fireEvent(new AnimatorModelEvent(event, origin, model));
+ eventSource.fireEvent(fireModel, event, origin, model);
}
/**
*/
public void fireEvent(AnimatorModel fireModel, EventType event, Origin origin,
AnimatorModel model, List<AnimatorModel> widgets) {
- if (fireModel != null)
- fireModel.fireEvent(new AnimatorModelEvent(event, origin, widgets));
+ eventSource.fireEvent(fireModel, event, origin, model, widgets);
}
/**
*/
public void fireEvent(boolean fireRootPart, AnimatorModel fireModel, EventType eventType,
Origin origin, AnimatorModel model) {
- if (fireRootPart)
- fireEvent(eventType, origin, model);
-
- fireEvent(fireModel, eventType, origin, model);
+ eventSource.fireEvent(fireRootPart, fireModel, eventType, origin, model);
}
/******************************************************************************************************************
/**
* A EventFireDelegate interface
*/
-public interface EventFireDelegate {
+public interface EventFireDelegate {
public void fireEvent(EventType event, Origin origin, AnimatorModel model);
public void fireEvent(EventType event, Origin origin, AnimatorModel model,
public EventManager(AnimatorPart rootPart) {
this.rootPart = rootPart;
}
-
/**
* Fire event from rootPart
*
+++ /dev/null
-/*\r
- * UI Builder\r
- *\r
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- * Contributors:\r
- * - S-Core Co., Ltd\r
- *\r
- */\r
-\r
-\r
-package org.tizen.webuibuilder.animator.model;\r
-\r
-public class Frame {\r
-\r
-}
\ No newline at end of file
*/
public class IDGenerator {
private Map<String, Integer> idMap = new HashMap<String, Integer>();
- private static String animationIdMapKey = "Animation";
- private static String selectorIdMapKey = "Selector";
- private static String keyframeIdMapKey = "Keyframe";
- private static String actionIdMapKey = "Action";
public IDGenerator() {
+++ /dev/null
-/*
- * UI Builder
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-
-package org.tizen.webuibuilder.animator.model;
-
-import java.util.Map;
-import java.util.Set;
-
-
-public interface IWidgetPropertiesProvider {
- Map<String, String> getWidgetProperties(Set<String> propertiesUsed);
-}
+++ /dev/null
-/*\r
- * UI Builder\r
- *\r
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- * Contributors:\r
- * - S-Core Co., Ltd\r
- *\r
- */\r
-\r
-\r
-package org.tizen.webuibuilder.animator.model;\r
-\r
-public class Keyframe {\r
-\r
-}
\ No newline at end of file
+++ /dev/null
-/*
- * UI Builder
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-
-package org.tizen.webuibuilder.animator.model;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-
-public class Selector {
- private List<Keyframe> keyframes;
-
- /**
- * if there exists a frame in that time, no op else create new Keyframe
- *
- * @param time
- */
- public void addFrame(double time) {
-
- }
-
- public void changePropertyAtTime(String key, String value, double time) {
-
- }
-
- public Map<String, Properties> getMap() {
- return null;
- }
-
- public List<Keyframe> getKeyframes() {
- return keyframes;
- }
-
-}
+++ /dev/null
-/*
- * UI Builder
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-
-package org.tizen.webuibuilder.animator.model;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * A class that implements widget property provider
- */
-public class WidgetPropertiesProvider implements IWidgetPropertiesProvider {
-
- @Override
- public Map<String, String> getWidgetProperties(Set<String> propertiesUsed) {
- Map<String, String> properties = new HashMap<String, String>();
-
- return properties;
- }
-
-}
/**
* A class that implements deserializer for PagePart
*/
-public class PagePartDeserializer implements JsonDeserializer<AnimatorPagePart> {
+public class AnimatorPagePartDeserializer implements JsonDeserializer<AnimatorPagePart> {
private Part rootPart;
private List<AnimatorModelDeserializer<AnimatorModel>> deserializerList = null;
* @param part
* @param deserializerList
*/
- public PagePartDeserializer(Part part, List<AnimatorModelDeserializer<AnimatorModel>> deserializerList) {
+ public AnimatorPagePartDeserializer(Part part, List<AnimatorModelDeserializer<AnimatorModel>> deserializerList) {
this.rootPart = part;
this.deserializerList = deserializerList;
}
/**
* A class that implements deserializer for DocumentPart
*/
-public class DocumentPartDeserializer implements JsonDeserializer<AnimatorPart> {
+public class AnimatorPartDeserializer implements JsonDeserializer<AnimatorPart> {
/*
* (non-Javadoc)
/**
* A class that implements deserializer for WidgetPart
*/
-public class WidgetPartDeserializer extends AnimatorModelDeserializer<AnimatorModel> {
+public class AnimatorWidgetPartDeserializer extends AnimatorModelDeserializer<AnimatorModel> {
- public WidgetPartDeserializer() {
+ public AnimatorWidgetPartDeserializer() {
super();
}
- public WidgetPartDeserializer(AnimatorModelFactory modelFactory) {
+ public AnimatorWidgetPartDeserializer(AnimatorModelFactory modelFactory) {
super(modelFactory);
}
import org.tizen.webuibuilder.animator.model.deserializer.AnimatorSelectorDeserializer;
import org.tizen.webuibuilder.animator.model.deserializer.AnimatorTriggerDeserializer;
import org.tizen.webuibuilder.animator.model.deserializer.AnimatorWidgetDeserializer;
-import org.tizen.webuibuilder.animator.model.deserializer.DocumentPartDeserializer;
-import org.tizen.webuibuilder.animator.model.deserializer.PagePartDeserializer;
-import org.tizen.webuibuilder.animator.model.deserializer.WidgetPartDeserializer;
+import org.tizen.webuibuilder.animator.model.deserializer.AnimatorPartDeserializer;
+import org.tizen.webuibuilder.animator.model.deserializer.AnimatorPagePartDeserializer;
+import org.tizen.webuibuilder.animator.model.deserializer.AnimatorWidgetPartDeserializer;
import org.tizen.webuibuilder.animator.model.part.AnimatorPagePart;
import org.tizen.webuibuilder.animator.model.part.AnimatorPart;
import org.tizen.webuibuilder.animator.model.part.AnimatorWidgetPart;
AnimatorModelManager manager =
AnimatorModelManager.getInstance(AnimatorUtils.getAppManager());
- WidgetPartDeserializer widgetPartDeserializer = new WidgetPartDeserializer();
+ AnimatorWidgetPartDeserializer widgetPartDeserializer = new AnimatorWidgetPartDeserializer();
AnimatorAnimationDeserializer animatorAnimationDeserializer =
new AnimatorAnimationDeserializer(manager.getModelFactory());
AnimatorWidgetDeserializer animatorWidgetDeserializer = new AnimatorWidgetDeserializer(manager.getModelFactory());
deserializerList.add(animatorAnimationDeserializer);
deserializerList.add(animatorWidgetDeserializer);
- gsonBuilder.registerTypeAdapter(AnimatorPart.class, new DocumentPartDeserializer());
- gsonBuilder.registerTypeAdapter(AnimatorPagePart.class, new PagePartDeserializer(rootPart,
+ gsonBuilder.registerTypeAdapter(AnimatorPart.class, new AnimatorPartDeserializer());
+ gsonBuilder.registerTypeAdapter(AnimatorPagePart.class, new AnimatorPagePartDeserializer(rootPart,
deserializerList));
gsonBuilder.registerTypeAdapter(AnimatorWidgetPart.class, widgetPartDeserializer);
gsonBuilder.registerTypeAdapter(AnimatorAnimation.class, animatorAnimationDeserializer);
import org.tizen.webuibuilder.animator.model.serializer.AnimatorKeyframeSerializer;
import org.tizen.webuibuilder.animator.model.serializer.AnimatorSelectorSerializer;
import org.tizen.webuibuilder.animator.model.serializer.AnimatorTriggerSerializer;
-import org.tizen.webuibuilder.animator.model.serializer.DocumentPartSerializer;
-import org.tizen.webuibuilder.animator.model.serializer.PagePartSerializer;
-import org.tizen.webuibuilder.animator.model.serializer.WidgetPartSerializer;
+import org.tizen.webuibuilder.animator.model.serializer.AnimatorPartSerializer;
+import org.tizen.webuibuilder.animator.model.serializer.AnimatorPagePartSerializer;
+import org.tizen.webuibuilder.animator.model.serializer.AnimatorWidgetPartSerializer;
import org.tizen.webuibuilder.animator.utils.AnimatorUtils;
import org.tizen.webuibuilder.model.Part;
import org.tizen.webuibuilder.model.app.AppManager;
GsonBuilder gsonBuilder = new GsonBuilder();
//gsonBuilder.registerTypeAdapter(DocumentPart.class, new DocumentPartSerializer());
- gsonBuilder.registerTypeAdapter(AnimatorPart.class, new DocumentPartSerializer());
- gsonBuilder.registerTypeAdapter(AnimatorPagePart.class, new PagePartSerializer(appManager));
- gsonBuilder.registerTypeAdapter(AnimatorWidgetPart.class, new WidgetPartSerializer());
+ gsonBuilder.registerTypeAdapter(AnimatorPart.class, new AnimatorPartSerializer());
+ gsonBuilder.registerTypeAdapter(AnimatorPagePart.class, new AnimatorPagePartSerializer(appManager));
+ gsonBuilder.registerTypeAdapter(AnimatorWidgetPart.class, new AnimatorWidgetPartSerializer());
gsonBuilder.registerTypeAdapter(AnimatorAnimation.class, new AnimatorAnimationSerializer());
gsonBuilder.registerTypeAdapter(AnimatorSelector.class, new AnimatorSelectorSerializer());
gsonBuilder.registerTypeAdapter(AnimatorKeyframe.class, new AnimatorKeyframeSerializer());
/**
* A class that implements serializer for PagePart
*/
-public class PagePartSerializer implements JsonSerializer<AnimatorPagePart> {
+public class AnimatorPagePartSerializer implements JsonSerializer<AnimatorPagePart> {
private AppManager appManager;
- public PagePartSerializer(AppManager appManager) {
+ public AnimatorPagePartSerializer(AppManager appManager) {
this.appManager = appManager;
}
/**
* A class that implements serializer for DocumentPart
*/
-public class DocumentPartSerializer implements JsonSerializer<AnimatorPart> {
+public class AnimatorPartSerializer implements JsonSerializer<AnimatorPart> {
/*
* (non-Javadoc)
/**
* A class that implements serializer for WidgetPart
*/
-public class WidgetPartSerializer implements JsonSerializer<AnimatorWidgetPart> {
+public class AnimatorWidgetPartSerializer implements JsonSerializer<AnimatorWidgetPart> {
/*
* (non-Javadoc)
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.ScrollBar;
import org.tizen.webuibuilder.BuilderConstants;
-import org.tizen.webuibuilder.animator.gef.command.SetCssStyleAnimationPropertyCommand;
+import org.tizen.webuibuilder.animator.gef.command.AnimationPropertyChangeCommand;
import org.tizen.webuibuilder.animator.gef.viewer.AnimationEvent;
import org.tizen.webuibuilder.animator.gef.viewer.AnimatorBrowserViewer;
import org.tizen.webuibuilder.animator.gef.viewer.IAnimationListener;
String beforeEaseData = frame.getEasingProperty();
if (!beforeEaseData.equals(easeData)) {
- SetCssStyleAnimationPropertyCommand propertyCommand =
- new SetCssStyleAnimationPropertyCommand(
+ AnimationPropertyChangeCommand propertyCommand =
+ new AnimationPropertyChangeCommand(
frame,
"-webkit-animation-timing-function",
easeData);