Package org.solarus.editor

Examples of org.solarus.editor.SpriteAnimationDirection


     * @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);

View Full Code Here


                sprite.setSelectedAnimation(animation.getName());
            }

            else if (data instanceof SpriteAnimationDirection) {
                // A direction: show it and show its parent animation.
                SpriteAnimationDirection direction = (SpriteAnimationDirection) data;
                sprite.setSelectedAnimation(direction.getAnimation());
                sprite.setSelectedDirection(direction);
            }
        }
        catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

            );

            NodeInfo info = (NodeInfo) ((DefaultMutableTreeNode) node).getUserObject();
            if (info.getData() instanceof SpriteAnimationDirection) {
                // This is a direction node: use the appropriate icon.
                SpriteAnimationDirection direction = (SpriteAnimationDirection) info.getData();
                setIcon(new SpriteAnimationDirectionIcon(
                        sprite,
                        direction.getAnimation(),
                        direction)
                );
            }

            return this;
View Full Code Here

TOP

Related Classes of org.solarus.editor.SpriteAnimationDirection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.