Package javax.swing

Examples of javax.swing.ListModel


            if (border != null && border instanceof GridTitledBorder) {
                RadioList.this.setBorder(new TitledBorder(((GridTitledBorder)border).getTitle()));
            }

            model = new ListModel() {
                public void addListDataListener(ListDataListener l) {}

                public Object getElementAt(int index) {
                    return new ListElement( index, namesForVisualEditor[index], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE );
                }
View Full Code Here


            if (border != null && border instanceof GridTitledBorder) {
                RadioList.this.setBorder(new TitledBorder(((GridTitledBorder)border).getTitle()));
            }

            model = new ListModel() {
                public void addListDataListener(ListDataListener l) {}

                public Object getElementAt(int index) {
                    return new ListElement( index, namesForVisualEditor[index], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE );
                }
View Full Code Here

        return widthForData;
    }
   
    @Override
    public void setModel(ListModel model) {
      ListModel oldModel = this.getModel();
      if (oldModel != null) {
        oldModel.removeListDataListener(this);
      }
      super.setModel(model);
      model.addListDataListener(this);
      // We have a new model, update it's data
      this.updateList();
View Full Code Here

        // Ejecutamos la descarga...
        try {
            m_scanner.connectDevice();
            m_scanner.startUploadProduct();
           
            ListModel l = m_bd.getListModel();
            for (int i = 0; i < l.getSize(); i++) {
                Object[] myprod = (Object[]) l.getElementAt(i);
                m_scanner.sendProduct(
                    (String) myprod[3], // name
                    (String) myprod[2], // barcode
                    (Double) myprod[6// buy price
                );          
View Full Code Here

        return widthForData;
    }
   
    @Override
    public void setModel(ListModel model) {
      ListModel oldModel = this.getModel();
      if (oldModel != null) {
        oldModel.removeListDataListener(this);
      }
      super.setModel(model);
      model.addListDataListener(this);
      // We have a new model, update it's data
      this.updateList();
View Full Code Here

            list.repaint();
        }
        maybeUpdateLayoutState();

        ListCellRenderer renderer = list.getCellRenderer();
        ListModel dataModel = list.getModel();
        ListSelectionModel selModel = list.getSelectionModel();

        if (renderer == null || dataModel.getSize() == 0) {
            return;
        }

        // Determine how many columns we need to paint
        Rectangle paintBounds = g.getClipBounds();
View Full Code Here

        if (aList instanceof List)
            return ((List<?>) aList).indexOf(element);

        // Search the first occurrence of element in the list model.
        ListModel listModel = (ListModel) aList;
        int size = listModel.getSize();
        for (int index = 0; index < size; index++) {
            if (element.equals(listModel.getElementAt(index)))
                return index;
        }
        return NO_SELECTION_INDEX;
    }
View Full Code Here

    public String getConexiones()
    {
        // se tiene que recorrer las conexiones seleccionadas y componer un string separado por ";"
        String resultado = "";
        ListModel lm = lSeleccionados.getModel();
        for(int i=0,j=lm.getSize();i<j;i++)
        {
            if(i!=0)
                resultado += ";" + (String)lm.getElementAt(i);
            else
                resultado += (String)lm.getElementAt(i);
        }
   
        return resultado;
    }
View Full Code Here

        loader.selectedFile = new File(args[0]);
        ErlangApplicationLoader.zapErlFiles(loader.selectedFile);
       
        if (loader.loadData() && loader.modules.getModel().getSize() != 1)
        {
          ListModel modules = loader.modules.getModel();
          StringBuffer tooManyException = new StringBuffer("more than a single module choice for app "+loader.selectedFile+"\n");
          for(int i=0;i<modules.getSize();++i)
          {
            tooManyException.append(modules.getElementAt(i));tooManyException.append('\n');
          }
          throw new IllegalArgumentException(tooManyException.toString());
        }
        loader.modules.setSelectedIndex(0);
        loader.beginButtonActionPerformed(null);
View Full Code Here

            if (border != null && border instanceof GridTitledBorder) {
                RadioList.this.setBorder(new TitledBorder(((GridTitledBorder)border).getTitle()));
            }

            model = new ListModel() {
                public void addListDataListener(ListDataListener l) {}

                public Object getElementAt(int index) {
                    return new ListElement( index, namesForVisualEditor[index], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE );
                }
View Full Code Here

TOP

Related Classes of javax.swing.ListModel

Copyright © 2018 www.massapicom. 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.