mongobrowser-commit Mailing List for mongobrowser (Page 4)
Status: Pre-Alpha
Brought to you by:
dbrosius
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(60) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(61) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <dbr...@us...> - 2009-12-28 06:06:38
|
Revision: 59
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=59&view=rev
Author: dbrosius
Date: 2009-12-28 06:06:27 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
adjust spacing of menu
Modified Paths:
--------------
trunk/mongobrowser/htdocs/mbfg.css
Modified: trunk/mongobrowser/htdocs/mbfg.css
===================================================================
--- trunk/mongobrowser/htdocs/mbfg.css 2009-12-28 06:05:27 UTC (rev 58)
+++ trunk/mongobrowser/htdocs/mbfg.css 2009-12-28 06:06:27 UTC (rev 59)
@@ -21,7 +21,7 @@
border-color: #404040;
border-width: 1px;
border-style: solid;
- padding: 10px 40px 10px 40px;
+ padding: 6px 40px 6px 40px;
background-color: #DDDDFF;
margin-right: 20px;
text-decoration: none;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-28 06:05:41
|
Revision: 58
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=58&view=rev
Author: dbrosius
Date: 2009-12-28 06:05:27 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
split out javascript to separate file
Modified Paths:
--------------
trunk/mongobrowser/htdocs/index.html
Added Paths:
-----------
trunk/mongobrowser/htdocs/mbfg.js
Modified: trunk/mongobrowser/htdocs/index.html
===================================================================
--- trunk/mongobrowser/htdocs/index.html 2009-12-27 19:12:50 UTC (rev 57)
+++ trunk/mongobrowser/htdocs/index.html 2009-12-28 06:05:27 UTC (rev 58)
@@ -2,18 +2,9 @@
<head>
<title>MongoBrowser - a database query tool for Mongo Databases</title>
<meta name="Keywords" content="mongo tool database query editor">
- <script type="text/javascript">
- function showMenu()
- {
- var dv = document.getElementById("mbfg_projects");
- dv.style.display="block";
- }
-
- function hideMenu()
- {
- var dv = document.getElementById("mbfg_projects");
- dv.style.display="none";
- }
+ <script type="text/javascript" src="mbfg.js"></script>
+
+ <script src="mbfg.js">
</script>
<link rel="stylesheet" type="text/css" href="mbfg.css" />
</head>
@@ -28,7 +19,7 @@
<a href="javadoc/index.html">JavaDoc</a>
<img src="vbar.gif" height="12"/>
<a href="jnlp/mongobrowser.jnlp">Web Start</a>
- <div id="mbfg_div" onMouseover="showMenu()" onMouseout="hideMenu()">
+ <div id="mbfg_div" onMouseover="javascript:toggleDiv('mbfg_projects')" onMouseout="javascript:toggleDiv('mbfg_projects')">
<a id="mbfg_menu" href="#" >Other MeBigFatGuy Projects</a>
<div id="mbfg_projects">
<ul>
Added: trunk/mongobrowser/htdocs/mbfg.js
===================================================================
--- trunk/mongobrowser/htdocs/mbfg.js (rev 0)
+++ trunk/mongobrowser/htdocs/mbfg.js 2009-12-28 06:05:27 UTC (rev 58)
@@ -0,0 +1,9 @@
+
+function toggleDiv(divId)
+{
+ var dv = document.getElementById(divId);
+ if (dv.style.display == 'block')
+ dv.style.display = 'none';
+ else
+ dv.style.display = 'block';
+}
\ No newline at end of file
Property changes on: trunk/mongobrowser/htdocs/mbfg.js
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 19:12:59
|
Revision: 57
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=57&view=rev
Author: dbrosius
Date: 2009-12-27 19:12:50 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
use external css
Modified Paths:
--------------
trunk/mongobrowser/htdocs/index.html
Modified: trunk/mongobrowser/htdocs/index.html
===================================================================
--- trunk/mongobrowser/htdocs/index.html 2009-12-27 19:12:31 UTC (rev 56)
+++ trunk/mongobrowser/htdocs/index.html 2009-12-27 19:12:50 UTC (rev 57)
@@ -2,6 +2,20 @@
<head>
<title>MongoBrowser - a database query tool for Mongo Databases</title>
<meta name="Keywords" content="mongo tool database query editor">
+ <script type="text/javascript">
+ function showMenu()
+ {
+ var dv = document.getElementById("mbfg_projects");
+ dv.style.display="block";
+ }
+
+ function hideMenu()
+ {
+ var dv = document.getElementById("mbfg_projects");
+ dv.style.display="none";
+ }
+ </script>
+ <link rel="stylesheet" type="text/css" href="mbfg.css" />
</head>
<body background>
<div style="position:absolute;top:0;left:0;width:256;height:65535;z-index:1;background-image:url(blend.jpg);">
@@ -14,6 +28,23 @@
<a href="javadoc/index.html">JavaDoc</a>
<img src="vbar.gif" height="12"/>
<a href="jnlp/mongobrowser.jnlp">Web Start</a>
+ <div id="mbfg_div" onMouseover="showMenu()" onMouseout="hideMenu()">
+ <a id="mbfg_menu" href="#" >Other MeBigFatGuy Projects</a>
+ <div id="mbfg_projects">
+ <ul>
+ <li><a href="http://beansource.sf.net">Beansource</a></li>
+ <li><a href="http://fb-contrib.sf.net">FB-Contrib</a></li>
+ <li><a href="http://mongobrowser.sf.net">MongoBrowser</a></li>
+ <li><a href="http://mysfstats.sf.net">MySFStats</a></li>
+ <li><a href="http://patchanim.sf.net">PatchAnim</a></li>
+ <li><a href="http://pixelle.sf.net">Pixelle</a></li>
+ <li><a href="http://polycasso.sf.net">Polycasso</a></li>
+ <li><a href="http://schemalizer.sf.net">Schemalizer</a></li>
+ <li><a href="http://tomailer.sf.net">ToMailer</a></li>
+ <li><a href="http://www.heartofgoldfarm.com">Heart of Gold Farm</a></li>
+ </ul>
+ </div>
+ </div>
<hr/>
<p>Thanks for your interest in MongoBrowser.</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 19:12:38
|
Revision: 56
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=56&view=rev
Author: dbrosius
Date: 2009-12-27 19:12:31 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
mbfg css file
Added Paths:
-----------
trunk/mongobrowser/htdocs/mbfg.css
Added: trunk/mongobrowser/htdocs/mbfg.css
===================================================================
--- trunk/mongobrowser/htdocs/mbfg.css (rev 0)
+++ trunk/mongobrowser/htdocs/mbfg.css 2009-12-27 19:12:31 UTC (rev 56)
@@ -0,0 +1,32 @@
+#mbfg_div {
+ float:right;
+}
+
+#mbfg_menu {
+ margin-right: 20px;
+}
+
+#mbfg_projects {
+ position: absolute;
+ display: none;
+ z-order: 2;
+}
+
+#mbfg_projects ul li {
+ list-style-type: none;
+}
+
+#mbfg_projects ul li a {
+ display:block;
+ border-color: #404040;
+ border-width: 1px;
+ border-style: solid;
+ padding: 10px 40px 10px 40px;
+ background-color: #DDDDFF;
+ margin-right: 20px;
+ text-decoration: none;
+}
+
+#mbfg_projects ul li a:hover {
+ background-color: #FFDDDD;
+}
Property changes on: trunk/mongobrowser/htdocs/mbfg.css
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:42:11
|
Revision: 55
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=55&view=rev
Author: dbrosius
Date: 2009-12-27 18:42:00 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
findbugs file
Added Paths:
-----------
trunk/mongobrowser/mongobrowser.fb
Added: trunk/mongobrowser/mongobrowser.fb
===================================================================
--- trunk/mongobrowser/mongobrowser.fb (rev 0)
+++ trunk/mongobrowser/mongobrowser.fb 2009-12-27 18:42:00 UTC (rev 55)
@@ -0,0 +1,9 @@
+[Jar files]
+./classes
+[Source dirs]
+./src
+[Aux classpath entries]
+./lib/forms-1.2.1.jar
+./lib/mongo-1.1.jar
+[Options]
+relative_paths=true
Property changes on: trunk/mongobrowser/mongobrowser.fb
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:26:40
|
Revision: 54
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=54&view=rev
Author: dbrosius
Date: 2009-12-27 18:26:34 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
copy pngs as well
Modified Paths:
--------------
trunk/mongobrowser/build.xml
Modified: trunk/mongobrowser/build.xml
===================================================================
--- trunk/mongobrowser/build.xml 2009-12-27 18:24:07 UTC (rev 53)
+++ trunk/mongobrowser/build.xml 2009-12-27 18:26:34 UTC (rev 54)
@@ -75,6 +75,7 @@
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<include name="**/*.properties"/>
+ <include name="**/*.png"/>
</fileset>
</copy>
<echo message="${mongobrowser.version}" file="${classes.dir}/com/mebigfatguy/mongobrowser/Version.txt"/>
@@ -97,6 +98,7 @@
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
<include name="**/*.properties"/>
+ <include name="**/*.png"/>
<include name="**/*.txt"/>
</fileset>
<fileset dir="${basedir}">
@@ -113,7 +115,7 @@
<target name="srczip" description="builds the source distribution zip file">
<zip destfile="${basedir}/mongobrowser-src-${mongobrowser.version}.zip"
basedir="${basedir}"
- includes="src/**/*.java, src/**/*.properties, lib/**/*.jar, *.txt"/>
+ includes="src/**/*.java, src/**/*.properties, src/**/*.png, lib/**/*.jar, *.txt"/>
</target>
<target name="javadoc" depends="-init" description="build the javadoc for the project">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:24:17
|
Revision: 53
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=53&view=rev
Author: dbrosius
Date: 2009-12-27 18:24:07 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
fix jnlp
Modified Paths:
--------------
trunk/mongobrowser/etc/mongobrowser.jnlp
Modified: trunk/mongobrowser/etc/mongobrowser.jnlp
===================================================================
--- trunk/mongobrowser/etc/mongobrowser.jnlp 2009-12-27 18:20:10 UTC (rev 52)
+++ trunk/mongobrowser/etc/mongobrowser.jnlp 2009-12-27 18:24:07 UTC (rev 53)
@@ -7,8 +7,7 @@
<title>MongoBrowser</title>
<vendor>MeBigFatGuy.com</vendor>
<homepage href="http://mongobrowser.sourceforge.net"/>
- <description>A Cubism Artwork generator</description>
- <description kind="short">Inspired by work from Roger Alsing</description>
+ <description>A browser, editor and administrator tool for a Mongo Database</description>
<offline-allowed/>
</information>
<security>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:20:19
|
Revision: 52
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=52&view=rev
Author: dbrosius
Date: 2009-12-27 18:20:10 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
add analytics tracker
Modified Paths:
--------------
trunk/mongobrowser/htdocs/index.html
Modified: trunk/mongobrowser/htdocs/index.html
===================================================================
--- trunk/mongobrowser/htdocs/index.html 2009-12-27 18:18:21 UTC (rev 51)
+++ trunk/mongobrowser/htdocs/index.html 2009-12-27 18:20:10 UTC (rev 52)
@@ -24,5 +24,14 @@
<p>-- Dave Brosius</p>
</div>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-249537-11");
+pageTracker._trackPageview();
+} catch(err) {}</script>
</body>
</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:18:27
|
Revision: 51
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=51&view=rev
Author: dbrosius
Date: 2009-12-27 18:18:21 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
web content
Added Paths:
-----------
trunk/mongobrowser/htdocs/index.html
Added: trunk/mongobrowser/htdocs/index.html
===================================================================
--- trunk/mongobrowser/htdocs/index.html (rev 0)
+++ trunk/mongobrowser/htdocs/index.html 2009-12-27 18:18:21 UTC (rev 51)
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <title>MongoBrowser - a database query tool for Mongo Databases</title>
+ <meta name="Keywords" content="mongo tool database query editor">
+ </head>
+ <body background>
+ <div style="position:absolute;top:0;left:0;width:256;height:65535;z-index:1;background-image:url(blend.jpg);">
+ </div>
+ <div style="position:absolute;top:20;left:20;z-index:3;">
+ <h1><img style="position:relative;top:10;" src="mongobrowser.png"/> Mongo Browser</h1>
+ <hr/>
+ <a href="http://www.sourceforge.net/projects/mongobrowser">Project Page</a>
+ <img src="vbar.gif" height="12"/>
+ <a href="javadoc/index.html">JavaDoc</a>
+ <img src="vbar.gif" height="12"/>
+ <a href="jnlp/mongobrowser.jnlp">Web Start</a>
+ <hr/>
+
+ <p>Thanks for your interest in MongoBrowser.</p>
+
+ <p>MongoBrowser is a simple web start application that allows you to browse, update and administer a Mongo database.
+ This is a work in progress, and is early on. Any bugs, features or ideas are very much welcome.
+ </p>
+
+ <p>-- Dave Brosius</p>
+ </div>
+ </body>
+</html>
Property changes on: trunk/mongobrowser/htdocs/index.html
___________________________________________________________________
Added: svn:mime-type
+ text/html
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:17:30
|
Revision: 50
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=50&view=rev
Author: dbrosius
Date: 2009-12-27 18:17:21 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
web content
Added Paths:
-----------
trunk/mongobrowser/htdocs/mongobrowser.png
Added: trunk/mongobrowser/htdocs/mongobrowser.png
===================================================================
(Binary files differ)
Property changes on: trunk/mongobrowser/htdocs/mongobrowser.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:16:53
|
Revision: 49
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=49&view=rev
Author: dbrosius
Date: 2009-12-27 18:16:44 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
web content
Added Paths:
-----------
trunk/mongobrowser/htdocs/vbar.gif
Added: trunk/mongobrowser/htdocs/vbar.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mongobrowser/htdocs/vbar.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 18:16:14
|
Revision: 48
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=48&view=rev
Author: dbrosius
Date: 2009-12-27 18:15:59 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
website content
Added Paths:
-----------
trunk/mongobrowser/htdocs/
trunk/mongobrowser/htdocs/blend.jpg
Added: trunk/mongobrowser/htdocs/blend.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/mongobrowser/htdocs/blend.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:44:33
|
Revision: 47
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=47&view=rev
Author: dbrosius
Date: 2009-12-27 17:44:24 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
keystore
Added Paths:
-----------
trunk/mongobrowser/mongobrowser.store
Added: trunk/mongobrowser/mongobrowser.store
===================================================================
(Binary files differ)
Property changes on: trunk/mongobrowser/mongobrowser.store
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:40:37
|
Revision: 46
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=46&view=rev
Author: dbrosius
Date: 2009-12-27 17:40:30 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
make the connect dialog somewhat less ugly
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/ConnectionDialog.java
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/ConnectionDialog.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/ConnectionDialog.java 2009-12-27 17:36:47 UTC (rev 45)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/ConnectionDialog.java 2009-12-27 17:40:30 UTC (rev 46)
@@ -23,6 +23,7 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
@@ -61,7 +62,7 @@
private JPanel createFormPanel() {
JPanel p = new JPanel();
- p.setLayout(new FormLayout("3dlu, 100px, 5dlu, 200px, 3dlu", "3dlu, pref, 2dlu, pref, 3dlu"));
+ p.setLayout(new FormLayout("6dlu, pref, 5dlu, 200px, 6dlu", "6dlu, pref, 2dlu, pref, 6dlu"));
CellConstraints cc = new CellConstraints();
JLabel serverLabel = new JLabel(MongoBundle.getString(MongoBundle.Key.Server));
@@ -88,6 +89,7 @@
private JPanel createCtrlPanel() {
JPanel p = new JPanel();
+ p.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
p.add(Box.createHorizontalGlue());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:36:54
|
Revision: 45
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=45&view=rev
Author: dbrosius
Date: 2009-12-27 17:36:47 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
expand and scroll the path to see the new object
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java 2009-12-27 17:30:10 UTC (rev 44)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java 2009-12-27 17:36:47 UTC (rev 45)
@@ -24,6 +24,7 @@
import javax.swing.JOptionPane;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
import com.mebigfatguy.mongobrowser.MongoBundle;
import com.mebigfatguy.mongobrowser.MongoContext;
@@ -56,6 +57,9 @@
MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
collectionNode.add(slug);
model.nodeStructureChanged(root);
+ TreePath selection = new TreePath(collectionNode.getPath());
+ tree.scrollPathToVisible(selection);
+ tree.setSelectionPath(selection);
}
}
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java 2009-12-27 17:30:10 UTC (rev 44)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java 2009-12-27 17:36:47 UTC (rev 45)
@@ -55,6 +55,9 @@
MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
objectNode.add(slug);
model.nodeStructureChanged((MongoTreeNode)model.getRoot());
+ TreePath selection = new TreePath(objectNode.getPath());
+ tree.scrollPathToVisible(selection);
+ tree.setSelectionPath(selection);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:30:18
|
Revision: 44
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=44&view=rev
Author: dbrosius
Date: 2009-12-27 17:30:10 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
fix the icons shifting
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java 2009-12-27 17:25:56 UTC (rev 43)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java 2009-12-27 17:30:10 UTC (rev 44)
@@ -136,6 +136,7 @@
dbNewCollectionButton = new JButton(new NewCollectionAction(context));
ImageIcon icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newcollection.png"));
dbNewCollectionButton.setIcon(icon);
+ dbNewCollectionButton.setText("");
dbNewCollectionButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
dbNewCollectionButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewCollection));
add(dbNewCollectionButton, cc.xy(6, 1));
@@ -144,6 +145,7 @@
dbNewObjectButton = new JButton(new NewObjectAction(context));
icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newobject.png"));
dbNewObjectButton.setIcon(icon);
+ dbNewObjectButton.setText("");
dbNewObjectButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
dbNewObjectButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewObject));
add(dbNewObjectButton, cc.xy(8, 1));
@@ -152,6 +154,7 @@
dbNewKeyValueButton = new JButton(new NewKeyValueAction(context));
icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newkeyvalue.png"));
dbNewKeyValueButton.setIcon(icon);
+ dbNewKeyValueButton.setText("");
dbNewKeyValueButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
dbNewKeyValueButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewKeyValue));
add(dbNewKeyValueButton, cc.xy(10, 1));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:26:02
|
Revision: 43
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=43&view=rev
Author: dbrosius
Date: 2009-12-27 17:25:56 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
delete MongoActions as it's pushed to other classes
Removed Paths:
-------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java
Deleted: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java 2009-12-27 17:25:23 UTC (rev 42)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java 2009-12-27 17:25:56 UTC (rev 43)
@@ -1,73 +0,0 @@
-/*
- * mongobrowser - a webstart gui application for viewing,
- * editing and administering a Mongo Database
- * Copyright 2009 MeBigFatGuy.com
- * Copyright 2009 Dave Brosius
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and limitations
- * under the License.
- */
-package com.mebigfatguy.mongobrowser.dialogs;
-
-import javax.swing.JOptionPane;
-import javax.swing.JTree;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreePath;
-
-import com.mebigfatguy.mongobrowser.MongoBundle;
-import com.mebigfatguy.mongobrowser.MongoContext;
-import com.mongodb.BasicDBObject;
-import com.mongodb.DB;
-import com.mongodb.DBCollection;
-
-public class MongoActions {
-
- private MongoContext context;
-
- public MongoActions(MongoContext ctxt) {
- context = ctxt;
- }
-
- public void createNewCollection() {
- JTree tree = context.getTree();
- String collectionName = JOptionPane.showInputDialog(tree, MongoBundle.getString(MongoBundle.Key.NewCollection));
- if (collectionName != null) {
- DB db = context.getDatabase();
- DBCollection dbCollection = db.getCollection(collectionName);
- DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
- MongoTreeNode root = (MongoTreeNode)model.getRoot();
- MongoTreeNode collectionNode = new MongoTreeNode(MongoTreeNode.Type.Collection, dbCollection);
- root.add(collectionNode);
- MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
- collectionNode.add(slug);
- model.nodeStructureChanged(root);
- }
- }
-
- public void createNewObject() {
- JTree tree = context.getTree();
- TreePath path = tree.getSelectionPath();
- MongoTreeNode collectionNode = (MongoTreeNode)path.getLastPathComponent();
- DBCollection dbCollection = (DBCollection) collectionNode.getUserObject();
- BasicDBObject dbObj = new BasicDBObject();
- dbCollection.insert(dbObj);
- DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
- MongoTreeNode objectNode = new MongoTreeNode(MongoTreeNode.Type.Object, dbObj);
- collectionNode.add(objectNode);
- MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
- objectNode.add(slug);
- model.nodeStructureChanged((MongoTreeNode)model.getRoot());
- }
-
- public void createNewKeyValue() {
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:25:32
|
Revision: 42
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=42&view=rev
Author: dbrosius
Date: 2009-12-27 17:25:23 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
pull actions out into separate classes
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java 2009-12-27 17:19:53 UTC (rev 41)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java 2009-12-27 17:25:23 UTC (rev 42)
@@ -20,8 +20,6 @@
import java.awt.Color;
import java.awt.Dimension;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
@@ -40,6 +38,9 @@
import com.jgoodies.forms.layout.FormLayout;
import com.mebigfatguy.mongobrowser.MongoBundle;
import com.mebigfatguy.mongobrowser.MongoContext;
+import com.mebigfatguy.mongobrowser.actions.NewCollectionAction;
+import com.mebigfatguy.mongobrowser.actions.NewKeyValueAction;
+import com.mebigfatguy.mongobrowser.actions.NewObjectAction;
import com.mongodb.Mongo;
public class MongoControlPanel extends JPanel implements MongoPanel {
@@ -132,22 +133,25 @@
add(dbLabel, cc.xy(2, 1));
add(dbComboBox, cc.xy(4, 1));
+ dbNewCollectionButton = new JButton(new NewCollectionAction(context));
ImageIcon icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newcollection.png"));
- dbNewCollectionButton = new JButton(icon);
+ dbNewCollectionButton.setIcon(icon);
dbNewCollectionButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
dbNewCollectionButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewCollection));
add(dbNewCollectionButton, cc.xy(6, 1));
dbNewCollectionButton.setEnabled(false);
+ dbNewObjectButton = new JButton(new NewObjectAction(context));
icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newobject.png"));
- dbNewObjectButton = new JButton(icon);
+ dbNewObjectButton.setIcon(icon);
dbNewObjectButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
dbNewObjectButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewObject));
add(dbNewObjectButton, cc.xy(8, 1));
dbNewObjectButton.setEnabled(false);
+ dbNewKeyValueButton = new JButton(new NewKeyValueAction(context));
icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newkeyvalue.png"));
- dbNewKeyValueButton = new JButton(icon);
+ dbNewKeyValueButton.setIcon(icon);
dbNewKeyValueButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
dbNewKeyValueButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewKeyValue));
add(dbNewKeyValueButton, cc.xy(10, 1));
@@ -177,22 +181,6 @@
}
});
-
- dbNewCollectionButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent ae) {
- MongoActions actions = new MongoActions(context);
- actions.createNewCollection();
- }
- });
-
- dbNewObjectButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent ae) {
- MongoActions actions = new MongoActions(context);
- actions.createNewObject();
- }
- });
}
}
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 17:19:53 UTC (rev 41)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 17:25:23 UTC (rev 42)
@@ -19,8 +19,6 @@
package com.mebigfatguy.mongobrowser.dialogs;
import java.awt.BorderLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Set;
@@ -38,8 +36,10 @@
import javax.swing.tree.ExpandVetoException;
import javax.swing.tree.TreePath;
-import com.mebigfatguy.mongobrowser.MongoBundle;
import com.mebigfatguy.mongobrowser.MongoContext;
+import com.mebigfatguy.mongobrowser.actions.NewCollectionAction;
+import com.mebigfatguy.mongobrowser.actions.NewKeyValueAction;
+import com.mebigfatguy.mongobrowser.actions.NewObjectAction;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
@@ -101,9 +101,9 @@
add(new JScrollPane(tree), BorderLayout.CENTER);
context.setTree(tree);
- newCollectionItem = new JMenuItem(MongoBundle.getString(MongoBundle.Key.NewCollection));
- newObjectItem = new JMenuItem(MongoBundle.getString(MongoBundle.Key.NewObject));
- newKeyValueItem = new JMenuItem(MongoBundle.getString(MongoBundle.Key.NewKeyValue));
+ newCollectionItem = new JMenuItem(new NewCollectionAction(context));
+ newObjectItem = new JMenuItem(new NewObjectAction(context));
+ newKeyValueItem = new JMenuItem(new NewKeyValueAction(context));
}
private void initListeners() {
@@ -207,29 +207,5 @@
}
}
});
-
- newCollectionItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent ae) {
- MongoActions actions = new MongoActions(context);
- actions.createNewCollection();
- }
- });
-
- newObjectItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent ae) {
- MongoActions actions = new MongoActions(context);
- actions.createNewObject();
- }
- });
-
- newKeyValueItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent ae) {
- MongoActions actions = new MongoActions(context);
- actions.createNewKeyValue();
- }
- });
}
}
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java 2009-12-27 17:19:53 UTC (rev 41)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java 2009-12-27 17:25:23 UTC (rev 42)
@@ -26,7 +26,7 @@
public class MongoTreeNode extends DefaultMutableTreeNode {
private static final long serialVersionUID = -1710144820086785938L;
- enum Type {Root, Collection, Object, KeyValue, ExpansionSlug};
+ public enum Type {Root, Collection, Object, KeyValue, ExpansionSlug};
Type nodeType;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:20:00
|
Revision: 41
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=41&view=rev
Author: dbrosius
Date: 2009-12-27 17:19:53 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
pull out NewKeyValue action to a separate class
Added Paths:
-----------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewKeyValueAction.java
Added: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewKeyValueAction.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewKeyValueAction.java (rev 0)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewKeyValueAction.java 2009-12-27 17:19:53 UTC (rev 41)
@@ -0,0 +1,43 @@
+/*
+ * mongobrowser - a webstart gui application for viewing,
+ * editing and administering a Mongo Database
+ * Copyright 2009 MeBigFatGuy.com
+ * Copyright 2009 Dave Brosius
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.mebigfatguy.mongobrowser.actions;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+
+import com.mebigfatguy.mongobrowser.MongoBundle;
+import com.mebigfatguy.mongobrowser.MongoContext;
+
+public class NewKeyValueAction extends AbstractAction {
+
+ private static final long serialVersionUID = -500965537578361564L;
+ private MongoContext context;
+
+ public NewKeyValueAction(MongoContext ctxt) {
+ super(MongoBundle.getString(MongoBundle.Key.NewKeyValue));
+ context = ctxt;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ // TODO Auto-generated method stub
+ }
+
+}
Property changes on: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewKeyValueAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:17:42
|
Revision: 40
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=40&view=rev
Author: dbrosius
Date: 2009-12-27 17:17:33 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
pull out the new object action into a separate class
Added Paths:
-----------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java
Added: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java (rev 0)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java 2009-12-27 17:17:33 UTC (rev 40)
@@ -0,0 +1,60 @@
+/*
+ * mongobrowser - a webstart gui application for viewing,
+ * editing and administering a Mongo Database
+ * Copyright 2009 MeBigFatGuy.com
+ * Copyright 2009 Dave Brosius
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.mebigfatguy.mongobrowser.actions;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import com.mebigfatguy.mongobrowser.MongoBundle;
+import com.mebigfatguy.mongobrowser.MongoContext;
+import com.mebigfatguy.mongobrowser.dialogs.MongoTreeNode;
+import com.mongodb.BasicDBObject;
+import com.mongodb.DBCollection;
+
+public class NewObjectAction extends AbstractAction {
+
+ private static final long serialVersionUID = 5752147095730092598L;
+ private MongoContext context;
+
+ public NewObjectAction(MongoContext ctxt) {
+ super(MongoBundle.getString(MongoBundle.Key.NewObject));
+ context = ctxt;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ JTree tree = context.getTree();
+ TreePath path = tree.getSelectionPath();
+ MongoTreeNode collectionNode = (MongoTreeNode)path.getLastPathComponent();
+ DBCollection dbCollection = (DBCollection) collectionNode.getUserObject();
+ BasicDBObject dbObj = new BasicDBObject();
+ dbCollection.insert(dbObj);
+ DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
+ MongoTreeNode objectNode = new MongoTreeNode(MongoTreeNode.Type.Object, dbObj);
+ collectionNode.add(objectNode);
+ MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
+ objectNode.add(slug);
+ model.nodeStructureChanged((MongoTreeNode)model.getRoot());
+ }
+
+}
Property changes on: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewObjectAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 17:15:53
|
Revision: 39
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=39&view=rev
Author: dbrosius
Date: 2009-12-27 17:15:43 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
pull out the new collection action to a separate class
Added Paths:
-----------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java
Added: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java (rev 0)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java 2009-12-27 17:15:43 UTC (rev 39)
@@ -0,0 +1,62 @@
+/*
+ * mongobrowser - a webstart gui application for viewing,
+ * editing and administering a Mongo Database
+ * Copyright 2009 MeBigFatGuy.com
+ * Copyright 2009 Dave Brosius
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.mebigfatguy.mongobrowser.actions;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.JOptionPane;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultTreeModel;
+
+import com.mebigfatguy.mongobrowser.MongoBundle;
+import com.mebigfatguy.mongobrowser.MongoContext;
+import com.mebigfatguy.mongobrowser.dialogs.MongoTreeNode;
+import com.mongodb.DB;
+import com.mongodb.DBCollection;
+
+public class NewCollectionAction extends AbstractAction {
+
+ private static final long serialVersionUID = 9090870672875251498L;
+
+ private MongoContext context;
+
+ public NewCollectionAction(MongoContext ctxt) {
+ super(MongoBundle.getString(MongoBundle.Key.NewCollection));
+ context = ctxt;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ JTree tree = context.getTree();
+ String collectionName = JOptionPane.showInputDialog(tree, MongoBundle.getString(MongoBundle.Key.NewCollection));
+ if (collectionName != null) {
+ DB db = context.getDatabase();
+ DBCollection dbCollection = db.getCollection(collectionName);
+ DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
+ MongoTreeNode root = (MongoTreeNode)model.getRoot();
+ MongoTreeNode collectionNode = new MongoTreeNode(MongoTreeNode.Type.Collection, dbCollection);
+ root.add(collectionNode);
+ MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
+ collectionNode.add(slug);
+ model.nodeStructureChanged(root);
+ }
+ }
+
+}
Property changes on: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/actions/NewCollectionAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 05:07:41
|
Revision: 38
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=38&view=rev
Author: dbrosius
Date: 2009-12-27 05:07:35 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
add keyvalue menu/button, and fix enabling of buttons
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoContext.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoBrowserFrame.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoContext.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoContext.java 2009-12-27 04:40:15 UTC (rev 37)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoContext.java 2009-12-27 05:07:35 UTC (rev 38)
@@ -20,6 +20,7 @@
import javax.swing.JTree;
+import com.mebigfatguy.mongobrowser.dialogs.MongoTreeNode;
import com.mongodb.DB;
import com.mongodb.Mongo;
@@ -28,6 +29,9 @@
void setTree(JTree tree);
JTree getTree();
+ void setSelectedNode(MongoTreeNode node);
+ MongoTreeNode getSelectedNode();
+
void setServer(Mongo server);
Mongo getServer();
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java 2009-12-27 04:40:15 UTC (rev 37)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoActions.java 2009-12-27 05:07:35 UTC (rev 38)
@@ -67,4 +67,7 @@
objectNode.add(slug);
model.nodeStructureChanged((MongoTreeNode)model.getRoot());
}
+
+ public void createNewKeyValue() {
+ }
}
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoBrowserFrame.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoBrowserFrame.java 2009-12-27 04:40:15 UTC (rev 37)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoBrowserFrame.java 2009-12-27 05:07:35 UTC (rev 38)
@@ -87,6 +87,7 @@
class Mediator implements MongoContext {
private JTree activeTree;
+ private MongoTreeNode activeNode;
private Mongo activeServer;
private DB activeDatabase;
@@ -100,6 +101,17 @@
public void setTree(JTree tree) {
activeTree = tree;
}
+
+ @Override
+ public MongoTreeNode getSelectedNode() {
+ return activeNode;
+ }
+
+ @Override
+ public void setSelectedNode(MongoTreeNode node) {
+ activeNode = node;
+ ctrlPanel.adjustEnabled(node);
+ }
@Override
public Mongo getServer() {
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java 2009-12-27 04:40:15 UTC (rev 37)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoControlPanel.java 2009-12-27 05:07:35 UTC (rev 38)
@@ -49,6 +49,7 @@
private JComboBox dbComboBox;
private JButton dbNewCollectionButton;
private JButton dbNewObjectButton;
+ private JButton dbNewKeyValueButton;
public MongoControlPanel(MongoContext ctxt) {
context = ctxt;
@@ -72,8 +73,7 @@
}
});
dbComboBox.setEnabled(true);
- dbNewCollectionButton.setEnabled(true);
- dbNewObjectButton.setEnabled(true);
+ context.setSelectedNode(null);
}
});
@@ -86,15 +86,43 @@
DefaultComboBoxModel model = (DefaultComboBoxModel)dbComboBox.getModel();
model.removeAllElements();
dbComboBox.setEnabled(false);
- dbNewCollectionButton.setEnabled(false);
- dbNewObjectButton.setEnabled(false);
+ context.setSelectedNode(null);
}
});
}
+
+ public void adjustEnabled(MongoTreeNode selectedNode) {
+ if (selectedNode == null) {
+ dbNewCollectionButton.setEnabled(true);
+ dbNewObjectButton.setEnabled(false);
+ dbNewKeyValueButton.setEnabled(false);
+ } else {
+ switch (selectedNode.getType()) {
+ case Collection:
+ dbNewCollectionButton.setEnabled(true);
+ dbNewObjectButton.setEnabled(true);
+ dbNewKeyValueButton.setEnabled(false);
+ break;
+
+ case Object:
+ dbNewCollectionButton.setEnabled(true);
+ dbNewObjectButton.setEnabled(false);
+ dbNewKeyValueButton.setEnabled(true);
+ break;
+
+ case KeyValue:
+ dbNewCollectionButton.setEnabled(true);
+ dbNewObjectButton.setEnabled(false);
+ dbNewKeyValueButton.setEnabled(false);
+ break;
+ }
+ }
+ }
+
private void initComponents() {
setBorder(BorderFactory.createLineBorder(Color.BLACK));
- setLayout(new FormLayout("3dlu, pref, 1dlu, 150px, 3dlu, pref, 3dlu, pref", "pref"));
+ setLayout(new FormLayout("3dlu, pref, 1dlu, 150px, 3dlu, pref, 3dlu, pref, 3dlu, pref", "pref"));
CellConstraints cc = new CellConstraints();
JLabel dbLabel = new JLabel(MongoBundle.getString(MongoBundle.Key.Database));
@@ -117,6 +145,13 @@
dbNewObjectButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewObject));
add(dbNewObjectButton, cc.xy(8, 1));
dbNewObjectButton.setEnabled(false);
+
+ icon = new ImageIcon(MongoControlPanel.class.getResource("/com/mebigfatguy/mongobrowser/resources/newkeyvalue.png"));
+ dbNewKeyValueButton = new JButton(icon);
+ dbNewKeyValueButton.setPreferredSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
+ dbNewKeyValueButton.setToolTipText(MongoBundle.getString(MongoBundle.Key.NewKeyValue));
+ add(dbNewKeyValueButton, cc.xy(10, 1));
+ dbNewKeyValueButton.setEnabled(false);
}
private void initListeners() {
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 04:40:15 UTC (rev 37)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 05:07:35 UTC (rev 38)
@@ -31,6 +31,8 @@
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
import javax.swing.event.TreeWillExpandListener;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.ExpandVetoException;
@@ -77,6 +79,7 @@
root.removeAllChildren();
}
model.nodeStructureChanged(root);
+ context.setSelectedNode(null);
}
@Override
@@ -85,6 +88,7 @@
MongoTreeNode root = (MongoTreeNode)model.getRoot();
root.removeAllChildren();
model.nodeStructureChanged(root);
+ context.setSelectedNode(null);
}
private void initComponents() {
@@ -130,9 +134,13 @@
menu.show(tree, x, y);
} else {
MongoTreeNode node = (MongoTreeNode)path.getLastPathComponent();
+ context.setSelectedNode(node);
if (node.getType() == MongoTreeNode.Type.Collection) {
menu.add(newObjectItem);
menu.show(tree, x, y);
+ } else if (node.getType() == MongoTreeNode.Type.Object){
+ menu.add(newKeyValueItem);
+ menu.show(tree, x, y);
}
}
}
@@ -187,6 +195,19 @@
});
+ tree.addTreeSelectionListener(new TreeSelectionListener() {
+ @Override
+ public void valueChanged(TreeSelectionEvent tse) {
+ TreePath path = tse.getNewLeadSelectionPath();
+ if (path != null) {
+ MongoTreeNode node = (MongoTreeNode)path.getLastPathComponent();
+ context.setSelectedNode(node);
+ } else {
+ context.setSelectedNode(null);
+ }
+ }
+ });
+
newCollectionItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
@@ -202,5 +223,13 @@
actions.createNewObject();
}
});
+
+ newKeyValueItem.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent ae) {
+ MongoActions actions = new MongoActions(context);
+ actions.createNewKeyValue();
+ }
+ });
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 04:40:26
|
Revision: 37
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=37&view=rev
Author: dbrosius
Date: 2009-12-27 04:40:15 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
new toolbar icon
Added Paths:
-----------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/newkeyvalue.png
Added: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/newkeyvalue.png
===================================================================
(Binary files differ)
Property changes on: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/newkeyvalue.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 04:31:37
|
Revision: 36
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=36&view=rev
Author: dbrosius
Date: 2009-12-27 04:31:29 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
on collapse - remove all children, and reintroduce the slug
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 2009-12-27 04:28:49 UTC (rev 35)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 04:31:29 UTC (rev 36)
@@ -177,6 +177,12 @@
@Override
public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
+ MongoTreeNode node = (MongoTreeNode)event.getPath().getLastPathComponent();
+ node.removeAllChildren();
+ MongoTreeNode slug = new MongoTreeNode(MongoTreeNode.Type.ExpansionSlug, null);
+ node.add(slug);
+ DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
+ model.nodeStructureChanged(node);
}
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2009-12-27 04:28:57
|
Revision: 35
http://mongobrowser.svn.sourceforge.net/mongobrowser/?rev=35&view=rev
Author: dbrosius
Date: 2009-12-27 04:28:49 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
make the Object name the toString value
Modified Paths:
--------------
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoBundle.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java
trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/resource.properties
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoBundle.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoBundle.java 2009-12-27 04:23:27 UTC (rev 34)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/MongoBundle.java 2009-12-27 04:28:49 UTC (rev 35)
@@ -42,8 +42,7 @@
NewDatabase("mongo.newdatabase"),
NewCollection("mongo.newcollection"),
NewObject("mongo.newobject"),
- NewKeyValue("mongo.newkeyvalue"),
- Object("mongo.object");
+ NewKeyValue("mongo.newkeyvalue");
String id;
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 04:23:27 UTC (rev 34)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoDataPanel.java 2009-12-27 04:28:49 UTC (rev 35)
@@ -148,7 +148,6 @@
node.removeAllChildren();
switch (node.getType()) {
case Collection: {
- String objectName = MongoBundle.getString(MongoBundle.Key.Object);
DBCollection collection = (DBCollection)node.getUserObject();
DBCursor cursor = collection.find();
while (cursor.hasNext()) {
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java 2009-12-27 04:23:27 UTC (rev 34)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/dialogs/MongoTreeNode.java 2009-12-27 04:28:49 UTC (rev 35)
@@ -20,8 +20,8 @@
import javax.swing.tree.DefaultMutableTreeNode;
-import com.mebigfatguy.mongobrowser.MongoBundle;
import com.mongodb.DBCollection;
+import com.mongodb.DBObject;
public class MongoTreeNode extends DefaultMutableTreeNode {
private static final long serialVersionUID = -1710144820086785938L;
@@ -45,8 +45,9 @@
case Collection:
return ((DBCollection)getUserObject()).getName();
- case Object:
- return MongoBundle.getString(MongoBundle.Key.Object);
+ case Object: {
+ return ((DBObject)getUserObject()).toString();
+ }
case KeyValue:
return (String)getUserObject();
Modified: trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/resource.properties
===================================================================
--- trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/resource.properties 2009-12-27 04:23:27 UTC (rev 34)
+++ trunk/mongobrowser/src/com/mebigfatguy/mongobrowser/resources/resource.properties 2009-12-27 04:28:49 UTC (rev 35)
@@ -30,5 +30,4 @@
mongo.newdatabase = New Database...
mongo.newcollection = New Collection...
mongo.newobject = New Object...
-mongo.newkeyvalue = New Key/Value...
-mongo.object = Object
\ No newline at end of file
+mongo.newkeyvalue = New Key/Value...
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|