corefx - update to display default services for nodes in details pane
This commit is contained in:
parent
f75f6f9ec0
commit
c419518559
1 changed files with 14 additions and 12 deletions
|
@ -22,6 +22,8 @@ import javafx.scene.layout.GridPane;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class NodeDetails extends ScrollPane {
|
public class NodeDetails extends ScrollPane {
|
||||||
private static final Logger logger = LogManager.getLogger();
|
private static final Logger logger = LogManager.getLogger();
|
||||||
private static final int START_INDEX = 1;
|
private static final int START_INDEX = 1;
|
||||||
|
@ -100,19 +102,19 @@ public class NodeDetails extends ScrollPane {
|
||||||
addInterface(coreInterface, linkedNode);
|
addInterface(coreInterface, linkedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// display custom or default node services
|
||||||
if (!node.getServices().isEmpty()) {
|
Set<String> services = node.getServices();
|
||||||
addSeparator();
|
if (services.isEmpty()) {
|
||||||
addLabel("Services");
|
services = controller.getDefaultServices().get(node.getModel());
|
||||||
JFXListView<String> listView = new JFXListView<>();
|
|
||||||
listView.setMouseTransparent(true);
|
|
||||||
listView.setFocusTraversable(false);
|
|
||||||
for (String service : node.getServices()) {
|
|
||||||
listView.getItems().add(service);
|
|
||||||
}
|
|
||||||
gridPane.add(listView, 0, index++, 2, 1);
|
|
||||||
}
|
}
|
||||||
|
addSeparator();
|
||||||
|
addLabel("Services");
|
||||||
|
JFXListView<String> listView = new JFXListView<>();
|
||||||
|
listView.setMouseTransparent(true);
|
||||||
|
listView.setFocusTraversable(false);
|
||||||
|
listView.getItems().setAll(services);
|
||||||
|
gridPane.add(listView, 0, index++, 2, 1);
|
||||||
|
|
||||||
JFXScrollPane.smoothScrolling(scrollPane);
|
JFXScrollPane.smoothScrolling(scrollPane);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue