Package javax.swing

Examples of javax.swing.DefaultListModel.clear()


    harness.check(m1.getSize(), 0);
    m1.addElement("A");
    harness.check(m1.getSize(), 1);
    m1.addElement("B");
    harness.check(m1.getSize(), 2);   
    m1.clear();
    harness.check(m1.getSize(), 0);
  }

}
View Full Code Here


    harness.checkPoint("isEmpty()");
    DefaultListModel m1 = new DefaultListModel();
    harness.check(m1.isEmpty());
    m1.addElement("A");
    harness.check(!m1.isEmpty());
    m1.clear();
    harness.check(m1.isEmpty());
  }

}
View Full Code Here

    harness.check(m1.size(), 0);
    m1.addElement("A");
    harness.check(m1.size(), 1);
    m1.addElement("B");
    harness.check(m1.size(), 2);   
    m1.clear();
    harness.check(m1.size(), 0);
  }

}
View Full Code Here

    harness.check(m1.lastElement(), "C");

    m1.addElement(null);
    harness.check(m1.lastElement(), null);
   
    m1.clear();
    boolean pass = false;
    try
    {
      /* Object o = */ m1.lastElement();
    }
View Full Code Here

        // the result computed by doInBackground().
        terminalsListRefreshing = true;
        try {
            DefaultListModel model = (DefaultListModel) readersList.getModel();
            Object selection[] = readersList.getSelectedValues();
            model.clear();
            for (TerminalInfo tI : terminals) {

                if (tI.isInTab()) {
                    //update tab title
                    loggingTabbedPane.updateTab(tI);
View Full Code Here

    DefaultListModel model1 = (DefaultListModel) instanceList.getModel();
    for (int j = 0; j < webPanels.length; j++) {
      if (j != panelIndex) {
        JList list = webPanels[j].instanceList;
        DefaultListModel model2 = (DefaultListModel) list.getModel();
        model2.clear();
        int n = model1.getSize();
        for (int i = 0; i < n; i++)
          model2.addElement(model1.get(i));
        list.setSelectedIndices(new int[] {});
        webPanels[j].enableButtons(list);
View Full Code Here

        }
    }

    public void setListData(String[] listData){
        DefaultListModel model = ((DefaultListModel)jList1.getModel());
        model.clear();
        for(int i=0; listData != null && i < listData.length; i++)
            model.addElement(listData[i]);
       
    }
    public void setListName(String listName){
View Full Code Here

      updateIgnoreSummary();
  }
 
  private void updateHiddenSetModels() {
      DefaultListModel model = (DefaultListModel) ignoreList.getModel();
      model.clear();
      List sortedIgnoreList = new ArrayList(getHiddenSet());
      Collections.sort(sortedIgnoreList);

      for (Iterator iter = sortedIgnoreList.iterator(); iter.hasNext();)
      {
View Full Code Here

     * @param pData = The data which must be of type DisplayNode[]
     */
    public void setListData(Object[] pData) {
        list.getSelectionModel().clearSelection();
        DefaultListModel dlm = (DefaultListModel)list.getModel();
        dlm.clear();
        if (pData != null) {
            for (int i = 0; i < pData.length; i++) {
                dlm.addElement(pData[i]);
            }
        }
View Full Code Here

     * @param pData = The data which must be of type DisplayNode[]
     */
    public void setListData(Object[] pData) {
        list.getSelectionModel().clearSelection();
        DefaultListModel dlm = (DefaultListModel)list.getModel();
        dlm.clear();
        if (pData != null) {
            for (int i = 0; i < pData.length; i++) {
                dlm.addElement(pData[i]);
            }
        }
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.