/** Compute the labelling for all dirEdges in this star, as well as the overall labelling */ public void computeLabelling(GeometryGraph[] geom) { // Debug.print(this); super.computeLabelling(geom); // determine the overall labelling for this DirectedEdgeStar // (i.e. for the node it is based at) label = new Label(Location.NONE); for (Iterator it = iterator(); it.hasNext(); ) { EdgeEnd ee = (EdgeEnd) it.next(); Edge e = ee.getEdge(); Label eLabel = e.getLabel(); for (int i = 0; i < 2; i++) { int eLoc = eLabel.getLocation(i); if (eLoc == Location.INTERIOR || eLoc == Location.BOUNDARY) label.setLocation(i, Location.INTERIOR); } } // Debug.print(this); }
void updateYOfLabel(Label label, int newY) { label.setLocation(new ACartesianPoint(label.getLocation().getX(), newY)); }
void updateXOfLabel(Label label, int newX) { label.setLocation(new ACartesianPoint(newX, label.getLocation().getY())); }