📄 servermonitorpage.java
字号:
/**
* Copyright (c) 2001
* Template File
* ServerMonitorPage.java.template
* IDL Object
* humanresourcedemo.HumanResource
* Generation Date
* 2001年12月10日 下午10时17分53秒
* IDL Source File
* E:/HumanResourceDemo/src/humanresourcedemo/HumanResource.idl
* Abstract
* Implements a Server Monitor page to display interface counters.
* @version 1.0
*/
package humanresourcedemo.HumanResource.server;
import java.awt.*;
public class ServerMonitorPage extends javax.swing.JPanel
{
java.util.ResourceBundle res = java.util.ResourceBundle.getBundle("humanresourcedemo.HumanResource.server.ServerResources");
GridBagLayout gridBagLayout1 = new GridBagLayout();
GridLayout gridLayout1 = new GridLayout(1, 2, 3, 0);
javax.swing.JPanel panelOuter1 = new javax.swing.JPanel();
javax.swing.JPanel panelObjects1 = new javax.swing.JPanel();
com.borland.dbswing.JdbLabel labelObjects1 = new com.borland.dbswing.JdbLabel();
com.borland.dbswing.JdbTextField textObjects1 = new com.borland.dbswing.JdbTextField();
int objectsCounter = 0;
Object monitoredObject;
public ServerMonitorPage(Object obj)
{
monitoredObject = obj;
try
{
jbInit();
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
private void jbInit() throws Exception
{
panelOuter1.setLayout(gridBagLayout1);
panelObjects1.setLayout(gridLayout1);
textObjects1.setEnabled(false);
labelObjects1.setText(res.getString("numberObjects"));
labelObjects1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
panelObjects1.setVisible(false);
panelObjects1.add(labelObjects1);
panelObjects1.add(textObjects1);
panelOuter1.add(panelObjects1,
new java.awt.GridBagConstraints(1, 2, 2, 1, 1.0, 1.0,
java.awt.GridBagConstraints.NORTH, java.awt.GridBagConstraints.HORIZONTAL,
new Insets(3, 0, 3, 3), 0, 0));
add(panelOuter1);
}
public void showObjectCounter(boolean bVisible)
{
refresh();
panelObjects1.setVisible(bVisible);
}
public synchronized void updateObjectCounter(int n)
{
objectsCounter += n;
textObjects1.setText(String.valueOf(objectsCounter));
}
public void refresh()
{
textObjects1.setText(String.valueOf(objectsCounter));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -