Package javax.swing

Examples of javax.swing.AbstractListModel


                                                             chosen_folders.getFoldersList(),
                                                             newFolders);
              for(File file : newFolders)
                chosen_folders.add(file);
              if(already_existed_folders.size() != 0) {
                 ExistedFoldersDialog existed_folders_dialog = new ExistedFoldersDialog(parent, true, new AbstractListModel() {
                   public int getSize() {
                 
                     return already_existed_folders.size();
                   }
                   public Object getElementAt(int i) {
View Full Code Here


              LinkedList<File> newFolders = new LinkedList<File>();
              final List<File> already_existed_folders = FileUtils.extractNewFolders(current_chosen_folders, chosen_folders.getFoldersList(), newFolders);
              for(File file : newFolders)
                chosen_folders.add(file);
              if(already_existed_folders.size() != 0) {
                  ExistedFoldersDialog existed_folders_dialog = new ExistedFoldersDialog(parent, true, new AbstractListModel() {
                   public int getSize() {
                 
                     return already_existed_folders.size();
                   }
                   public Object getElementAt(int i) {
View Full Code Here

    /**
     * Returns a list model from textures catalog.
     */
    private AbstractListModel createListModel(TexturesCatalog texturesCatalog) {
      final CatalogTexture [] textures = getTextures(texturesCatalog);
      return new AbstractListModel() {
          public Object getElementAt(int index) {
            return textures [index];
          }
   
          public int getSize() {
View Full Code Here

  }

  private void initReload(BOUser user) {
    final Object[] usersForSorting = userManager.getAllUsers().toArray();
    Arrays.sort(usersForSorting);
    lstUsers.setModel(new AbstractListModel() {
      public int getSize() {
        return usersForSorting.length;
      }

      public Object getElementAt(int index) {
View Full Code Here

  }

  private void initReload(BOProject project) {
    final Object[] projectsForSorting = projectManager.getAllProjects(null, ApplicationContext.getCurrentUser()).toArray();
    Arrays.sort(projectsForSorting);
    lstProjects.setModel(new AbstractListModel() {
      public int getSize() {
        return projectsForSorting.length;
      }

      public Object getElementAt(int index) {
View Full Code Here

  }

  private void initReload(BOProject project) {
    final Object[] projectsForSorting = projectManager.getAllProjects(null, ApplicationContext.getCurrentUser()).toArray();
    Arrays.sort(projectsForSorting);
    lstProjects.setModel(new AbstractListModel() {
      public int getSize() {
        return projectsForSorting.length;
      }

      public Object getElementAt(int index) {
View Full Code Here

    public SwingListPeer(SwingToolkit toolkit, final List list) {
        super(toolkit, list, new SwingList(list));
        SwingToolkit.add(list, peerComponent);
        SwingToolkit.copyAwtProperties(list, peerComponent);
        peerComponent.setModel(new AbstractListModel() {
            private static final long serialVersionUID = 1L;
            public Object getElementAt(int idx) {
                return list.getItem(idx);
            }
View Full Code Here

   
    JList docList = new JList();
    docScrollPane.setViewportView(docList);
    docList.setName("doc-lb");
    //docList.setModel(new DefaultComboBoxModel(new String[] {"All", "Doc", "Examples", "See alsos", "Comments", "Source", "Value"}));
    docList.setModel(new AbstractListModel() {
      String[] values = new String[] {"Doc", "Source", "Examples", "Comments", "See alsos", "Value"};
      public int getSize() {
        return values.length;
      }
      public Object getElementAt(int index) {
        return values[index];
      }
    });
    docList.setLayoutOrientation(JList.HORIZONTAL_WRAP);
    docList.setVisibleRowCount(-1);
   
    txtNsFilter = new JTextField();
    txtNsFilter.setName("ns-filter-tf");
    txtNsFilter.setFont(new Font("Monospaced", Font.PLAIN, 13));
    add(txtNsFilter, "cell 0 2 3 1,growx");
    txtNsFilter.setColumns(10);
   
    txtVarsFilter = new JTextField();
    txtVarsFilter.setName("vars-filter-tf");
    txtVarsFilter.setFont(new Font("Monospaced", Font.PLAIN, 13));
    add(txtVarsFilter, "cell 3 2 2 1,growx");
    txtVarsFilter.setColumns(10);
   
    txtClojurecoremap = new JTextField();
    txtClojurecoremap.setFont(new Font("Monospaced", Font.BOLD, 15));
    txtClojurecoremap.setName("doc-tf");
    txtClojurecoremap.setEditable(false);
    txtClojurecoremap.setText("clojure.core/map");
    add(txtClojurecoremap, "cell 5 2 2 1,growx");
    txtClojurecoremap.setColumns(10);
   
    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setName("ns-lb-sp");
    add(scrollPane, "cell 0 3 3 1,grow");
   
    JList list = new JList();
    scrollPane.setViewportView(list);
    list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    list.setName("ns-lb");
    list.setFont(new Font("Monospaced", Font.PLAIN, 13));
    list.setModel(new AbstractListModel() {
      String[] values = new String[] {"clojure.core", "clj.growlnitify.core", "123456789012345678901234567890123456"};
      public int getSize() {
        return values.length;
      }
      public Object getElementAt(int index) {
        return values[index];
      }
    });
   
    JScrollPane scrollPane_1 = new JScrollPane();
    scrollPane_1.setName("vars-lb-sp");
    add(scrollPane_1, "cell 3 3 2 1,grow");
   
    JList list_1 = new JList();
    list_1.setFont(new Font("Monospaced", Font.PLAIN, 13));
    list_1.setModel(new AbstractListModel() {
      String[] values = new String[] {"123456789012345678901234567890123456", "2", "3", "4", "5", "6", "7", "8", "9", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"};
      public int getSize() {
        return values.length;
      }
      public Object getElementAt(int index) {
View Full Code Here

            public void valueChanged(ListSelectionEvent e) {
                startupBackend.professionValueChanged(professionList.getSelectedIndex());
               
            }
        });
        professionList.setModel(new AbstractListModel() {
            /**
             *
             */
            private static final long serialVersionUID = 7908744601807059465L;
            String[] values = startupBackend.getProfessionValues();
View Full Code Here

            public void valueChanged(ListSelectionEvent e) {
                rationsPaceBackend.rationsListChanged(rationsList.getSelectedIndex());
               
            }
        });
        rationsList.setModel(new AbstractListModel() {
            /**
             *
             */
            private static final long serialVersionUID = -4548133300722898773L;
            String[] values = rationsPaceBackend.getRationsValues();
            public int getSize() {
                return values.length;
            }
            public Object getElementAt(int index) {
                return values[index];
            }
        });
       
        paceList = new JList();
        paceList.setVisibleRowCount(4);
        paceList.addListSelectionListener(new ListSelectionListener() {
           

            public void valueChanged(ListSelectionEvent arg0) {
                rationsPaceBackend.paceValueChanged(paceList.getSelectedIndex());

            }
        });
        paceList.setModel(new AbstractListModel() {
            /**
             *
             */
            private static final long serialVersionUID = 6536129015703048805L;
            String[] values = rationsPaceBackend.getPaceValues();//
View Full Code Here

TOP

Related Classes of javax.swing.AbstractListModel

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.