Package nixonftp.list

Examples of nixonftp.list.NXDefaultListModel.addElement()


  public void setFilters(NXFilter[] filters) {
    if (filters == null) return;
    NXDefaultListModel lm = (NXDefaultListModel) list.getModel();
    for (int x = 0; x < filters.length; x++) {
      lm.addElement(filters[x]);
    }
    list.setModel(lm);
  }
 
  public void itemStateChanged(ItemEvent e) {
View Full Code Here


      }

      NXFilter filter = new NXFilter(type, action, range, value, unit);
      filter.setColor(color);

      lm.addElement(filter);
    } else if (source.equals(removeFilter)) {
      int selected = list.getSelectedIndex();
      if (selected != -1) {
        lm.remove(selected);
        if (selected > 1) {
View Full Code Here

    for (int x = 0; x < m.getSize(); x++) {
      oi = (NXObjectIndex) m.getElementAt(x);
      for (int y = 0; y < items.length; y++) {
        if (oi.name.equals(items[y].name)) alreadyExists[y] = true;
      }
      dm.addElement(oi);
    }

    for (int z = 0; z < items.length; z++) {
      if (!alreadyExists[z]) dm.addElement(items[z]);
    }
View Full Code Here

      }
      dm.addElement(oi);
    }

    for (int z = 0; z < items.length; z++) {
      if (!alreadyExists[z]) dm.addElement(items[z]);
    }
   
    list.setModel(dm);
  }
View Full Code Here

    ListModel m = list.getAdapterModel();
    NXObjectIndex oi;
    for (int x = 0; x < m.getSize(); x++) {
      oi = (NXObjectIndex) m.getElementAt(x);
      for (int y = 0; y < items.length; y++) {
        if (!oi.name.equals(items[y].name)) dm.addElement(oi);
      }
    }
    list.setModel(dm);
  }
View Full Code Here

    JScrollPane listScroll = new JScrollPane(list);
    NXDefaultListModel listModel = new NXDefaultListModel();
    list.setModel(listModel);
    for (int x = 0; x < errors.size(); x++) {
      NXQueueItem item = (NXQueueItem) errors.get(x);
      listModel.addElement("<html>" + item.error +
            "<br><font color='#888888'>Local File: </font>" + item.localFile +
            "<br><font color='#888888'>Remote File: </font>" + item.remoteFile +
            "</html>");
    }
    add(listScroll);
View Full Code Here

        }
      }
      if (panel.listing) {
        tableModel.addRow(oioi);
      } else {
        listModel.addElement(oioi);
      }
    }

    if (!panel.listing) {
      model = new NXSortedListModel(listModel, NXSortedListModel.SortOrder.DESCENDING, new NXObjectComparator());
View Full Code Here

        }
        NXObjectIndex driveIndex = new NXObjectIndex('z', drivePath);
        if (localPanel.listing) {
          tableModel.addRow(driveIndex);
        } else {
          listModel.addElement(driveIndex);
        }
        drives.objects.put(drivePath, driveIndex);
      }
      NXObjectIndex homeItem = new NXObjectIndex('h', "Home");
      if (localPanel.listing) {
View Full Code Here

      NXObjectIndex homeItem = new NXObjectIndex('h', "Home");
      if (localPanel.listing) {
        tableModel.addRow(homeItem);
        table.setModel(tableModel);
      } else {
        listModel.addElement(homeItem);
        sortedModel = new NXSortedListModel(listModel, NXSortedListModel.SortOrder.DESCENDING, new NXObjectComparator());
        list.setModel(sortedModel);
      }
      drives.objects.put("Home", homeItem);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.