[Mongobrowser-commit] SF.net SVN: mongobrowser:[119] trunk/mongobrowser/src/com/mebigfatguy/ mongo
Status: Pre-Alpha
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-01-03 04:58:13
|
Revision: 119
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=119&view=rev
Author: dbrosius
Date: 2010-01-03 04:57:53 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2010-01-03 04:54:28 UTC (rev 118)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2010-01-03 04:57:53 UTC (rev 119)
@@ -46,6 +46,9 @@
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
+/**
+ * the panel that holds the tree of mongo database objects
+ */
public class MongoDataPanel extends JPanel implements MongoPanel {
private static final long serialVersionUID = 1579613544693305078L;
@@ -56,12 +59,20 @@
private JMenuItem newKeyValueItem;
private JMenuItem deleteItem;
+ /**
+ * constructs the panel
+ *
+ * @param ctxt the mediator object
+ */
public MongoDataPanel(MongoContext ctxt) {
context = ctxt;
initComponents();
initListeners();
}
+ /**
+ * sets up the panel when a database is connected to
+ */
@Override
public void init() {
DB db = context.getDatabase();
@@ -85,6 +96,9 @@
context.setSelectedNode(null);
}
+ /**
+ * cleans up a panel when a database is disconnected from
+ */
@Override
public void term() {
DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
@@ -94,6 +108,9 @@
context.setSelectedNode(null);
}
+ /**
+ * creates and lays out the components in this panel
+ */
private void initComponents() {
setLayout(new BorderLayout(4, 4));
@@ -110,6 +127,9 @@
deleteItem = new JMenuItem(new DeleteAction(context));
}
+ /**
+ * installs the event listeners for the components on this panel
+ */
private void initListeners() {
final JPopupMenu menu = new JPopupMenu();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|