支持testWhileIdle & idleCheck

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@389 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-07-12 23:48:54 +00:00
parent acb683a571
commit da81a2c4d5
6 changed files with 157 additions and 75 deletions
@@ -14,12 +14,14 @@ public class DruidDataStatusPanel extends JPanel {
private final Map<String, JTextField> fields = new HashMap<String, JTextField>();
private final String[] fieldNames = new String[] { "CreateCount", "CreateErrorCount", "CreateTimespanMillis", "CreateTimespanNano",
"DestroyCount", "ConnectCount", "ConnectErrorCount", "CloseCount", "RecycleCount", "ActiveCount", "PoolingCount", };
private final String[] fieldNames = new String[] { //
"CreateCount", "CreateErrorCount", "CreateTimespanMillis", "CreateTimespanNano", "DestroyCount", //
"ConnectCount", "ConnectErrorCount", "CloseCount", "RecycleCount", "ActiveCount", //
"PoolingCount", "IdleCheckCount", "UI_GettingCount", "UI_GetCount", "UI_ReleaseCount" };
public DruidDataStatusPanel(){
this.setLayout(new GridLayout(4, 6));
this.setLayout(new GridLayout(5, 6));
for (String fieldName : fieldNames) {
JLabel label = new JLabel(fieldName + " : ");
@@ -31,7 +33,7 @@ public class DruidDataStatusPanel extends JPanel {
fields.put(fieldName, textField);
}
}
public void set(String fieldName, Object value) {
JTextField textField = fields.get(fieldName);
textField.setText(String.valueOf(value));