public RoleEntity(String id) { super(id); attributes=new org.jgraph.graph.AttributeMap(); GraphConstants.setDisconnectable(attributes,false); }
private static Hashtable edgesAttributes(DefaultEdge[] edges, String[] roleAssignation) { Hashtable edgesAttributes = new Hashtable(); for (int i = 0; i < roleAssignation.length; i++) { // Create a Map that holds the attributes for the edge RoleEntity re = (RoleEntity) edges[i].getUserObject(); Map attr = re.getAttributes(); // Source /*if (selectedAssignation[i].indexOf("source") >= 0) // Add a Line Begin Attribute GraphConstants.setLineBegin(attr, GraphConstants.SIMPLE);*/ // Target if (roleAssignation[i].toUpperCase().indexOf("TARGET") >= 0 || roleAssignation[i].endsWith("T")) { // Add a Line End Attribute GraphConstants.setLineEnd(attr, GraphConstants.ARROW_SIMPLE); // Associate the Edge with its Attributes } GraphConstants.setDisconnectable(attr,false); GraphConstants.setLineWidth(attr, 1); GraphConstants.setEndSize(attr, 7); GraphConstants.setBendable(attr,false); edgesAttributes.put(edges[i], attr); } return edgesAttributes; }
private Hashtable edgesAttributes(DefaultEdge[] edges, String[] roleAssignation) { Hashtable edgesAttributes = new Hashtable(); for (int i = 0; i < roleAssignation.length; i++) { // Create a Map that holds the attributes for the edge RoleEntity re = (RoleEntity) edges[i].getUserObject(); Map attr = re.getAttributes(); // Source /*if (selectedAssignation[i].indexOf("source") >= 0) // Add a Line Begin Attribute GraphConstants.setLineBegin(attr, GraphConstants.SIMPLE);*/ // Target if (roleAssignation[i].toUpperCase().indexOf("TARGET") >= 0 || roleAssignation[i].endsWith("T")) { // Add a Line End Attribute GraphConstants.setLineEnd(attr, GraphConstants.ARROW_SIMPLE); // Associate the Edge with its Attributes } GraphConstants.setDisconnectable(attr,false); GraphConstants.setLineWidth(attr, 1); GraphConstants.setEndSize(attr, 7); GraphConstants.setBendable(attr,false); edgesAttributes.put(edges[i], attr); } return edgesAttributes; }
GraphConstants.setDisconnectable(attr,false);
GraphConstants.setDisconnectable(attr,false);
GraphConstants.setBorder(map, new LineBorder(Color.BLACK)); GraphConstants.setDisconnectable(map, false); GraphConstants.setEndFill(map, true); GraphConstants.setLineStyle(map, GraphConstants.STYLE_SPLINE); GraphConstants.setDisconnectable(map, false); GraphConstants.setEditable(map, false); GraphConstants.setLineColor(map, Color.LIGHT_GRAY); GraphConstants.setLineStyle(map, GraphConstants.STYLE_SPLINE); GraphConstants.setDisconnectable(map, false); GraphConstants.setEditable(map, false);