processwin.java
来自「一个agent 工具包,可以开发移动设备应用,考虑了安全措施」· Java 代码 · 共 89 行
JAVA
89 行
package SOMA.resourceManagement.windows;
import SOMA.resourceManagement.*;
import java.awt.event.*;
import javax.swing.*;
/**
* Finestra che visualizza le informazioni relative ai processi dell'host.
*
* @see SOMA.resourceManagement.PlaceResourceManager
* @see SOMA.resourceManagement.windows.AgentWin
* @see SOMA.resourceManagement.windows.NetworkWin
* @see SOMA.resourceManagement.windows.ThresholdWin
* @see SOMA.resourceManagement.windows.AlarmWin
* @see SOMA.resourceManagement.windows.PRMWindow
*
* @author Luca Armani
*/
class ProcessWin extends JFrame implements ActionListener,WindowListener{
protected PlaceResourceManager prm;
protected ProcessWinData data;
public ProcessWin(PlaceResourceManager prm){
super("Process Monitor");
this.prm=prm;
setBounds(360,0,350,460);
setJMenuBar(myMenuBar());
addWindowListener(this);
data=new ProcessWinData(prm);
JTable tab=new JTable(data);
tab.setDefaultRenderer(Integer.class,data);
tab.getSelectionModel().addListSelectionListener(data);
JSplitPane split=new JSplitPane(JSplitPane.VERTICAL_SPLIT,
new JScrollPane(tab),
data.getDetail());
getContentPane().add(split);
setVisible(true);
}
public void actionPerformed(ActionEvent e){
Object x=e.getSource();
String label;
if(x instanceof JMenuItem){
label=((JMenuItem)x).getText();
if(label.equals("About...")) help();
}
}
public void help(){
JOptionPane.showMessageDialog(null,
"University of Bologna\n9/2/2000\n\nProcess Monitor\nwritten with JNI v1.2",
"About",JOptionPane.INFORMATION_MESSAGE);
}
protected JMenuBar myMenuBar(){
JMenuBar menubar;
JMenu menu;
JMenuItem elem;
menubar=new JMenuBar();
menu=new JMenu("Help");
elem=new JMenuItem("About...");
elem.addActionListener(this);
menu.add(elem);
menubar.add(menu);
return menubar;
}
public void windowOpened(WindowEvent e){}
public void windowClosing(WindowEvent e)
{dispose(); data.exit(); }
public void windowClosed(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?