Java Code Examples for org.jgraph.graph.GraphConstants#setDashPattern()
The following examples show how to use
org.jgraph.graph.GraphConstants#setDashPattern() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ViewGraphModel.java From CQL with GNU Affero General Public License v3.0 | 6 votes |
/** * Returns the attribute map for virtual edges. * * @return a map of attributes to be used for new virtual edges */ private AttributeMap virtualEdgeAttributes() { AttributeMap map = commonEdgeAttributes(); GraphConstants.setLineEnd(map, GraphConstants.ARROW_NONE); GraphConstants.setLineBegin(map, GraphConstants.ARROW_NONE); GraphConstants.setDashPattern(map, new float[] { 5.0f, 3.0f }); Color color = getColor(_mode + "edge_virtual"); GraphConstants.setLineColor(map, color); GraphConstants.setForeground(map, color); GraphConstants.setLineWidth(map, getWidth(_mode + "edge_virtual", 1.5)); return map; }
Example 2
Source File: SketchGraphModel.java From CQL with GNU Affero General Public License v3.0 | 6 votes |
/** * Returns the attribute map for virtual edges. * * @return a map of attributes to be used for new virtual edges */ private AttributeMap virtualEdgeAttributes() { AttributeMap map = commonEdgeAttributes(); GraphConstants.setLineEnd(map, GraphConstants.ARROW_NONE); GraphConstants.setLineBegin(map, GraphConstants.ARROW_NONE); GraphConstants.setDashPattern(map, new float[] { 5.0f, 3.0f }); Color color = getColor(_mode + "edge_virtual"); GraphConstants.setLineColor(map, color); GraphConstants.setForeground(map, color); GraphConstants.setLineWidth(map, getWidth(_mode + "edge_virtual", 1.5)); return map; }
Example 3
Source File: ViewGraphModel.java From CQL with GNU Affero General Public License v3.0 | 5 votes |
/** * TRIANGLES CF2012 Set the attributes for display of a triangle edge. * * @param edge the edge to read attributes from * @return a map of attributes to be used for new triangle edges */ private static AttributeMap triangleEdgeAttributes( TriangleEdge<ViewFrame, ViewGraphModel, View, QueryNode, View_Edge> edge) { AttributeMap map = commonEdgeAttributes(); GraphConstants.setLineEnd(map, edge.getLineEnd()); GraphConstants.setLineBegin(map, edge.getLineBegin()); GraphConstants.setLineWidth(map, edge.getWidth()); GraphConstants.setLineColor(map, edge.getColor()); GraphConstants.setForeground(map, edge.getColor()); GraphConstants.setDashPattern(map, new float[] { edge.getWidth(), 3 }); return map; }
Example 4
Source File: SketchGraphModel.java From CQL with GNU Affero General Public License v3.0 | 5 votes |
/** * TRIANGLES CF2012 Set the attributes for display of a triangle edge. * * @param edge the edge to read attributes from * @return a map of attributes to be used for new triangle edges */ private static AttributeMap triangleEdgeAttributes( TriangleEdge<SketchFrame, SketchGraphModel, Sketch, EntityNode, SketchEdge> edge) { AttributeMap map = commonEdgeAttributes(); GraphConstants.setLineEnd(map, edge.getLineEnd()); GraphConstants.setLineBegin(map, edge.getLineBegin()); GraphConstants.setLineWidth(map, edge.getWidth()); GraphConstants.setLineColor(map, edge.getColor()); GraphConstants.setForeground(map, edge.getColor()); GraphConstants.setDashPattern(map, new float[] { edge.getWidth(), 3 }); return map; }
Example 5
Source File: MicroarrayGraph.java From chipster with MIT License | 5 votes |
private static void setModificationEdgeStyle(DefaultEdge edge) { setEdgeStyle(edge); GraphConstants.setLineBegin(edge.getAttributes(), GraphConstants.ARROW_TECHNICAL); GraphConstants.setBeginFill(edge.getAttributes(), true); GraphConstants.setBeginSize(edge.getAttributes(), 5); GraphConstants.setForeground(edge.getAttributes(), Color.LIGHT_GRAY); GraphConstants.setDashPattern(edge.getAttributes(), new float[] { 1f, 2f }); }
Example 6
Source File: MicroarrayGraph.java From chipster with MIT License | 4 votes |
private static void setAnnotationEdgeStyle(DefaultEdge edge) { setEdgeStyle(edge); GraphConstants.setForeground(edge.getAttributes(), Color.LIGHT_GRAY); GraphConstants.setDashPattern(edge.getAttributes(), new float[] { 2f, 2f }); }