コード例 #1
0
  void init() {
    contexts = cadsrModule.getAllContexts();

    int contentCount = contextComboBox.getItemCount();
    int i = 0;
    while (i <= contentCount && contentCount != 0) {
      contextComboBox.removeItemAt(i);
      contentCount = contextComboBox.getItemCount();
    }

    for (Context _con : contexts) {
      contextComboBox.addItem(_con.getName());
    }

    contextComboBox.setSelectedItem(PropertyAccessor.getProperty("gme.generate.default.context"));
  }
コード例 #2
0
  public void initPackages() {
    packages = ElementsLists.getInstance().getElements(new FilterPackage(""));

    // packageComboBox.removeAll();
    int pkgCount = packageComboBox.getItemCount();
    int i = 0;
    while (i <= pkgCount && pkgCount != 0) {
      packageComboBox.removeItemAt(i);
      pkgCount = packageComboBox.getItemCount();
    }

    for (FilterPackage pkg : packages) packageComboBox.addItem(pkg.getName());

    if (packageComboBox.getItemCount() > 0)
      for (int j = 0; j < packageComboBox.getItemCount(); j++)
        if (packageComboBox
            .getItemAt(j)
            .toString()
            .trim()
            .equalsIgnoreCase("Logical View.Logical Model")) {
          packageComboBox.setSelectedIndex(j);
          break;
        }
  }