Package KFM

Examples of KFM.SwingWorker


                Rectangle tR2 = tDialog.getBounds();
                tDialog.setLocation(tRect.x + (tRect.width - tR2.width) / 2,
                                    tRect.y + (tRect.height - tR2.height) / 2);
                */

                SwingWorker tWorker;
                mRS = aRS;
                if(mUseTableModel) { // build table model
                    tWorker = new SwingWorker() {
                        public Object construct() {
                            try {
                                mModel = new TsqlTableModel(mRS);
                            } catch(SQLException e) {
                                System.err.println("new TableModel: " + e);
                            }
                            TsqlProgressDialog.getInstance().hide();
                            return null;
                        }
                    };
                    tWorker.start();
                    tDialog.show();

                    mAbortedQuery = tDialog.isAborted();
                } else {
                    mModel = null;
                }

                tWorker = new SwingWorker() {
                    public Object construct() {
                        try {
                            printResultSet(mModel, mRS);
                        } catch(Exception e) {
                            System.err.println("printResultSet: " + e);
                        }
                        TsqlProgressDialog.getInstance().hide();
                        return null;
                    }
                };

                tDialog.setTitle("Printing Resultset");
                tWorker.start();
                tDialog.show();
            } finally {
                // enable output textarea
                mInQuery = false;
                _outputGui(mInQuerySB.toString());
View Full Code Here

TOP

Related Classes of KFM.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.