当前位置: 首页>>代码示例>>Java>>正文


Java GraphConstants.setLineEnd方法代码示例

本文整理汇总了Java中org.jgraph.graph.GraphConstants.setLineEnd方法的典型用法代码示例。如果您正苦于以下问题:Java GraphConstants.setLineEnd方法的具体用法?Java GraphConstants.setLineEnd怎么用?Java GraphConstants.setLineEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jgraph.graph.GraphConstants的用法示例。


在下文中一共展示了GraphConstants.setLineEnd方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RelationEdge

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public RelationEdge(Relation aRelation, TableCell aImporting, TableCell aExporting) {

        super(aRelation);

        GraphConstants.setLineStyle(getAttributes(), GraphConstants.STYLE_ORTHOGONAL);
        GraphConstants.setConnectable(getAttributes(), false);
        GraphConstants.setDisconnectable(getAttributes(), false);
        GraphConstants.setBendable(getAttributes(), true);

        GraphConstants.setLineWidth(getAttributes(), 1);
        GraphConstants.setLineBegin(getAttributes(), LINE_BEGIN);
        GraphConstants.setLineEnd(getAttributes(), LINE_END);

        setSource(aImporting.getChildAt(0));
        setTarget(aExporting.getChildAt(0));
    }
 
开发者ID:mirkosertic,项目名称:ERDesignerNG,代码行数:17,代码来源:RelationEdge.java

示例2: addEdge

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public void addEdge( int source, int target){
   	//System.out.println("adding edge: "+source+"->"+ target+ "to cell "+cellCount);
   	DefaultEdge edge = new DefaultEdge();
   	edge.setSource(cells[source].getChildAt(0));
	edge.setTarget(cells[target].getChildAt(0));
	int arrow = GraphConstants.ARROW_CLASSIC;
	GraphConstants.setLineEnd(edge.getAttributes(), arrow);
	GraphConstants.setEndFill(edge.getAttributes(), true);
//	Node s = (Node)cells[source].getUserObject();
//	Node t = (Node)cells[target].getUserObject();
/*	_edge.arrow_x=(int)(s.x+t.x)/2;
	_edge.arrow_y=(int)(s.y+t.y)/2;*/
	
   	cells[cellCount] = edge;
   	edgeCount++;
   	cellCount++;
   }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:18,代码来源:BinomialTradingApplication.java

