Skip to content
GitLab
Projects
Groups
Snippets
/
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
112fa2bc
Commit
112fa2bc
authored
Mar 04, 2019
by
legoc
Browse files
Added tooltip on the tree cells
parent
bb685e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/gui/HierarchyCell.java
View file @
112fa2bc
...
...
@@ -12,13 +12,18 @@ import javafx.scene.control.TreeCell;
import
javafx.scene.control.TreeView
;
import
javafx.scene.control.cell.CheckBoxTreeCell
;
import
javafx.util.Callback
;
import
javafx.scene.control.Tooltip
;
/**
* @author dages
*
*/
public
class
HierarchyCell
extends
CheckBoxTreeCell
<
Component
>
{
private
Tooltip
tooltip
=
new
Tooltip
();
public
static
final
Callback
<
TreeView
<
Component
>,
TreeCell
<
Component
>>
FACTORY
;
static
{
FACTORY
=
new
Callback
<
TreeView
<
Component
>,
TreeCell
<
Component
>>(){
@Override
...
...
@@ -47,7 +52,8 @@ public class HierarchyCell extends CheckBoxTreeCell<Component> {
if
(
empty
||
isEditing
())
{
return
;
}
else
{
}
else
{
String
text
=
item
.
getName
();
...
...
@@ -57,6 +63,9 @@ public class HierarchyCell extends CheckBoxTreeCell<Component> {
setText
(
text
);
setContextMenu
(
rigthClickMenu
);
tooltip
.
setText
(
item
.
getName
());
setTooltip
(
tooltip
);
}
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment