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.setEndSize(attr, 7);
GraphConstants.setBeginSize(aggregateStyle, 6); GraphConstants.setLineEnd(aggregateStyle, GraphConstants.ARROW_SIMPLE); GraphConstants.setEndSize(aggregateStyle, 8); GraphConstants.setLabelPosition(aggregateStyle, new Point2D.Double(500, 0));
GraphConstants.setEndSize(map, 6); GraphConstants.setLineColor(map, Color.LIGHT_GRAY); GraphConstants.setLineStyle(map, GraphConstants.STYLE_SPLINE);