Package prefuse.action

Examples of prefuse.action.Action


        m_vis.putAction("layout", layout);
       
        // the update list updates the colors of data points and sets the visual
        // properties for any labels. Color updating is limited only to the
        // current focus items, ensuring faster performance.
        final Action update = new ZipColorAction(FOCUS);
        m_vis.putAction("update", update);
       
        // animate a change in color in the interface. this animation is quite
        // short, only 200ms, so that it does not impede with interaction.
        // color animation of data points looks only at the focus items,
        // ensuring faster performance.
        ActionList animate = new ActionList(200);
        animate.add(new ColorAnimator(FOCUS, VisualItem.FILLCOLOR));
        animate.add(new ColorAnimator(LABELS, VisualItem.TEXTCOLOR));
        animate.add(new RepaintAction());
        animate.addActivityListener(new ActivityAdapter() {
            public void activityCancelled(Activity a) {
                // if animation is canceled, set colors to final state
                update.run(1.0);
            }
        });
        m_vis.putAction("animate", animate);
       
        // update items after a resize of the display, animating them to their
View Full Code Here


     * @return the removed Action, or null if no action was found
     */
    public Action removeAction(String name) {
        // TODO: create registry of always run after relations to automatically
        // resolve action references?
        Action a = getAction(name);
        if ( a != null ) {
            a.cancel();
            m_actions.remove(name);
            a.setVisualization(null);
        }
        return a;
    }
View Full Code Here

TOP

Related Classes of prefuse.action.Action

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.