Esempio n. 1
0
  public String debug() {
    if (logger.getEffectiveLevel().equals(Level.ALL)) {
      return "";
    }
    // otherwise we want output

    StringBuilder sb = new StringBuilder();
    sb.append("remove ");
    sb.append(m_from.printContour(m_removed));
    sb.append("\n");

    sb.append(" from ");
    sb.append(m_from.debugAsSentence());
    sb.append("\n");

    sb.append(" to ");
    sb.append(m_to.debugAsSentence());
    sb.append("\n");

    sb.append(" zonesMoved: ");
    Set<Map.Entry<AbstractBasicRegion, AbstractBasicRegion>> entries = m_zones_moved.entrySet();
    for (Map.Entry<AbstractBasicRegion, AbstractBasicRegion> z_map : entries) {
      sb.append("<");
      sb.append(z_map.getKey().debug());
      sb.append("->");
      sb.append(z_map.getValue().debug());
      sb.append(">");
    }
    return sb.toString();
  }
  private void goDraw(String description, int decomp_strategy, int recomp_strategy) {

    ConcreteDiagram cd = null;
    String failureMessage = null;
    try {
      AbstractDescription adr = AbstractDescription.makeForTesting(description);
      DEB.out(1, "draw " + adr.debug());
      DiagramCreator dc =
          new DiagramCreator(
              adr,
              DecompositionStrategy.getStrategy(decomp_strategy),
              RecompositionStrategy.getStrategy(recomp_strategy));
      cd = dc.createDiagram(SIZE);
    } catch (CannotDrawException x) {
      failureMessage = x.message;
    }
    resultPanel.show(description, failureMessage, cd, SIZE, useColors);
  }
Esempio n. 3
0
 private double checksum() {
   return 1.1 * m_from.checksum() + 1.3 * m_to.checksum();
 }