[Pixelle-commit] SF.net SVN: pixelle: [67] trunk/pixelle/src/com/mebigfatguy/pixelle/ FrameMgr.java
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-06-25 02:42:43
|
Revision: 67
http://pixelle.svn.sourceforge.net/pixelle/?rev=67&view=rev
Author: dbrosius
Date: 2008-06-24 19:42:32 -0700 (Tue, 24 Jun 2008)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/FrameMgr.java
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/FrameMgr.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/FrameMgr.java 2008-06-24 04:15:06 UTC (rev 66)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/FrameMgr.java 2008-06-25 02:42:32 UTC (rev 67)
@@ -23,6 +23,9 @@
import javax.swing.JFrame;
+/**
+ * manages the set of open windows
+ */
public class FrameMgr {
private static FrameMgr mgr = new FrameMgr();
@@ -30,20 +33,39 @@
private FrameMgr() {}
+ /**
+ * return the singleton frame manager
+ */
public static FrameMgr getInstance() {
return mgr;
}
+ /**
+ * add a window to the frame manager
+ *
+ * @param frame the new window that is about to be shown
+ */
public void add(JFrame frame) {
frames.add(frame);
}
+ /**
+ * removes the window from the frame manager. When the last
+ * window is remove, the program exits.
+ *
+ * @param frame the window to remove
+ */
public void remove(JFrame frame) {
frames.remove(frame);
if (frames.size() == 0)
System.exit(0);
}
+ /**
+ * retrieves all the active windows currently on the desktop
+ *
+ * @return a list of window available
+ */
public Set<JFrame> getFrames() {
return new HashSet<JFrame>(frames);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|