1 30 31 package com.jgoodies.animation; 32 33 41 public final class AnimationEvent { 42 43 46 public static final Type STARTED = new Type("Started"); 47 48 51 public static final Type STOPPED = new Type("Stopped"); 52 53 56 private final Animation source; 57 58 61 private final Type type; 62 63 66 private final long time; 67 68 69 71 80 AnimationEvent(Animation source, Type type, long time) { 81 this.source = source; 82 this.type = type; 83 this.time = time; 84 } 85 86 87 89 94 public Animation getSource() { 95 return source; 96 } 97 98 99 104 public Type type() { 105 return type; 106 } 107 108 109 114 public long time() { 115 return time; 116 } 117 118 119 124 public String toString() { 125 return "[type= " 126 + type 127 + "; time= " 128 + time 129 + "; source=" 130 + source 131 + ']'; 132 } 133 134 135 137 140 private static final class Type { 141 142 private final String name; 143 144 private Type(String name) { 145 this.name = name; 146 } 147 148 public String toString() { 149 return name; 150 } 151 152 } 153 154 155 } | Popular Tags |