org.robokind.api.animation.editor
Class AnimationEditor

java.lang.Object
  extended by org.robokind.api.common.property.PropertyChangeNotifier
      extended by org.robokind.api.animation.editor.AbstractEditor<Channel,ChannelEditor>
          extended by org.robokind.api.animation.editor.AnimationEditor
All Implemented Interfaces:
org.robokind.api.common.property.PropertyChangeSource

public class AnimationEditor
extends AbstractEditor<Channel,ChannelEditor>

Author:
Matthew Stevenson

Field Summary
static String PROP_PATH
          Property String for the Animaiton's file path.
 
Fields inherited from class org.robokind.api.animation.editor.AbstractEditor
myChildren, myConsumers, myParent, myRecursiveConsumers, mySelectedIndex, mySharedHistory, myStates, PROP_NAME
 
Constructor Summary
AnimationEditor(Animation a, String path, HistoryStack hist)
           
 
Method Summary
protected  int addChildBase(Object invoker, org.robokind.api.common.utils.RKSource<Channel> channelSource, int i)
          Called when a child is requested to be added.
 Set<SynchronizedPointGroup> collectSynchronizedPointGroups()
           
 boolean containsLogicalId(int i)
           
protected  ChannelEditor createChildController(Channel channel)
          Called when a new Controller needs to be created
 Animation getAnimation()
           
 Animation getEnabledAnimation()
           
 long getEnd()
           
 String getFilePath()
           
 String getName()
           
 org.robokind.api.common.config.VersionProperty getVersion()
           
protected  int insertChildControllerBase(ChannelEditor controller, int i)
          Called when inserting an existing ChildController.
 boolean isChildUIController()
          This should return true if ChildController extends AbstractEditor.
protected  Channel removeChild(Object invoker, int i)
          Called when the child with the given index is requested to be removed.
 void setFilePath(String path)
           
 void setName(String name)
           
protected  void setSelected(int i, boolean sel, HistoryStack hist)
           
 void setVersion(org.robokind.api.common.config.VersionProperty version)
           
 void setVersionNumber(String versionNumber)
           
 
Methods inherited from class org.robokind.api.animation.editor.AbstractEditor
addChild, addConsumer, addRecursiveToChild, afterAddChild, clearConsumers, deselect, fireItemAddedEvent, fireItemAddedEvent, fireItemMovedEvent, fireItemMovedEvent, fireItemRemovedEvent, fireItemRemovedEvent, fireSelectionChangeEvent, fireSelectionChangeEvent, fireStateChangedEvent, fireStateChangedEvent, fireStructureChangedEvent, fireStructureChangedEvent, getChild, getChildren, getInheritedFlags, getParent, getRestrictiveFlags, getSelected, getSelectedIndex, getSharedHistory, getStateFlags, getStates, hasFlag, insertChild, insertChildController, isLocked, recursiveAdd, recursiveRemove, removeChild, removeChildByIndex, removeConsumer, removeFromConsumerList, removeFromRecursiveList, select, setChildren, setParent, setState
 
Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, clearListeners, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_PATH

public static final String PROP_PATH
Property String for the Animaiton's file path.

See Also:
Constant Field Values
Constructor Detail

AnimationEditor

public AnimationEditor(Animation a,
                       String path,
                       HistoryStack hist)
Parameters:
a -
ps -
path -
hist -
Method Detail

getFilePath

public String getFilePath()
Returns:

setFilePath

public void setFilePath(String path)
Parameters:
path -

setSelected

protected void setSelected(int i,
                           boolean sel,
                           HistoryStack hist)
Overrides:
setSelected in class AbstractEditor<Channel,ChannelEditor>
Parameters:
i -
sel -

getName

public String getName()
Specified by:
getName in class AbstractEditor<Channel,ChannelEditor>
Returns:

setName

public void setName(String name)
Specified by:
setName in class AbstractEditor<Channel,ChannelEditor>
Parameters:
name -

setVersionNumber

public void setVersionNumber(String versionNumber)
Parameters:
versionNumber -

getVersion

public org.robokind.api.common.config.VersionProperty getVersion()

setVersion

public void setVersion(org.robokind.api.common.config.VersionProperty version)
Parameters:
version -

removeChild

protected Channel removeChild(Object invoker,
                              int i)
Description copied from class: AbstractEditor
Called when the child with the given index is requested to be removed.

Specified by:
removeChild in class AbstractEditor<Channel,ChannelEditor>
i - the index of the child to remove
Returns:

getAnimation

public Animation getAnimation()
Returns:

getEnabledAnimation

public Animation getEnabledAnimation()
Returns:

containsLogicalId

public boolean containsLogicalId(int i)
Parameters:
i -
Returns:

getEnd

public long getEnd()
Returns:

createChildController

protected ChannelEditor createChildController(Channel channel)
Description copied from class: AbstractEditor
Called when a new Controller needs to be created

Specified by:
createChildController in class AbstractEditor<Channel,ChannelEditor>
Parameters:
channel - the ChildBase for the requested ChildController
Returns:
return a new ChildController created from the ChildBase

isChildUIController

public boolean isChildUIController()
Description copied from class: AbstractEditor
This should return true if ChildController extends AbstractEditor. Additional functionality can be provided for Children UIControllers. This abstract method was introduced to avoid use of instanceof.

Specified by:
isChildUIController in class AbstractEditor<Channel,ChannelEditor>
Returns:
true if ChildController extends AbstractEditor

addChildBase

protected int addChildBase(Object invoker,
                           org.robokind.api.common.utils.RKSource<Channel> channelSource,
                           int i)
Description copied from class: AbstractEditor
Called when a child is requested to be added. This method should do everything necessary to add a ChildBase. Shortly after this is called, a call will be made to createChildController(...), the resulting controller will be added to myChildren at the index returned from this method. To cancel adding the ChildBase, return -1

Specified by:
addChildBase in class AbstractEditor<Channel,ChannelEditor>
channelSource - the ChildBase to be added
Returns:
the index where the ChildBase, return -1 to cancel adding the ChildBase.

insertChildControllerBase

protected int insertChildControllerBase(ChannelEditor controller,
                                        int i)
Description copied from class: AbstractEditor
Called when inserting an existing ChildController. This method is expected to add the ChildBase from the ChildController to this Controller's underlying type.

Specified by:
insertChildControllerBase in class AbstractEditor<Channel,ChannelEditor>
Parameters:
controller - ChildController that is being added
i - the index the child should be added at
Returns:
the index the child is added at

collectSynchronizedPointGroups

public Set<SynchronizedPointGroup> collectSynchronizedPointGroups()


Copyright © 2011-2013. All Rights Reserved.