frameworkthreads2.java
来自「一个java RMI 调用的FrameWork, 由IBM提供」· Java 代码 · 共 104 行
JAVA
104 行
/*
* Copyright (C) 2001 Cooperative Software Systems, Inc. <info@coopsoft.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You received a copy of the GNU General Public License
* along with this software. For more information on GNU, see
* http://www.gnu.org or write to: the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* In support of FrameWorkThread visual class
*
*/
import javax.swing.*;
import java.util.*;
public class FrameWorkThreads2 {
// indicators
private int refresh_Result = 0;
// old value from the import
private String O_que_name = "";
private String[] from = null;
// new values from the window
private String N_que_name = null;
// internal comm
private SvrComm svr = null;
/**
* Constructor
*/
public FrameWorkThreads2 ( ) {
// get the internal svr comm
svr = new SvrComm();
} // end-constructor
public int getRefResult () {
return refresh_Result;
} // end-method
/**
*
*/
public void refreshButton(JTextField S_que_name,
javax.swing.JList S_list) {
// set the queue name
O_que_name = S_que_name.getText();
// over to server
from = svr.fetchThreads(O_que_name);
// When a commumication failure
if (from == null) {
// error
refresh_Result = 0;
// done
return;
} // endif
// When the que name was not found
if (from[0].compareTo("N287") == 0) {
// error
refresh_Result = 2;
// done
return;
} // endif
// update the JList
S_list.setListData(from);
// good return
refresh_Result = 3;
} // end-method
} // end-class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?