public SimpleGraphBuilder vIconKey(String iconKey) { m_currentVertex.setIconKey(iconKey); return this; }
public SimpleGraphBuilder vIconKey(String iconKey) { m_currentVertex.setIconKey(iconKey); return this; }
protected final AbstractVertex addGroup(String groupId, String iconKey, String label) { AbstractVertex vertex = new SimpleGroup(getNamespace(), groupId); if (containsVertexId(vertex)) { throw new IllegalArgumentException("A vertex or group with id " + groupId + " already exists!"); } LoggerFactory.getLogger(this.getClass()).debug("Adding a group: {}", groupId); vertex.setLabel(label); vertex.setIconKey(iconKey); addVertices(vertex); return vertex; }
protected final AbstractVertex addGroup(String groupId, String iconKey, String label) { AbstractVertex vertex = new SimpleGroup(getVertexNamespace(), groupId); if (containsVertexId(vertex)) { throw new IllegalArgumentException("A vertex or group with id " + groupId + " already exists!"); } LoggerFactory.getLogger(this.getClass()).debug("Adding a group: {}", groupId); vertex.setLabel(label); vertex.setIconKey(iconKey); addVertices(vertex); return vertex; }
protected final AbstractVertex addGroup(String groupId, String iconKey, String label) { AbstractVertex vertex = new SimpleGroup(getNamespace(), groupId); if (containsVertexId(vertex)) { throw new IllegalArgumentException("A vertex or group with id " + groupId + " already exists!"); } LoggerFactory.getLogger(this.getClass()).debug("Adding a group: {}", groupId); vertex.setLabel(label); vertex.setIconKey(iconKey); addVertices(vertex); return vertex; }
private AbstractVertex createEntityVertex(String vertexId, String vertexName, String iconKey) { if (containsVertexId(vertexId)) { return (AbstractVertex) getVertex(TOPOLOGY_NAMESPACE_VMWARE, vertexId); } AbstractVertex vertex = new AbstractVertex(TOPOLOGY_NAMESPACE_VMWARE, vertexId, vertexName); vertex.setIconKey(iconKey); return vertex; }
private AbstractVertex createEntityVertex(String vertexId, String vertexName, String iconKey) { if (containsVertexId(vertexId)) { return (AbstractVertex) getVertex(TOPOLOGY_NAMESPACE_VMWARE, vertexId); } AbstractVertex vertex = new AbstractVertex(TOPOLOGY_NAMESPACE_VMWARE, vertexId, vertexName); vertex.setIconKey(iconKey); return vertex; }
cloudVertex.setLabel(""); cloudVertex.setIconKey("cloud"); cloudVertex.setTooltipText("'Shared Segment' with designated up bridge: " + topVertex.getLabel() + " port: " + segment.getDesignatedPort().getBridgePort()); addVertices(cloudVertex);
@Override public void execute(List<VertexRef> targets, OperationContext operationContext) { final AbstractVertex vertex = (AbstractVertex) targets.get(0); final String preSelectedIconId = operationContext.getGraphContainer().getIconManager().getSVGIconId(vertex); new IconSelectionDialog(preSelectedIconId) .withOkAction(iconWindow -> { final IconManager iconManager = operationContext.getGraphContainer().getIconManager(); final String newIconId = iconWindow.getSelectedIcon(); String newIconKey = iconManager.setIconMapping(vertex, newIconId); if (newIconKey != null) { // We have to temporary update the icon key, otherwise the icon is not updated (redoLayout has no effect) vertex.setIconKey(newIconKey); // Redo the layout to apply new icon operationContext.getGraphContainer().setDirty(true); operationContext.getGraphContainer().redoLayout(); } }) .open(); }
@Override public void execute(List<VertexRef> targets, OperationContext operationContext) { final AbstractVertex vertex = (AbstractVertex) targets.get(0); final String preSelectedIconId = operationContext.getGraphContainer().getIconManager().getSVGIconId(vertex); new IconSelectionDialog(preSelectedIconId) .withOkAction(iconWindow -> { final IconManager iconManager = operationContext.getGraphContainer().getIconManager(); final String newIconId = iconWindow.getSelectedIcon(); String newIconKey = iconManager.setIconMapping(vertex, newIconId); if (newIconKey != null) { // We have to temporary update the icon key, otherwise the icon is not updated (redoLayout has no effect) vertex.setIconKey(newIconKey); // Redo the layout to apply new icon operationContext.getGraphContainer().setDirty(true); operationContext.getGraphContainer().redoLayout(); } }) .open(); }