Package org.rioproject.tools.ui.util

Examples of org.rioproject.tools.ui.util.SwingWorker


        });

        /* Increase instance behavior */
        increaseService.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                SwingWorker worker = new SwingWorker() {
                    public Object construct() {
                        try {
                            int planned = sElem.getPlanned();
                            opMgr.increment(sElem, true, null);
                            planned++;
                            sElem.setPlanned(planned);
                            String value = Integer.toString(planned);
                            ServiceAttributeTableItem tableItem =
                                    new ServiceAttributeTableItem();
                            tableItem.attributeDescription = new JLabel(value);
                            DefaultTableModel tableModel =
                                    (DefaultTableModel)serviceAttributeTable.getModel();
                            tableModel.setValueAt(tableItem,
                                                  2,   /*row*/
                                                  1)/*column*/
                            setInstanceTableLabel(sElem,
                                                  initializeInstanceTable(
                                                          opMgr.getServiceBeanInstances(sElem)));
                        } catch (Exception e) {
                            Util.showError(e, parent, "Unable to increase instance count");
                        }

                        return null;
                        }
                    };
                    worker.start();
            }
        });
        /* Decrease instance behavior */
        decreaseService.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
View Full Code Here

TOP

Related Classes of org.rioproject.tools.ui.util.SwingWorker

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.