Package nu.fw.jeti.util

Examples of nu.fw.jeti.util.TableSorter$Row


    Container contentPane = dialog.getContentPane();
    contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.Y_AXIS));
    JLabel lbl = new JLabel(I18N.gettext("groupchat.bookmarks"));
    lbl.setAlignmentX(0.5f);
    contentPane.add(lbl);
        final TableSorter sorter = new TableSorter(conferencesTableModel);
        final JTable table = new JTable(sorter);
        sorter.setTableHeader(table.getTableHeader());
        sorter.setSortingStatus(0, TableSorter.ASCENDING);
        table.setAlignmentX(0.5f);
        table.setPreferredScrollableViewportSize(new Dimension(200, 100));
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        ListSelectionModel sm = table.getSelectionModel();
        sm.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                ListSelectionModel lsm =
                    (ListSelectionModel)e.getSource();
                delButton.setEnabled(!lsm.isSelectionEmpty());
            }
        });
    final JList list = new JList(conferences.toArray());
    list.setAlignmentX(0.5f);

        JScrollPane listScroller = new JScrollPane(table);
        contentPane.add(listScroller);
        delButton =
            new JButton(I18N.gettext("groupchat.delete_bookmark"));
        delButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        int i = sorter.modelIndex(table.getSelectedRow());
                if(i != -1) {
                    conferences.remove(i);
                    conferencesTableModel.update();
                    storeConferences();
          dialog.dispose();
View Full Code Here

TOP

Related Classes of nu.fw.jeti.util.TableSorter$Row

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.