Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
course-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
IT1901
course-material
Commits
80ccb3f5
Commit
80ccb3f5
authored
5 years ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
added the cell renderer to the list inside AbstractFxAppController
parent
707d1f61
No related branches found
No related tags found
1 merge request
!6
Issue 11 allow user to enter and update metadata about the latlong points
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
simpleexample2/fxui/src/main/java/simpleex/ui/AbstractFxAppController.java
+10
-0
10 additions, 0 deletions
...ui/src/main/java/simpleex/ui/AbstractFxAppController.java
with
10 additions
and
0 deletions
simpleexample2/fxui/src/main/java/simpleex/ui/AbstractFxAppController.java
+
10
−
0
View file @
80ccb3f5
...
@@ -12,7 +12,9 @@ import javafx.geometry.Point2D;
...
@@ -12,7 +12,9 @@ import javafx.geometry.Point2D;
import
javafx.scene.Node
;
import
javafx.scene.Node
;
import
javafx.scene.control.Alert
;
import
javafx.scene.control.Alert
;
import
javafx.scene.control.Alert.AlertType
;
import
javafx.scene.control.Alert.AlertType
;
import
javafx.util.Callback
;
import
javafx.scene.control.ButtonType
;
import
javafx.scene.control.ButtonType
;
import
javafx.scene.control.ListCell
;
import
javafx.scene.control.ListView
;
import
javafx.scene.control.ListView
;
import
javafx.scene.control.Slider
;
import
javafx.scene.control.Slider
;
import
simpleex.core.LatLong
;
import
simpleex.core.LatLong
;
...
@@ -84,6 +86,13 @@ public abstract class AbstractFxAppController {
...
@@ -84,6 +86,13 @@ public abstract class AbstractFxAppController {
// the location list
// the location list
locationListView
.
getSelectionModel
().
selectedIndexProperty
()
locationListView
.
getSelectionModel
().
selectedIndexProperty
()
.
addListener
((
prop
,
oldValue
,
newValue
)
->
updateMapMarker
(
true
));
.
addListener
((
prop
,
oldValue
,
newValue
)
->
updateMapMarker
(
true
));
//connect the cell renderer to the list
locationListView
.
setCellFactory
(
new
Callback
<
ListView
<
LatLong
>,
ListCell
<
LatLong
>>()
{
@Override
public
ListCell
<
LatLong
>
call
(
ListView
<
LatLong
>
listView
)
{
return
new
LatLongCell
();
}
});
}
}
private
void
handleMapDragged
(
final
Node
node
,
final
double
dx
,
final
double
dy
)
{
private
void
handleMapDragged
(
final
Node
node
,
final
double
dx
,
final
double
dy
)
{
...
@@ -157,6 +166,7 @@ public abstract class AbstractFxAppController {
...
@@ -157,6 +166,7 @@ public abstract class AbstractFxAppController {
if
(
selectedIndex
>=
0
&&
selectedIndex
<
latLongs
.
length
)
{
if
(
selectedIndex
>=
0
&&
selectedIndex
<
latLongs
.
length
)
{
locationListView
.
getSelectionModel
().
select
(
selectedIndex
);
locationListView
.
getSelectionModel
().
select
(
selectedIndex
);
}
}
}
}
private
ObjectMapper
objectMapper
;
private
ObjectMapper
objectMapper
;
...
...
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