/** * This is the overidden method which is called when the user wants to delete a Pose, by clicking * the button * * @param e The Event Object */ @Override public void actionPerformed(ActionEvent e) { ASEditor singleton = ASEditor.getEditor(); PoseListManager stateManager = singleton.getStateManager().getPoseListManager(); // GET SELECTED BUTTON PoseButton currentButton = stateManager.getPoseButton(); singleton.getStateManager().getPoseListManager().removePoseIn(currentButton); singleton.getGUI().resetSceneRenderingPanel(); }
public void valueChanged(ListSelectionEvent e) { // get the name JList list = (JList) e.getSource(); // Assume its a animationstate stateToMake = (AnimationState) list.getSelectedValue(); int response = JOptionPane.showConfirmDialog( new JFrame(), "You picked " + stateToMake.toString() + ".\n Are you sure?"); if (response == JOptionPane.YES_OPTION) { // prepare to create a new state ASEditor singleton = ASEditor.getEditor(); singleton.getGUI().getASViewer().addState(stateToMake); // Hide list after frameOfList.setVisible(false); } }