Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
Protos
Nomad 3D
nomad-3d-editor
Commits
f7a94317
Commit
f7a94317
authored
Mar 04, 2019
by
legoc
Browse files
Added component name in the reference axis list
parent
a9d4dacd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/gui/EditorMenuBar.java
View file @
f7a94317
...
...
@@ -150,10 +150,10 @@ public class EditorMenuBar extends MenuBar {
this
.
type
=
new
SimpleStringProperty
(
type
);
}
private
AxisTableEntry
(
String
axisName
)
{
private
AxisTableEntry
(
String
axisName
,
String
componentName
)
{
super
();
this
.
axisName
=
new
SimpleStringProperty
(
axisName
);
this
.
componentName
=
new
SimpleStringProperty
(
""
);
this
.
componentName
=
new
SimpleStringProperty
(
componentName
);
this
.
type
=
new
SimpleStringProperty
(
""
);
}
...
...
@@ -1831,7 +1831,7 @@ public class EditorMenuBar extends MenuBar {
GridPane
scenePane
=
new
GridPane
();
Scene
displayScene
=
new
Scene
(
scenePane
);
Stage
displayStage
=
new
Stage
(
StageStyle
.
UTILITY
);
displayStage
.
setWidth
(
3
00
);
displayStage
.
setWidth
(
6
00
);
displayStage
.
setTitle
(
"Reference Axes"
);
displayStage
.
setScene
(
displayScene
);
displayStage
.
initOwner
(
Nomad3DEditor
.
getInstance
().
getStage
());
...
...
@@ -1843,6 +1843,10 @@ public class EditorMenuBar extends MenuBar {
TableColumn
axisNameColumn
=
new
TableColumn
<>(
"Name"
);
axisNameColumn
.
setMinWidth
(
300
);
axisNameColumn
.
setCellValueFactory
(
new
PropertyValueFactory
<
AxisTableEntry
,
String
>(
"axisName"
));
TableColumn
componentNameColumn
=
new
TableColumn
<>(
"Component Name"
);
componentNameColumn
.
setMinWidth
(
300
);
componentNameColumn
.
setCellValueFactory
(
new
PropertyValueFactory
<
AxisTableEntry
,
String
>(
"componentName"
));
tableView
.
getSelectionModel
().
selectedItemProperty
().
addListener
(
new
ChangeListener
<
AxisTableEntry
>()
{
...
...
@@ -1856,11 +1860,19 @@ public class EditorMenuBar extends MenuBar {
List
<
ReferenceAxis
>
axes
=
ReferenceAxisList
.
getInstance
().
get
();
for
(
ReferenceAxis
axis
:
axes
)
{
data
.
add
(
new
AxisTableEntry
(
axis
.
getName
()));
Component
owner
=
axis
.
getComponent
();
if
(
owner
!=
null
)
{
data
.
add
(
new
AxisTableEntry
(
axis
.
getName
(),
owner
.
getName
()));
}
else
{
data
.
add
(
new
AxisTableEntry
(
axis
.
getName
(),
""
));
}
}
tableView
.
setItems
(
data
);
tableView
.
getColumns
().
addAll
(
axisNameColumn
);
tableView
.
getColumns
().
addAll
(
axisNameColumn
,
componentNameColumn
);
scenePane
.
addRow
(
0
,
tableView
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment