Exemplo n.º 1
0
  protected void refreshProperties() {
    patternList.removeAllComponents();

    for (String patternID : detail.getTypes()) {
      PatternPanel dp = new PatternPanel(app.getType(patternID));
      patternList.addComponent(dp);
    }
  }
Exemplo n.º 2
0
  public void addNewPattern(String patternID) {
    if (!detail.getTypes().contains(patternID)) {
      NType p = app.getType(patternID);
      if (p != null) {
        detail.addType(patternID);

        for (Property pr : app.getAvailableProperties(detail).keySet()) {
          if (pr.getCardinalityMin() > 0) {
            for (int i = getPropertiesPresent(pr.getID()); i < pr.getCardinalityMin(); i++) {
              addProperty(pr.getID());
            }
          }
        }
      }

      refreshPatternBar();
      refreshProperties();
    }
  }