Skip to content
Snippets Groups Projects
Commit db657486 authored by Herman Andersen Dyrkorn's avatar Herman Andersen Dyrkorn
Browse files

cleaning up some classes

parent 12de65fc
No related branches found
No related tags found
1 merge request!27Resolve "cleanup"
......@@ -32,12 +32,17 @@ public class Controller {
//delete all thoughts and display the list
listView.getItems().clear();
//get instance of sound controller and play sound
SoundController sound = SoundController.getInstance();
sound.playSound();
}
public void handleHurlSelected() {
//get all indexes for those thoughts to be deleted
ObservableList<Integer> indices = listView.getSelectionModel().getSelectedIndices();
//loop over all thoughts and delete the once how are selected
for (int i = indices.size()-1; i >= 0; i--)
listView.getItems().remove((int) indices.get(i));
}
......
......@@ -2,18 +2,10 @@ package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import java.net.ContentHandlerFactory;
public class Main extends Application {
@Override
......@@ -24,11 +16,10 @@ public class Main extends Application {
primaryStage.setScene(sceneMain);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
package sample;
public class Thought {
private String thoughtText;
private final String thoughtText;
public Thought(String txt){
this.thoughtText = txt;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment