Exemple #1
0
  public void modelFromArray(String[] list) {
    debug("modelFromArray ()");

    DefaultListModel mdl = new DefaultListModel();

    for (int i = 0; i < list.length; i++) {
      HoopVisualFeature item = new HoopVisualFeature();
      item.setInstanceName(list[i]);
      item.setText(list[i]);
      mdl.addElement(item);
    }

    setModel(mdl);
  }
Exemple #2
0
  public void modelFromArrayList(ArrayList<String> list) {
    debug("modelFromArrayList ()");

    DefaultListModel mdl = new DefaultListModel();

    for (int i = 0; i < list.size(); i++) {
      String entry = list.get(i);
      HoopVisualFeature item = new HoopVisualFeature();
      item.setInstanceName(entry);
      item.setText(entry);
      mdl.addElement(item);
    }

    setModel(mdl);
  }