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
ac7cbeae
Commit
ac7cbeae
authored
4 years ago
by
Herman Andersen Dyrkorn
Browse files
Options
Downloads
Plain Diff
Merge branch '17-cleanup' into 'master'
Resolve "cleanup" Closes
#17
See merge request
!21
parents
de12997b
de3be45e
No related branches found
Branches containing commit
No related tags found
1 merge request
!21
Resolve "cleanup"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sample/Controller.java
+0
-1
0 additions, 1 deletion
src/sample/Controller.java
src/sample/Main.java
+0
-10
0 additions, 10 deletions
src/sample/Main.java
src/sample/ThoughtManager.java
+0
-56
0 additions, 56 deletions
src/sample/ThoughtManager.java
with
0 additions
and
67 deletions
src/sample/Controller.java
+
0
−
1
View file @
ac7cbeae
package
sample
;
import
javafx.event.ActionEvent
;
import
javafx.fxml.FXML
;
import
javafx.scene.control.ListView
;
import
javafx.scene.control.SelectionMode
;
...
...
This diff is collapsed.
Click to expand it.
src/sample/Main.java
+
0
−
10
View file @
ac7cbeae
...
...
@@ -23,16 +23,6 @@ public class Main extends Application {
Scene
sceneMain
=
new
Scene
(
root
,
700
,
498
);
primaryStage
.
setScene
(
sceneMain
);
//get access to the text field:
ScrollPane
scrollyPlane
=
(
ScrollPane
)
sceneMain
.
lookup
(
"#scrollyboi"
);
Node
content
=
scrollyPlane
.
getContent
();
Text
ourTextField
=
(
Text
)
content
.
lookup
(
"#thoughtId"
);
ThoughtManager
tm
=
ThoughtManager
.
getInstance
();
//NOTE! if you reinitalize ThoughtManager it will just change where it will be writing to:
tm
.
initialize
(
ourTextField
);
tm
.
makeList
();
primaryStage
.
show
();
}
...
...
This diff is collapsed.
Click to expand it.
src/sample/ThoughtManager.java
deleted
100644 → 0
+
0
−
56
View file @
de12997b
package
sample
;
import
javafx.scene.text.Text
;
import
java.util.*
;
public
class
ThoughtManager
{
//Making it a singleton:
private
static
final
ThoughtManager
INSTANCE
=
new
ThoughtManager
();
private
ThoughtManager
()
{}
public
static
ThoughtManager
getInstance
()
{
return
INSTANCE
;
}
//Singleton done.
//VARIABLES:
private
List
<
Thought
>
thoughts
=
new
ArrayList
<>();
private
Text
textfield
;
//string NOTE! veit ikke om vi burde gjøre detta for i veit ikke ka man kan gjøre:
private
String
text
=
new
String
();
public
void
makeList
()
{
Thought
t
=
new
Thought
(
"yeet1"
);
Thought
t2
=
new
Thought
(
"yeet12"
);
Thought
t3
=
new
Thought
(
"yeet3"
);
Thought
t4
=
new
Thought
(
"yeet4"
);
Thought
t5
=
new
Thought
(
"yeet5"
);
this
.
thoughts
.
add
(
t
);
this
.
thoughts
.
add
(
t2
);
this
.
thoughts
.
add
(
t3
);
this
.
thoughts
.
add
(
t4
);
this
.
thoughts
.
add
(
t5
);
}
void
initialize
(
Text
text
)
{
this
.
textfield
=
text
;
}
void
displayList
()
{
this
.
textfield
.
setText
(
this
.
text
);
}
void
add
(
Thought
thought
)
{
this
.
thoughts
.
add
(
thought
);
this
.
text
+=
thought
.
getThought
()
+
"\n"
;
}
void
hurl
()
{
this
.
text
=
""
;
this
.
thoughts
.
clear
();
}
}
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