* @return The created node.
*/
private DefaultMutableTreeNode createDirectionNode(String animationName, int directionIndex) {
SpriteAnimation animation = sprite.getAnimation(animationName);
SpriteAnimationDirection direction = animation.getDirection(directionIndex);
direction.addObserver(this);
DefaultMutableTreeNode directionNode = new DefaultMutableTreeNode(new NodeInfo(
direction, getDirectionNodeText(animationName, directionIndex)
));
directionNode.setAllowsChildren(false);