Package javax.swing

Examples of javax.swing.JList


    private void initComponents() {

        shared_folders_panel = new JPanel();
        shared_folders_scrollpanel = new JScrollPane();
        folder_list = new JList();
        desc_label = new JLabel();
        add_button = new JButton();
        remove_button = new JButton();
        remove_all_button = new JButton();
View Full Code Here


        JPanel listPanel = new JPanel(new BorderLayout());
        listPanel.setBorder(BorderFactory.createTitledBorder(resources.getString("ActionList")));

        listModel = new DefaultListModel();
        for (Iterator it = actionList.iterator(); it.hasNext(); ) listModel.addElement(it.next());
        list = new JList(listModel);
        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        listPanel.add(new JScrollPane(list), BorderLayout.CENTER);
        definitionBox.add(listPanel);

        if (listModel.size()>0) list.setSelectedIndex(0);
View Full Code Here

    private void initComponents() {

        desc_label = new JLabel();
        existed_folders_scroll_panel = new JScrollPane();
        existed_folders_list = new JList();
        ok_button = new JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Existed folders");
        setModal(true);
View Full Code Here

      super(JSynoptic.gui.getOwner(),title,false); // Non modal => can play with L&F changes immediately
     
      listModel  = new DefaultListModel();

      //Create the list and put it in a scroll pane.
      list = new JList(listModel);
      list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      list.setVisibleRowCount(10);
      JScrollPane listScrollPane = new JScrollPane(list);
      getContentPane().add(listScrollPane);
     
View Full Code Here

                listModel.addElement(resources.getStringValue("languageName" + i));
                if (resources.getStringValue("languageCode" + i).equals(oldcode)) {
                    sel = i;
                }
            }
            JList langlist = new JList(listModel);
            langlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            if (sel != -1) {
                langlist.setSelectedIndex(sel);
            }
            int result = JOptionPane.showConfirmDialog(owner, langlist, resources.getString("chooseLanguageTitle"),
                    JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
            if ((result == JOptionPane.OK_OPTION) && (langlist.getSelectedIndex() != -1)) {
                String code = resources.getStringValue("languageCode" + langlist.getSelectedIndex());
                Run.getProperties().setString("jsynoptic.language", (code != null) ? code : "");
            }
        } else if (e.getSource() == miFindPlugins) {
            setStatus(messageWriter.print0args("lookingForPlugins"));
            new LongAction() {
View Full Code Here

        public ShapePageModel(String pageTitle, Icon pageIcon) {
            super(pageTitle, pageIcon, null);
            
            this.shapeCreatorList = new ArrayList();
           
            listComponent = new JList();
            setPageContent(new JScrollPane(listComponent));
        }
View Full Code Here

            shapeCreatorList.add(sp);

            Object[] array = shapeCreatorList.toArray();
            Arrays.sort(array);
           
            listComponent = new JList(array);
            listComponent.setTransferHandler(new ShapeTransferHandler());
            listComponent.setDragEnabled(true);

            setPageContent(new JScrollPane(listComponent));
        }
View Full Code Here

        // mapper panel
        mPanel = new GridBagPanel(resources.getString("ChooseAColorMapper"));

        final ColorMapperListModel listModel = new ColorMapperListModel();
        // Create the list and put it in a scroll pane.
        cmlist = new JList(listModel);
        cmlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        cmlist.setVisibleRowCount(5);
        JScrollPane cmlistScrollPane = new JScrollPane(cmlist);

        cmNew = new JButton(resources.getString("New"));
View Full Code Here

        };
        // Image mapper
        lcolorMapper = new JLabel(resources.getString("ChooseAnImageMapper"));
        final ImageMapperListModel listModel = new ImageMapperListModel();
        // Create the list and put it in a scroll pane.
        cmlist = new JList(listModel);
        cmlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        cmlist.setVisibleRowCount(5);
        JScrollPane cmlistScrollPane = new JScrollPane(cmlist);
        bnew = new JButton(resources.getString("New"));
        bdelete = new JButton(resources.getString("Delete"));
View Full Code Here

     The value is set to 3, therefore we set it hard here.
     */
     this.setDefaultCloseOperation(3);
     jList1.addListSelectionListener(new ListSelectionListener() {
         public void valueChanged(ListSelectionEvent evt) {
            JList source = (JList) evt.getSource();
            MessageWrapper selection = (MessageWrapper) source.getSelectedValue();
            if (selection != null) {
               String secretCallbackSessionId = selection.getSecretCallbackSessionId();
               UpdateKey updateKey = selection.getUpdateKey();
               byte[] content = selection.getContent();
               UpdateQos updateQos = selection.getUpdateQos();
View Full Code Here

TOP

Related Classes of javax.swing.JList

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.