Methods Summary |
---|
protected void | initAppletParams()
sessionId = getParameter("SessionId");
if (sessionId != null)
sessionId = "jsessionid=" + sessionId;
else
sessionId = "";
this.pmJmxName = getParameter("PMJMXName");
if( pmJmxName == null )
pmJmxName = "jboss.admin:service=PluginManager";
|
protected void | initComponents()
javax.swing.JTree tree = treeBrowser.getTree();
javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane(tree);
scrollPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));
getContentPane().add(scrollPane, java.awt.BorderLayout.CENTER);
//getContentPane().add(tree, java.awt.BorderLayout.CENTER);
|
protected void | initRefreshThread()
try
{
String strRefreshSec = getParameter("RefreshTime");
if (strRefreshSec != null && !"".equals(strRefreshSec))
{
final long refresh = Long.parseLong(strRefreshSec);
Thread t = new Thread ( new Runnable()
{
public synchronized void run ()
{
long timeout = refresh*1000;
while (true)
{
try
{
this.wait(timeout);
treeBrowser.refreshTree(false);
}
catch (Exception displayed)
{
//displayed.printStackTrace();
}
}
}
}
);
t.start();
}
}
catch (Exception displayed)
{
displayed.printStackTrace();
}
|
public static void | main(java.lang.String[] args)Allow the applet to be run as an application:
java -cp applet.jar org.jboss.console.navtree.AppletBrowser
JApplet applet = new AppletBrowser();
applet.setStub(new MainAppletStub());
JFrame frame = new JFrame("Administration Console");
frame.getContentPane().add(applet);
frame.setSize(600, 500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
applet.init();
applet.start();
frame.setVisible(true);
|
public void | refreshTree(boolean force)
treeBrowser.refreshTree(force);
|
public void | start()
try
{
ctx = new AppletAdminContext ();
initAppletParams();
treeBrowser = new AdminTreeBrowser (ctx);
initComponents ();
initRefreshThread ();
}
catch (Exception e)
{
e.printStackTrace ();
}
|