|
34 | 34 | import com.jme3.anim.AnimComposer; |
35 | 35 | import com.jme3.gde.core.icons.IconList; |
36 | 36 | import com.jme3.gde.core.scene.SceneApplication; |
| 37 | +import com.jme3.gde.core.sceneexplorer.SceneExplorerTopComponent; |
37 | 38 | import com.jme3.gde.core.sceneexplorer.nodes.JmeControl; |
38 | 39 | import com.jme3.gde.core.sceneexplorer.nodes.SceneExplorerNode; |
39 | 40 | import com.jme3.gde.core.sceneexplorer.nodes.actions.ControlsPopup; |
40 | 41 | import com.jme3.gde.core.sceneexplorer.nodes.actions.animation.AnimClipProperty; |
41 | 42 | import java.awt.Image; |
42 | 43 | import java.awt.event.ActionEvent; |
43 | | -import java.awt.event.ActionListener; |
| 44 | +import java.util.Collection; |
44 | 45 | import java.util.HashMap; |
| 46 | +import java.util.List; |
45 | 47 | import java.util.Map; |
46 | 48 | import java.util.concurrent.ExecutionException; |
47 | 49 | import javax.swing.AbstractAction; |
48 | 50 | import javax.swing.Action; |
49 | 51 | import org.openide.actions.DeleteAction; |
| 52 | +import org.openide.awt.Actions; |
| 53 | +import org.openide.explorer.ExplorerManager; |
50 | 54 | import org.openide.loaders.DataObject; |
51 | 55 | import org.openide.nodes.Node; |
52 | 56 | import org.openide.nodes.Sheet; |
53 | 57 | import org.openide.util.Exceptions; |
54 | 58 | import org.openide.util.actions.SystemAction; |
| 59 | +import org.openide.windows.TopComponent; |
55 | 60 |
|
56 | 61 | /** |
57 | 62 | * Visual representation of the AnimComposer Class in the Scene Explorer |
|
61 | 66 | @SuppressWarnings({"unchecked", "rawtypes"}) |
62 | 67 | public class JmeAnimComposer extends JmeControl { |
63 | 68 | private AnimComposer animComposer; |
64 | | - private Map<String, JmeAnimClip> playingAnimation = new HashMap<>(); |
| 69 | + private final Map<String, JmeAnimClip> playingAnimation = new HashMap<>(); |
65 | 70 | private static Image smallImage = IconList.animControl.getImage(); |
66 | 71 |
|
67 | 72 | public JmeAnimComposer() { |
@@ -161,9 +166,13 @@ public void refresh(boolean immediate) { |
161 | 166 | ((JmeAnimComposerChildren) jmeChildren).refreshChildren(immediate); |
162 | 167 | super.refresh(immediate); |
163 | 168 | } |
164 | | - |
| 169 | + |
165 | 170 | private class StopAllAction extends AbstractAction { |
166 | 171 |
|
| 172 | + public StopAllAction() { |
| 173 | + super("Stop animations"); |
| 174 | + } |
| 175 | + |
167 | 176 | @Override |
168 | 177 | public void actionPerformed(ActionEvent e) { |
169 | 178 | for(JmeAnimClip layer: JmeAnimComposer.this.playingAnimation.values()) { |
|
0 commit comments