Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmpt-370-group-project-group26
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Eyan Cunningham (esc568)
cmpt-370-group-project-group26
Commits
02565597
Commit
02565597
authored
2 years ago
by
ArktikHunter
Browse files
Options
Downloads
Patches
Plain Diff
populate position box works
parent
4d29f21f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SchedulerApp/src/main/java/com/example/schedulerapp/Controller.java
+3
-19
3 additions, 19 deletions
...pp/src/main/java/com/example/schedulerapp/Controller.java
with
3 additions
and
19 deletions
SchedulerApp/src/main/java/com/example/schedulerapp/Controller.java
+
3
−
19
View file @
02565597
...
...
@@ -494,12 +494,8 @@ public class Controller {
temp
.
setItems
(
list
);
}
public
void
populatePositionBox
(
MouseEvent
event
)
{
ArrayList
<
String
>
aList
=
model
.
returnPositions
();
ObservableList
<
String
>
list
=
FXCollections
.
observableArrayList
();
list
.
addAll
(
aList
);
ComboBox
test
=
(
ComboBox
)
event
.
getSource
();
test
.
setItems
(
list
);
test
.
setItems
(
FXCollections
.
observableArrayList
(
model
.
returnPositions
())
);
}
public
void
removeEmployeeBoxClicked
(
MouseEvent
event
){
System
.
out
.
println
(
"remove employee box clicked"
);
...
...
@@ -571,13 +567,8 @@ public class Controller {
Button
addPosition
=
new
Button
(
"Add Position"
);
Button
removePosition
=
new
Button
(
"Remove Position"
);
tempBox
.
getChildren
().
addAll
(
tempCombo
,
addPosition
,
removePosition
);
tempCombo
.
setOnAction
(
new
EventHandler
<
ActionEvent
>()
{
@Override
public
void
handle
(
ActionEvent
actionEvent
)
{
actionEvent
.
getEventType
();
populatePositionBox
((
ComboBox
)
actionEvent
.
getSource
());
}
});
tempCombo
.
setOnMouseClicked
(
this
::
populatePositionBox
);
addPosition
.
setOnMouseClicked
(
new
EventHandler
<
MouseEvent
>()
{
@Override
public
void
handle
(
MouseEvent
mouseEvent
)
{
...
...
@@ -612,13 +603,6 @@ public class Controller {
});
root
.
setCenter
(
tempBox
);
}
public
void
populatePositionBox
(
ComboBox
box
){
ArrayList
<
String
>
aList
=
model
.
returnPositions
();
ObservableList
<
String
>
list
=
FXCollections
.
observableArrayList
();
list
.
addAll
(
aList
);
box
.
setItems
(
list
);
}
}
\ No newline at end of file
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