org.robokind.api.animation.editor
Class ChannelEditor
java.lang.Object
org.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.animation.editor.AbstractEditor<MotionPath,MotionPathEditor>
org.robokind.api.animation.editor.ChannelEditor
- All Implemented Interfaces:
- org.robokind.api.common.property.PropertyChangeSource
public class ChannelEditor
- extends AbstractEditor<MotionPath,MotionPathEditor>
- Author:
- Matthew Stevenson
Methods inherited from class org.robokind.api.animation.editor.AbstractEditor |
addChild, addConsumer, addRecursiveToChild, 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, setSelected, 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 |
ChannelEditor
public ChannelEditor(Channel channel,
HistoryStack hist)
- Parameters:
channel
- properties
- hist
-
removeChild
protected MotionPath 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<MotionPath,MotionPathEditor>
i
- the index of the child to remove
- Returns:
getChannelView
protected Channel getChannelView()
- Returns:
getCompiledPath
public CompiledPath getCompiledPath(long start,
long end,
long stepLength)
- Parameters:
start
- end
- stepLength
-
- Returns:
getInterpolatedPoints
public List<Point2D> getInterpolatedPoints()
- Returns:
setName
public void setName(String name)
- Specified by:
setName
in class AbstractEditor<MotionPath,MotionPathEditor>
- Parameters:
name
-
getName
public String getName()
- Specified by:
getName
in class AbstractEditor<MotionPath,MotionPathEditor>
- Returns:
getPrimaryColor
public Color getPrimaryColor()
- Returns:
getChannelColor
public static Color getChannelColor(Integer i)
setPrimaryColor
public void setPrimaryColor(Object invoker,
Color col)
- Parameters:
invoker
- col
-
getEnd
public long getEnd()
- Returns:
getStart
public long getStart()
setEnabled
protected void setEnabled(MotionPath mp,
boolean enabled)
- Parameters:
mp
- enabled
-
createChildController
protected MotionPathEditor createChildController(MotionPath path)
- Description copied from class:
AbstractEditor
- Called when a new Controller needs to be created
- Specified by:
createChildController
in class AbstractEditor<MotionPath,MotionPathEditor>
- Parameters:
path
- 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<MotionPath,MotionPathEditor>
- Returns:
- true if ChildController extends AbstractEditor
addChildBase
protected int addChildBase(Object invoker,
org.robokind.api.common.utils.RKSource<MotionPath> pathSource,
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<MotionPath,MotionPathEditor>
pathSource
- the ChildBase to be added
- Returns:
- the index where the ChildBase, return -1 to cancel adding the ChildBase.
insertChildControllerBase
protected int insertChildControllerBase(MotionPathEditor 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<MotionPath,MotionPathEditor>
- Parameters:
controller
- ChildController that is being addedi
- the index the child should be added at
- Returns:
- the index the child is added at
afterAddChild
protected void afterAddChild()
- Overrides:
afterAddChild
in class AbstractEditor<MotionPath,MotionPathEditor>
getChannel
protected Channel getChannel()
- Returns:
getId
public int getId()
- Returns:
Copyright © 2011-2013. All Rights Reserved.