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
a856e233
Commit
a856e233
authored
4 years ago
by
Andrea Magnussen
Browse files
Options
Downloads
Patches
Plain Diff
Made the thoughts in a list instead
parent
534eef4c
No related branches found
Branches containing commit
No related tags found
1 merge request
!19
Resolve "appending textview to thoughts"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sample/Controller.java
+9
-11
9 additions, 11 deletions
src/sample/Controller.java
src/sample/sample.fxml
+2
-0
2 additions, 0 deletions
src/sample/sample.fxml
with
11 additions
and
11 deletions
src/sample/Controller.java
+
9
−
11
View file @
a856e233
...
...
@@ -2,6 +2,8 @@ package sample;
import
javafx.event.ActionEvent
;
import
javafx.fxml.FXML
;
import
javafx.scene.control.ListView
;
import
javafx.scene.control.SelectionMode
;
import
javafx.scene.control.TextArea
;
public
class
Controller
{
...
...
@@ -9,6 +11,9 @@ public class Controller {
@FXML
private
TextArea
textArea
;
@FXML
private
ListView
<
String
>
listView
;
@FXML
private
void
handleSubmit
()
{
...
...
@@ -18,21 +23,14 @@ public class Controller {
//clear textArea
textArea
.
clear
();
//get the thought manager and add the thought to the manager
ThoughtManager
tm
=
ThoughtManager
.
getInstance
();
tm
.
add
(
t
);
tm
.
displayList
();
//add the thoughts to the lists
listView
.
getItems
().
addAll
(
t
.
getThought
());
listView
.
getSelectionModel
().
setSelectionMode
(
SelectionMode
.
MULTIPLE
);
}
public
void
handleHurlAll
()
{
//get the thought manager
ThoughtManager
tm
=
ThoughtManager
.
getInstance
();
//delete all thoughts and display the list
tm
.
hurl
();
tm
.
displayList
();
listView
.
getItems
().
clear
();
}
}
This diff is collapsed.
Click to expand it.
src/sample/sample.fxml
+
2
−
0
View file @
a856e233
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.AnchorPane?>
...
...
@@ -24,6 +25,7 @@
<Font
size=
"14.0"
/>
</font>
</Text>
<ListView
fx:id=
"listView"
layoutX=
"37.0"
layoutY=
"14.0"
prefHeight=
"200.0"
prefWidth=
"585.0"
/>
</children>
</AnchorPane>
</content>
...
...
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