📄 animation.java
字号:
package sjg.animation;import java.util.*;/** * A list of {@link Frame frames}. * * The Animation may be looped or not looped. Animations are created * by {@link Cropper Cropper} . * * @author Christian Hvid */public class Animation { private String name; private Vector frames = new Vector(); private boolean looped; public int size() { return frames.size(); } public Frame getFrame(int index) { if (looped == true) return (Frame) frames.elementAt(index % frames.size()); else { if (index >= frames.size()) return (Frame) frames.elementAt(frames.size() - 1); else return (Frame) frames.elementAt(index % frames.size()); } } public String getName() { return name; } protected void addFrame(Frame frame) { frames.addElement(frame); } public Animation(String name, boolean looped) { this.name = name; this.looped = looped; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -