
prefuse.action.animate.SizeAnimator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prefuse-vienna Show documentation
Show all versions of prefuse-vienna Show documentation
Prefuse is a set of software tools for creating rich interactive data visualizations in the Java programming language.
The newest version!
package prefuse.action.animate;
import prefuse.action.ItemAction;
import prefuse.visual.VisualItem;
/**
* Animator that linearly interpolates the size of a VisualItems.
*
* @author jeffrey heer
*/
public class SizeAnimator extends ItemAction {
/**
* Create a new SizeAnimator that processes all data groups.
*/
public SizeAnimator() {
super();
}
/**
* Create a new SizeAnimator that processes the specified group.
* @param group the data group to process.
*/
public SizeAnimator(String group) {
super(group);
}
/**
* @see prefuse.action.ItemAction#process(prefuse.visual.VisualItem, double)
*/
public void process(VisualItem item, double frac) {
double ss = item.getStartSize();
item.setSize(ss + frac*(item.getEndSize() - ss));
}
} // end of class SizeAnimator
© 2015 - 2025 Weber Informatics LLC | Privacy Policy