@Override public void setStopButtonVisibility(String nodeId, boolean visible) { ProcessTreeNode processTreeNode = processTreeNodes.get(nodeId); if (processTreeNode == null) { return; } if (visible) { processTreeNode .getTreeNodeElement() .getClassList() .remove(machineResources.getCss().hideStopButton()); } else { processTreeNode .getTreeNodeElement() .getClassList() .add(machineResources.getCss().hideStopButton()); } }
@Override public void markProcessHasOutput(String processId) { if (processId.equals(activeProcessId)) { return; } ProcessTreeNode treeNode = processTreeNodes.get(processId); if (treeNode != null) { treeNode.setHasUnreadContent(true); treeNode.getTreeNodeElement().getClassList().add(machineResources.getCss().badgeVisible()); } }
@Override public void setProcessesData(@NotNull ProcessTreeNode root) { processTree.asWidget().setVisible(true); processTree.getModel().setRoot(root); processTree.renderTree(-1); for (ProcessTreeNode processTreeNode : processTreeNodes.values()) { if (!processTreeNode.getId().equals(activeProcessId) && processTreeNode.hasUnreadContent()) { processTreeNode .getTreeNodeElement() .getClassList() .add(machineResources.getCss().badgeVisible()); } } }
@Override public void showProcessOutput(String processId) { if (processWidgets.containsKey(processId)) { onResize(); outputPanel.showWidget(processWidgets.get(processId).asWidget()); activeProcessId = processId; ProcessTreeNode treeNode = processTreeNodes.get(processId); if (treeNode != null) { treeNode.setHasUnreadContent(false); treeNode .getTreeNodeElement() .getClassList() .remove(machineResources.getCss().badgeVisible()); } } }
@Nullable @Override public SVGResource getTitleImage() { return resources.terminal(); }