@Override public Vertex getVertexByKey(String vertexKey) { for(Vertex v : m_displayVertices) { if (vertexKey.equals(v.getKey())) { return v; } } return null; }
@Override public Vertex getVertexByKey(String vertexKey) { for(Vertex v : m_displayVertices) { if (vertexKey.equals(v.getKey())) { return v; } } return null; }
private String getSourceKey(Edge edge) { return m_graphContainer.getTopologyServiceClient().getVertex(edge.getSource().getVertex(), m_graphContainer.getCriteria()).getKey(); }
private String getTargetKey(Edge edge) { return m_graphContainer.getTopologyServiceClient().getVertex(edge.getTarget().getVertex(), m_graphContainer.getCriteria()).getKey(); }
private String getTargetKey(Edge edge) { return m_graphContainer.getTopologyServiceClient().getVertex(edge.getTarget().getVertex(), m_graphContainer.getCriteria()).getKey(); }
private String getSourceKey(Edge edge) { return m_graphContainer.getTopologyServiceClient().getVertex(edge.getSource().getVertex(), m_graphContainer.getCriteria()).getKey(); }
@Override public void visitVertex(Vertex vertex) throws PaintException { boolean selected = isSelected(m_graphContainer.getSelectionManager(), vertex); Point initialLocation = m_layout.getInitialLocation(vertex); Point location = m_layout.getLocation(vertex); SharedVertex v = new SharedVertex(); v.setKey(vertex.getKey()); //TODO cast to int for now v.setInitialX((int)initialLocation.getX()); v.setInitialY((int)initialLocation.getY()); v.setX((int)location.getX()); v.setY((int) location.getY()); v.setSelected(selected); v.setStatus(getStatus(vertex)); v.setStatusCount(getStatusCount(vertex)); v.setSVGIconId(getIconId(vertex)); v.setLabel(vertex.getLabel()); v.setTooltipText(getTooltipText(vertex)); v.setStyleName(getVertexStyle(vertex, selected)); v.setTargets(getTargets(vertex)); v.setEdgePathOffset(getEdgePathOffset(vertex)); m_vertices.add(v); }
@Override public void visitVertex(Vertex vertex) throws PaintException { boolean selected = isSelected(m_graphContainer.getSelectionManager(), vertex); Point initialLocation = m_layout.getInitialLocation(vertex); Point location = m_layout.getLocation(vertex); SharedVertex v = new SharedVertex(); v.setKey(vertex.getKey()); //TODO cast to int for now v.setInitialX((int)initialLocation.getX()); v.setInitialY((int)initialLocation.getY()); v.setX((int)location.getX()); v.setY((int) location.getY()); v.setSelected(selected); v.setStatus(getStatus(vertex)); v.setStatusCount(getStatusCount(vertex)); v.setSVGIconId(getIconId(vertex)); v.setLabel(vertex.getLabel()); v.setTooltipText(getTooltipText(vertex)); v.setStyleName(getVertexStyle(vertex, selected)); v.setTargets(getTargets(vertex)); v.setEdgePathOffset(getEdgePathOffset(vertex)); m_vertices.add(v); }