Commit 112fa2bc authored by legoc's avatar legoc
Browse files

Added tooltip on the tree cells

parent bb685e21
......@@ -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);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment