Ejemplo n.º 1
0
  /** 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);
  }
Ejemplo n.º 2
0
 void updateYOfLabel(Label label, int newY) {
   label.setLocation(new ACartesianPoint(label.getLocation().getX(), newY));
 }
Ejemplo n.º 3
0
 void updateXOfLabel(Label label, int newX) {
   label.setLocation(new ACartesianPoint(newX, label.getLocation().getY()));
 }