示例3: connect

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public void connect(Point2D start, Point2D current, PortView inPort, PortView outPort) {
	Point2D p = fromScreen(start);
	Point2D p2 = fromScreen(current);
	if (inPort != null && outPort != null) {
		ArrayList<Point2D> list = new ArrayList<Point2D>();
		list.add(p);
		list.add(p2);
		Map map = new Hashtable();
		GraphConstants.setPoints(map, list);
		GraphConstants.setRouting(map, JmtGraphConstants.ROUTING_JMT);
		GraphConstants.setLineEnd(map, GraphConstants.ARROW_CLASSIC);
		GraphConstants.setEndFill(map, true);
		GraphConstants.setConnectable(map, false);
		GraphConstants.setDisconnectable(map, false);
		Map<Object, Map> viewMap = new Hashtable<Object, Map>();
		// Adds connection into underlying data structure
		Object sourceKey = ((CellComponent) ((JmtCell) ((OutputPort) (outPort.getCell())).getUserObject()).getUserObject()).getKey();
		Object targetKey = ((CellComponent) ((JmtCell) ((InputPort) (inPort.getCell())).getUserObject()).getUserObject()).getKey();
		JmtEdge connection = new JmtEdge(sourceKey, targetKey, this);
		viewMap.put(connection, map);
		Object[] insert = new Object[] { connection };
		ConnectionSet cs = new ConnectionSet();
		cs.connect(connection, outPort.getCell(), true);
		cs.connect(connection, inPort.getCell(), false);
		// Visualizes connection only if it can be created into data structure
		if (model.setConnected(sourceKey, targetKey, true)) {
			graph.getModel().insert(insert, viewMap, cs, null, null);
		}
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:31,代码来源:Mediator.java

示例4: 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);
			
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:28,代码来源:ArcView.java

示例5: ActionAssociationView

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public ActionAssociationView(Object cell) {
	super(cell);
	
	AttributeMap attributes = getAttributes();
	GraphConstants.setLineEnd(attributes, GraphConstants.ARROW_SIMPLE);
	GraphConstants.setEndSize(attributes, 15);
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:8,代码来源:ActionAssociationView.java

示例6: GeneralizationView

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public GeneralizationView(Object cell) {
	super(cell);
	
	AttributeMap attributes = getAttributes();
	GraphConstants.setLineEnd(attributes, GraphConstants.ARROW_TECHNICAL);
	GraphConstants.setEndSize(attributes, 15);
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:8,代码来源:GeneralizationView.java

示例7: createEdgeAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
private Map createEdgeAttributes()
   {
       Map map = new HashMap();
       // Add a Line End Attribute
       GraphConstants.setLineEnd(map, GraphConstants.ARROW_SIMPLE);
       // Add a label along edge attribute
       GraphConstants.setLabelAlongEdge(map, true);
       return map;
   }
 
开发者ID:tchico,项目名称:dgMaster-trunk,代码行数:11,代码来源:DBWizardEREditor.java

示例8: createConnection

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
private DefaultEdge createConnection(DefaultGraphCell cell) {
    DefaultEdge edge = new DefaultEdge();
    edge.setSource(stack.peek().getChildAt(0));
    edge.setTarget(cell);

    // Set Arrow Style for edge
    int arrow = GraphConstants.ARROW_TECHNICAL;
    GraphConstants.setLineEnd(edge.getAttributes(), arrow);
    GraphConstants.setEndFill(edge.getAttributes(), true);
    return edge;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:12,代码来源:GraphVisitor.java

示例9: connect

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public void connect(Point2D start, Point2D current, PortView inPort, PortView outPort) {
	Point2D p = fromScreen(start);
	Point2D p2 = fromScreen(current);
	if (inPort != null && outPort != null) {
		ArrayList<Point2D> list = new ArrayList<Point2D>();
		list.add(p);
		list.add(p2);
		Map map = new Hashtable();
		GraphConstants.setPoints(map, list);
		GraphConstants.setRouting(map, GraphConstants.ROUTING_SIMPLE);
		GraphConstants.setRouting(map, JmtGraphConstants.ROUTING_JMT);
		GraphConstants.setEndFill(map, true);

		// 24/09/03 - Massimo Cattai
		// //////////////////////////////////////////
		// Add a Line End Attribute
		GraphConstants.setLineEnd(map, GraphConstants.ARROW_CLASSIC);
		// 24/09/03 - end
		// /////////////////////////////////////////////////////
		Map<Object, Map> viewMap = new Hashtable<Object, Map>();
		// ---- Adds connection into underlayng data structure -- BERTOLI
		// MARCO
		Object sourceKey = ((CellComponent) ((JmtCell) ((OutputPort) (outPort.getCell())).getUserObject()).getUserObject()).getKey();
		Object targetKey = ((CellComponent) ((JmtCell) ((InputPort) (inPort.getCell())).getUserObject()).getUserObject()).getKey();
		JmtEdge connection = new JmtEdge(sourceKey, targetKey, this);
		viewMap.put(connection, map);
		Object[] insert = new Object[] { connection };
		ConnectionSet cs = new ConnectionSet();
		cs.connect(connection, outPort.getCell(), true);
		cs.connect(connection, inPort.getCell(), false);
		// Visualize connection only if it can be created into data
		// structure
		if (model.setConnected(sourceKey, targetKey, true)) {
			graph.getModel().insert(insert, viewMap, cs, null, null);
			// FG
			// no = false;
		}
		// ---- End -- BERTOLI MARCO
	}

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:42,代码来源:Mediator.java

示例10: ArcGraphCell

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
public ArcGraphCell() {
    GraphConstants.setLineEnd(getAttributes(), GraphConstants.ARROW_TECHNICAL);
    GraphConstants.setLabelPosition(getAttributes(), new Point2D.Double(GraphConstants.PERMILLE / 2, -10));
    GraphConstants.setFont(getAttributes(), FONT);
}
 
开发者ID:tomaszi1,项目名称:petri-nets-simulator,代码行数:6,代码来源:ArcGraphCell.java


注:本文中的org.jgraph.graph.GraphConstants.setLineEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。