jadex.swing
Class OpenFrames

java.lang.Object
  |
  +--jadex.swing.OpenFrames

public class OpenFrames
extends java.lang.Object

A singleton to control the individual AceObject displaying.


Constructor Summary
protected OpenFrames()
          OpenFrames constructor comment.
 
Method Summary
 void addFrame(java.lang.String title, javax.swing.JFrame f)
          Register a displaying AceObject.
 java.applet.Applet getApplet()
          Get the applet.
 javax.swing.JFrame getFrame(java.lang.String title)
          Get the JFrame with the title.
static OpenFrames getInstance()
          This is the only method to get the instance of this class.
 void removeFrame(java.lang.String title)
          Remove the JFrame with title title.
 void setApplet(java.applet.Applet a)
          Set the applet.
 void show(jade.db.AceObject o)
          Clients should call this method to display the individual AceObject.
 boolean show(java.lang.String url, java.lang.String name)
          A overloaded method for displaying AceObjects in Applets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenFrames

protected OpenFrames()
OpenFrames constructor comment.
Method Detail

addFrame

public void addFrame(java.lang.String title,
                     javax.swing.JFrame f)
Register a displaying AceObject.
Parameters:
title - the title of the JFrame as the key for the HashTable.
f - the JFrame displaying the AceObject.

getFrame

public javax.swing.JFrame getFrame(java.lang.String title)
Get the JFrame with the title.
Parameters:
title - the title as the key for the HashTable searching.
Returns:
the JFrame displaying an AceObject.

getInstance

public static OpenFrames getInstance()
This is the only method to get the instance of this class.
Returns:
the sole instance of this class.

removeFrame

public void removeFrame(java.lang.String title)
Remove the JFrame with title title.

getApplet

public java.applet.Applet getApplet()
Get the applet. If this class is used in an applet, the default applet will returned.

setApplet

public void setApplet(java.applet.Applet a)
Set the applet. For applet use.

show

public void show(jade.db.AceObject o)
Clients should call this method to display the individual AceObject. In an applicatin, a new JFrame will be popup. In an applet, use
 show(String url, String name) 
.
Parameters:
o - the AceObject to be displayed.
See Also:
show(String, String).

show

public boolean show(java.lang.String url,
                    java.lang.String name)
A overloaded method for displaying AceObjects in Applets.
Parameters:
url - the URL for fetch the information for the AceObject. It is from the Wormbase usually.
name - the name of the AceObject to be displayed.