Package au.edu.qut.yawl.swingWorklist.util

Examples of au.edu.qut.yawl.swingWorklist.util.TableSorter


                          JButton actionButton,
                          JButton cancelTaskButton,
                          JButton addInstanceButton,
                          JButton viewDataButton) {
        setLayout(new BorderLayout(10, 10));
        TableSorter sorter = new TableSorter(worklistModel); //ADDED THIS
        _myTable = new JTable(sorter);
        _myTable.setPreferredScrollableViewportSize(size);
        _myTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        worklistModel.addRow("InstanceValidator", new String[]{"", "", "", "", "", ""});

        synchronized (_myTable) {
            _myTable.setModel(worklistModel);
            _myTable.getColumnModel().getColumn(0).setPreferredWidth(45);
            _myTable.getColumnModel().getColumn(1).setPreferredWidth(45);
            _myTable.getColumnModel().getColumn(2).setPreferredWidth(250);
            _myTable.getColumnModel().getColumn(3).setPreferredWidth(100);
            _myTable.getColumnModel().getColumn(4).setPreferredWidth(100);
            _myTable.getColumnModel().getColumn(5).setPreferredWidth(100);
        }
        worklistModel.removeRow("InstanceValidator");
        sorter.addMouseListenerToHeaderInTable(_myTable); //ADDED THIS
        // Place table in JScrollPane
        JScrollPane scrollPane = new JScrollPane(_myTable);
        scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        // Add to Screen
        add(scrollPane, BorderLayout.CENTER);
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.swingWorklist.util.TableSorter

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.