本文整理汇总了Java中org.jgraph.graph.GraphConstants.setDashPattern方法的典型用法代码示例。如果您正苦于以下问题:Java GraphConstants.setDashPattern方法的具体用法?Java GraphConstants.setDashPattern怎么用?Java GraphConstants.setDashPattern使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgraph.graph.GraphConstants
的用法示例。
在下文中一共展示了GraphConstants.setDashPattern方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ArcView
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public ArcView(Object cell) {
super(cell);
Arc arc = (Arc)cell;
AttributeMap attributes = getAttributes();
if(arc.getArcType() == Arc.NORMAL_ARC){
GraphConstants.setLineEnd(attributes, GraphConstants.ARROW_TECHNICAL);
GraphConstants.setEndFill(attributes, true);
}
else if(arc.getArcType() == Arc.READ_ARC){
GraphConstants.setLineEnd(attributes, GraphConstants.ARROW_CIRCLE);
GraphConstants.setEndFill(attributes, true);
float[] dashPattern = {5,5};
GraphConstants.setDashPattern(attributes, dashPattern);
}
else if(arc.getArcType() == Arc.INHIBITOR_ARC){
GraphConstants.setLineEnd(attributes, GraphConstants.ARROW_CIRCLE);
GraphConstants.setEndFill(attributes, false);
}
GraphConstants.setEndSize(attributes, 8);
}
示例2: setModificationEdgeStyle
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
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 });
}
示例3: setAnnotationEdgeStyle
import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
private static void setAnnotationEdgeStyle(DefaultEdge edge) {
setEdgeStyle(edge);
GraphConstants.setForeground(edge.getAttributes(), Color.LIGHT_GRAY);
GraphConstants.setDashPattern(edge.getAttributes(), new float[] { 2f, 2f });
}