Author: manik.surtani(a)jboss.com
Date: 2008-01-07 20:12:04 -0500 (Mon, 07 Jan 2008)
New Revision: 5041
Modified:
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.form
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java
Log:
Updated GUI
Modified:
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.form
===================================================================
---
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.form 2008-01-08
00:26:22 UTC (rev 5040)
+++
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.form 2008-01-08
01:12:04 UTC (rev 5041)
@@ -612,6 +612,48 @@
</component>
</children>
</grid>
+ <grid id="ffd9b" binding="debugTab"
layout-manager="GridLayoutManager" row-count="2"
column-count="3" same-size-horizontally="false"
same-size-vertically="false" hgap="-1" vgap="-1">
+ <margin top="0" left="0" bottom="0"
right="0"/>
+ <constraints>
+ <tabbedpane title="Debug" enabled="false"/>
+ </constraints>
+ <properties/>
+ <border type="none"/>
+ <children>
+ <component id="cda62" class="javax.swing.JButton"
binding="cacheDetailsButton">
+ <constraints>
+ <grid row="0" column="0" row-span="1"
col-span="1" vsize-policy="0" hsize-policy="3"
anchor="0" fill="1" indent="0"
use-parent-layout="false"/>
+ </constraints>
+ <properties>
+ <text value="Print cache details"/>
+ </properties>
+ </component>
+ <component id="3a0c2" class="javax.swing.JButton"
binding="cacheLockInfoButton">
+ <constraints>
+ <grid row="0" column="1" row-span="1"
col-span="1" vsize-policy="0" hsize-policy="3"
anchor="0" fill="1" indent="0"
use-parent-layout="false"/>
+ </constraints>
+ <properties>
+ <text value="Print cache locking info"/>
+ </properties>
+ </component>
+ <component id="7423b" class="javax.swing.JTextArea"
binding="debugTextArea">
+ <constraints>
+ <grid row="1" column="0" row-span="1"
col-span="3" vsize-policy="6" hsize-policy="6"
anchor="0" fill="3" indent="0"
use-parent-layout="false">
+ <preferred-size width="150" height="50"/>
+ </grid>
+ </constraints>
+ <properties>
+ <background color="-3355444"/>
+ <font name="Courier New" size="10"/>
+ </properties>
+ </component>
+ <hspacer id="75f56">
+ <constraints>
+ <grid row="0" column="2" row-span="1"
col-span="1" vsize-policy="1" hsize-policy="6"
anchor="0" fill="1" indent="0"
use-parent-layout="false"/>
+ </constraints>
+ </hspacer>
+ </children>
+ </grid>
</children>
</tabbedpane>
<component id="97005" class="javax.swing.JLabel"
binding="cacheStatus">
Modified:
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java
===================================================================
---
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java 2008-01-08
00:26:22 UTC (rev 5040)
+++
demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java 2008-01-08
01:12:04 UTC (rev 5041)
@@ -9,6 +9,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
+import org.jboss.cache.util.CachePrinter;
import org.jboss.cache.notifications.annotation.BuddyGroupChanged;
import org.jboss.cache.notifications.annotation.NodeCreated;
import org.jboss.cache.notifications.annotation.NodeModified;
@@ -48,6 +49,9 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.AbstractExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.LinkedBlockingQueue;
/**
* @author Manik Surtani (<a
href="mailto:manik@jboss.org">manik@jboss.org</a>)
@@ -92,6 +96,10 @@
private JTextArea configFileContents;
private JRadioButton getNodeRadioButton;
private JScrollPane treeScrollPane;
+ private JPanel debugTab;
+ private JButton cacheDetailsButton;
+ private JButton cacheLockInfoButton;
+ private JTextArea debugTextArea;
private String cacheConfigFile;
private Cache<String, String> cache;
private String startCacheButtonLabel = "Start Cache", stopCacheButtonLabel =
"Stop Cache";
@@ -374,6 +382,20 @@
});
}
});
+ cacheDetailsButton.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ if (cache != null)
debugTextArea.setText(CachePrinter.printCacheDetails(cache));
+ }
+ });
+ cacheLockInfoButton.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ if (cache != null)
debugTextArea.setText(CachePrinter.printCacheLockingInfo(cache));
+ }
+ });
}
private void updateStats()
Show replies by date