Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
the hurlers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Herman Andersen Dyrkorn
the hurlers
Commits
db657486
Commit
db657486
authored
4 years ago
by
Herman Andersen Dyrkorn
Browse files
Options
Downloads
Patches
Plain Diff
cleaning up some classes
parent
12de65fc
No related branches found
Branches containing commit
No related tags found
1 merge request
!27
Resolve "cleanup"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sample/Controller.java
+5
-0
5 additions, 0 deletions
src/sample/Controller.java
src/sample/Main.java
+1
-10
1 addition, 10 deletions
src/sample/Main.java
src/sample/Thought.java
+1
-1
1 addition, 1 deletion
src/sample/Thought.java
with
7 additions
and
11 deletions
src/sample/Controller.java
+
5
−
0
View file @
db657486
...
...
@@ -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
));
}
...
...
This diff is collapsed.
Click to expand it.
src/sample/Main.java
+
1
−
10
View file @
db657486
...
...
@@ -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
);
}
}
This diff is collapsed.
Click to expand it.
src/sample/Thought.java
+
1
−
1
View file @
db657486
package
sample
;
public
class
Thought
{
private
String
thoughtText
;
private
final
String
thoughtText
;
public
Thought
(
String
txt
){
this
.
thoughtText
=
txt
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment