mysfstats-commit Mailing List for mysfstats (Page 2)
Brought to you by:
dbrosius
You can subscribe to this list here.
2009 |
Jan
|
Feb
(13) |
Mar
|
Apr
|
May
(7) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(22) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dbr...@us...> - 2010-01-07 06:25:57
|
Revision: 36 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=36&view=rev Author: dbrosius Date: 2010-01-07 06:25:50 +0000 (Thu, 07 Jan 2010) Log Message: ----------- pull constant expr out of loop Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-07 06:24:52 UTC (rev 35) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-07 06:25:50 UTC (rev 36) @@ -170,10 +170,11 @@ ActionListener periodListener = new ActionListener() { public void actionPerformed(ActionEvent ae) { + JMenuItem mi = (JMenuItem)ae.getSource(); int tabCount = tabbedPane.getTabCount(); for (int i = 0; i < tabCount; i++) { MySFStatsPanel panel = (MySFStatsPanel)tabbedPane.getComponentAt(i); - JMenuItem mi = (JMenuItem)ae.getSource(); + if (mi == weekPeriodMenuItem) panel.changePeriod(GraphPeriod.Week); else if (mi == twoMonthPeriodMenuItem) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-07 06:24:59
|
Revision: 35 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=35&view=rev Author: dbrosius Date: 2010-01-07 06:24:52 +0000 (Thu, 07 Jan 2010) Log Message: ----------- changing the period changes all the tabs Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-01 01:16:55 UTC (rev 34) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-07 06:24:52 UTC (rev 35) @@ -170,16 +170,19 @@ ActionListener periodListener = new ActionListener() { public void actionPerformed(ActionEvent ae) { - MySFStatsPanel panel = (MySFStatsPanel)tabbedPane.getSelectedComponent(); - JMenuItem mi = (JMenuItem)ae.getSource(); - if (mi == weekPeriodMenuItem) - panel.changePeriod(GraphPeriod.Week); - else if (mi == twoMonthPeriodMenuItem) - panel.changePeriod(GraphPeriod.SixtyDays); - else if (mi == yearPeriodMenuItem) - panel.changePeriod(GraphPeriod.Year); - else - panel.changePeriod(GraphPeriod.AllTime); + int tabCount = tabbedPane.getTabCount(); + for (int i = 0; i < tabCount; i++) { + MySFStatsPanel panel = (MySFStatsPanel)tabbedPane.getComponentAt(i); + JMenuItem mi = (JMenuItem)ae.getSource(); + if (mi == weekPeriodMenuItem) + panel.changePeriod(GraphPeriod.Week); + else if (mi == twoMonthPeriodMenuItem) + panel.changePeriod(GraphPeriod.SixtyDays); + else if (mi == yearPeriodMenuItem) + panel.changePeriod(GraphPeriod.Year); + else + panel.changePeriod(GraphPeriod.AllTime); + } } }; weekPeriodMenuItem.addActionListener(periodListener); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-01 01:17:02
|
Revision: 34 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=34&view=rev Author: dbrosius Date: 2010-01-01 01:16:55 +0000 (Fri, 01 Jan 2010) Log Message: ----------- (c) 2010 Modified Paths: -------------- trunk/mysfstats/build.xml trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java Modified: trunk/mysfstats/build.xml =================================================================== --- trunk/mysfstats/build.xml 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/build.xml 2010-01-01 01:16:55 UTC (rev 34) @@ -1,7 +1,7 @@ <!-- /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -116,7 +116,7 @@ destdir="${javadoc.dir}" windowtitle="mysfstats api"> <doctitle><![CDATA[<h1>mysfstats javadoc</h1>]]></doctitle> - <bottom><![CDATA[<i>Copyright © 2010 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> + <bottom><![CDATA[<i>Copyright © 2009-2010 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> </javadoc> </target> Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java 2010-01-01 00:50:22 UTC (rev 33) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java 2010-01-01 01:16:55 UTC (rev 34) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2010 Dave Brosius + * Copyright (C) 2009-2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2010-01-01 00:50:33
|
Revision: 33 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=33&view=rev Author: dbrosius Date: 2010-01-01 00:50:22 +0000 (Fri, 01 Jan 2010) Log Message: ----------- (c) 2010 Modified Paths: -------------- trunk/mysfstats/build.xml trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java Modified: trunk/mysfstats/build.xml =================================================================== --- trunk/mysfstats/build.xml 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/build.xml 2010-01-01 00:50:22 UTC (rev 33) @@ -1,7 +1,7 @@ <!-- /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -116,7 +116,7 @@ destdir="${javadoc.dir}" windowtitle="mysfstats api"> <doctitle><![CDATA[<h1>mysfstats javadoc</h1>]]></doctitle> - <bottom><![CDATA[<i>Copyright © 2009 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> + <bottom><![CDATA[<i>Copyright © 2010 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom> </javadoc> </target> Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java 2009-12-28 06:29:26 UTC (rev 32) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/SFAction.java 2010-01-01 00:50:22 UTC (rev 33) @@ -1,6 +1,6 @@ /* * mysfstats - A simple gui to see a set of sourceforge project statistics - * Copyright (C) 2009 Dave Brosius + * Copyright (C) 2010 Dave Brosius * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with 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:29:32
|
Revision: 32 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=32&view=rev Author: dbrosius Date: 2009-12-28 06:29:26 +0000 (Mon, 28 Dec 2009) Log Message: ----------- add mbfg other projects Modified Paths: -------------- trunk/mysfstats/htdocs/index.shtml Modified: trunk/mysfstats/htdocs/index.shtml =================================================================== --- trunk/mysfstats/htdocs/index.shtml 2009-12-28 06:28:37 UTC (rev 31) +++ trunk/mysfstats/htdocs/index.shtml 2009-12-28 06:29:26 UTC (rev 32) @@ -2,6 +2,9 @@ <head> <title>mysfstats - a webstart gui application to display sourceforge statistic graphs</title> <meta name="Keywords" content="sourceforge statistics graphs projects webstart"> + <script src="mbfg.js"> + </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 +17,7 @@ <a href="javadoc/index.html">JavaDoc</a> <img src="vbar.gif" height="12"/> <a href="jnlp/mysfstats.jnlp">Web Start</a> + <!--#include virtual="mbfg_menu.shtml" --> <hr/> <p>Thanks for your interest in mysfstats.</p> 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:28:47
|
Revision: 31 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=31&view=rev Author: dbrosius Date: 2009-12-28 06:28:37 +0000 (Mon, 28 Dec 2009) Log Message: ----------- rename index.html to .shtml for ssi Added Paths: ----------- trunk/mysfstats/htdocs/index.shtml Removed Paths: ------------- trunk/mysfstats/htdocs/index.html Deleted: trunk/mysfstats/htdocs/index.html =================================================================== --- trunk/mysfstats/htdocs/index.html 2009-12-28 06:28:01 UTC (rev 30) +++ trunk/mysfstats/htdocs/index.html 2009-12-28 06:28:37 UTC (rev 31) @@ -1,35 +0,0 @@ -<html> - <head> - <title>mysfstats - a webstart gui application to display sourceforge statistic graphs</title> - <meta name="Keywords" content="sourceforge statistics graphs projects webstart"> - </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>mysfstats</h1> - <hr/> - <a href="http://www.sourceforge.net/projects/mysfstats">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/mysfstats.jnlp">Web Start</a> - <hr/> - - <p>Thanks for your interest in mysfstats.</p> - - <p>This simple gui webstart tool allows the user to select a customized list of sourceforge - projects and see the project statistic graphs for all these projects in one dialog.</p> - <img src="mysfstats.png"/> - </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-7"); -pageTracker._trackPageview(); -} catch(err) {}</script> - </body> -</html> Copied: trunk/mysfstats/htdocs/index.shtml (from rev 25, trunk/mysfstats/htdocs/index.html) =================================================================== --- trunk/mysfstats/htdocs/index.shtml (rev 0) +++ trunk/mysfstats/htdocs/index.shtml 2009-12-28 06:28:37 UTC (rev 31) @@ -0,0 +1,35 @@ +<html> + <head> + <title>mysfstats - a webstart gui application to display sourceforge statistic graphs</title> + <meta name="Keywords" content="sourceforge statistics graphs projects webstart"> + </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>mysfstats</h1> + <hr/> + <a href="http://www.sourceforge.net/projects/mysfstats">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/mysfstats.jnlp">Web Start</a> + <hr/> + + <p>Thanks for your interest in mysfstats.</p> + + <p>This simple gui webstart tool allows the user to select a customized list of sourceforge + projects and see the project statistic graphs for all these projects in one dialog.</p> + <img src="mysfstats.png"/> + </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-7"); +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-28 06:28:12
|
Revision: 30 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=30&view=rev Author: dbrosius Date: 2009-12-28 06:28:01 +0000 (Mon, 28 Dec 2009) Log Message: ----------- add files for mbfg other projects menu Added Paths: ----------- trunk/mysfstats/htdocs/mbfg.css trunk/mysfstats/htdocs/mbfg.js trunk/mysfstats/htdocs/mbfg_menu.shtml Added: trunk/mysfstats/htdocs/mbfg.css =================================================================== --- trunk/mysfstats/htdocs/mbfg.css (rev 0) +++ trunk/mysfstats/htdocs/mbfg.css 2009-12-28 06:28:01 UTC (rev 30) @@ -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: 6px 40px 6px 40px; + background-color: #DDDDFF; + margin-right: 20px; + text-decoration: none; +} + +#mbfg_projects ul li a:hover { + background-color: #FFDDDD; +} Property changes on: trunk/mysfstats/htdocs/mbfg.css ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/htdocs/mbfg.js =================================================================== --- trunk/mysfstats/htdocs/mbfg.js (rev 0) +++ trunk/mysfstats/htdocs/mbfg.js 2009-12-28 06:28:01 UTC (rev 30) @@ -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/mysfstats/htdocs/mbfg.js ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/htdocs/mbfg_menu.shtml =================================================================== --- trunk/mysfstats/htdocs/mbfg_menu.shtml (rev 0) +++ trunk/mysfstats/htdocs/mbfg_menu.shtml 2009-12-28 06:28:01 UTC (rev 30) @@ -0,0 +1,17 @@ + <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> + <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> Property changes on: trunk/mysfstats/htdocs/mbfg_menu.shtml ___________________________________________________________________ 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-11-28 23:51:26
|
Revision: 29 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=29&view=rev Author: dbrosius Date: 2009-11-28 23:51:19 +0000 (Sat, 28 Nov 2009) Log Message: ----------- eclipse files Added Paths: ----------- trunk/mysfstats/.classpath trunk/mysfstats/.project Added: trunk/mysfstats/.classpath =================================================================== --- trunk/mysfstats/.classpath (rev 0) +++ trunk/mysfstats/.classpath 2009-11-28 23:51:19 UTC (rev 29) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="classes"/> +</classpath> Property changes on: trunk/mysfstats/.classpath ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/.project =================================================================== --- trunk/mysfstats/.project (rev 0) +++ trunk/mysfstats/.project 2009-11-28 23:51:19 UTC (rev 29) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>mysfstats</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Property changes on: trunk/mysfstats/.project ___________________________________________________________________ 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-11-28 20:32:37
|
Revision: 28 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=28&view=rev Author: dbrosius Date: 2009-11-28 20:32:27 +0000 (Sat, 28 Nov 2009) Log Message: ----------- version 1.0.2 Modified Paths: -------------- trunk/mysfstats/build.xml Modified: trunk/mysfstats/build.xml =================================================================== --- trunk/mysfstats/build.xml 2009-11-28 20:31:50 UTC (rev 27) +++ trunk/mysfstats/build.xml 2009-11-28 20:32:27 UTC (rev 28) @@ -35,7 +35,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="mysfstats.version" value="1.0.1"/> + <property name="mysfstats.version" value="1.0.2"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-11-28 20:31:58
|
Revision: 27 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=27&view=rev Author: dbrosius Date: 2009-11-28 20:31:50 +0000 (Sat, 28 Nov 2009) Log Message: ----------- new keystore Modified Paths: -------------- trunk/mysfstats/mysfstats.store Modified: trunk/mysfstats/mysfstats.store =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-11-28 20:28:53
|
Revision: 26 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=26&view=rev Author: dbrosius Date: 2009-11-28 20:28:46 +0000 (Sat, 28 Nov 2009) Log Message: ----------- update logo Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/sf.png Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/sf.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-07-06 07:59:32
|
Revision: 25 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=25&view=rev Author: dbrosius Date: 2009-07-06 07:59:24 +0000 (Mon, 06 Jul 2009) Log Message: ----------- release version 1.0.1 to fix getting group id Modified Paths: -------------- trunk/mysfstats/build.xml Modified: trunk/mysfstats/build.xml =================================================================== --- trunk/mysfstats/build.xml 2009-07-06 07:57:10 UTC (rev 24) +++ trunk/mysfstats/build.xml 2009-07-06 07:59:24 UTC (rev 25) @@ -35,7 +35,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="mysfstats.version" value="1.0.0"/> + <property name="mysfstats.version" value="1.0.1"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-07-06 07:57:11
|
Revision: 24 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=24&view=rev Author: dbrosius Date: 2009-07-06 07:57:10 +0000 (Mon, 06 Jul 2009) Log Message: ----------- update certificate Modified Paths: -------------- trunk/mysfstats/mysfstats.store Modified: trunk/mysfstats/mysfstats.store =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-07-06 07:55:15
|
Revision: 23 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=23&view=rev Author: dbrosius Date: 2009-07-06 07:55:13 +0000 (Mon, 06 Jul 2009) Log Message: ----------- fix fetching of group id Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-05-30 15:09:01 UTC (rev 22) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-07-06 07:55:13 UTC (rev 23) @@ -116,7 +116,7 @@ con = (HttpURLConnection)u.openConnection(); con.connect(); br = new BufferedReader(new InputStreamReader(con.getInputStream())); - Pattern p = Pattern.compile("project/showfiles\\.php\\?group_id=([0-9]*)"); + Pattern p = Pattern.compile("group_id=([0-9]*)"); String line = br.readLine(); while (line != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-05-30 15:09:10
|
Revision: 22 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=22&view=rev Author: dbrosius Date: 2009-05-30 15:09:01 +0000 (Sat, 30 May 2009) Log Message: ----------- Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties 2009-05-30 05:00:44 UTC (rev 21) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties 2009-05-30 15:09:01 UTC (rev 22) @@ -4,7 +4,7 @@ menu.removeproject = Remove Project menu.refreshproject = Refresh Project menu.quit = Quit -label.selectproject = Select SourceForge project +label.selectproject = Enter SourceForge project (unix name) label.failedadd = Failed adding {0} tab label.loading = Loading... label.loadfailed = Load Failed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-05-30 05:00:45
|
Revision: 21 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=21&view=rev Author: dbrosius Date: 2009-05-30 05:00:44 +0000 (Sat, 30 May 2009) Log Message: ----------- up to 1.0.0 Modified Paths: -------------- trunk/mysfstats/build.xml Modified: trunk/mysfstats/build.xml =================================================================== --- trunk/mysfstats/build.xml 2009-05-30 04:59:09 UTC (rev 20) +++ trunk/mysfstats/build.xml 2009-05-30 05:00:44 UTC (rev 21) @@ -35,7 +35,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="mysfstats.version" value="0.9.0"/> + <property name="mysfstats.version" value="1.0.0"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-05-30 04:59:31
|
Revision: 20 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=20&view=rev Author: dbrosius Date: 2009-05-30 04:59:09 +0000 (Sat, 30 May 2009) Log Message: ----------- Modified Paths: -------------- trunk/mysfstats/etc/mysfstats.jnlp Modified: trunk/mysfstats/etc/mysfstats.jnlp =================================================================== --- trunk/mysfstats/etc/mysfstats.jnlp 2009-05-30 04:57:47 UTC (rev 19) +++ trunk/mysfstats/etc/mysfstats.jnlp 2009-05-30 04:59:09 UTC (rev 20) @@ -22,3 +22,4 @@ <application-desc main-class="com.mebigfatguy.mysfstats.MySFStats"/> </jnlp> + \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-05-30 04:57:49
|
Revision: 19 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=19&view=rev Author: dbrosius Date: 2009-05-30 04:57:47 +0000 (Sat, 30 May 2009) Log Message: ----------- hook up viewing periods per stats panel Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2009-05-30 04:41:54 UTC (rev 18) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2009-05-30 04:57:47 UTC (rev 19) @@ -21,7 +21,7 @@ public enum GraphPeriod { Week("week"), - SixtyDays("60days"), + SixtyDays("60day"), Year("year"), AllTime("alltime"); Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-05-30 04:41:54 UTC (rev 18) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-05-30 04:57:47 UTC (rev 19) @@ -44,6 +44,8 @@ import javax.swing.JOptionPane; import javax.swing.JRadioButtonMenuItem; import javax.swing.JTabbedPane; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; public class MySFStatsFrame extends JFrame { private static final long serialVersionUID = -5706588855721827781L; @@ -168,7 +170,16 @@ ActionListener periodListener = new ActionListener() { public void actionPerformed(ActionEvent ae) { - + MySFStatsPanel panel = (MySFStatsPanel)tabbedPane.getSelectedComponent(); + JMenuItem mi = (JMenuItem)ae.getSource(); + if (mi == weekPeriodMenuItem) + panel.changePeriod(GraphPeriod.Week); + else if (mi == twoMonthPeriodMenuItem) + panel.changePeriod(GraphPeriod.SixtyDays); + else if (mi == yearPeriodMenuItem) + panel.changePeriod(GraphPeriod.Year); + else + panel.changePeriod(GraphPeriod.AllTime); } }; weekPeriodMenuItem.addActionListener(periodListener); @@ -176,6 +187,31 @@ yearPeriodMenuItem.addActionListener(periodListener); allTimePeriodMenuItem.addActionListener(periodListener); + tabbedPane.addChangeListener(new ChangeListener() { + + public void stateChanged(ChangeEvent ce) { + MySFStatsPanel statsPanel = (MySFStatsPanel)tabbedPane.getSelectedComponent(); + GraphPeriod period = statsPanel.getGraphPeriod(); + switch (period) { + case Week: + weekPeriodMenuItem.setSelected(true); + break; + + case SixtyDays: + twoMonthPeriodMenuItem.setSelected(true); + break; + + case Year: + yearPeriodMenuItem.setSelected(true); + break; + + case AllTime: + allTimePeriodMenuItem.setSelected(true); + break; + } + } + }); + addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent we) { Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-05-30 04:41:54 UTC (rev 18) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-05-30 04:57:47 UTC (rev 19) @@ -41,7 +41,7 @@ private final String projectName; private String groupId; - private final GraphPeriod graphPeriod; + private GraphPeriod graphPeriod; public MySFStatsPanel(String projectName, String groupId, GraphPeriod period) throws Exception { @@ -56,6 +56,15 @@ refresh(); } + public void changePeriod(GraphPeriod period) { + graphPeriod = period; + refresh(); + } + + public GraphPeriod getGraphPeriod() { + return graphPeriod; + } + public String getProjectName() { return projectName; } @@ -159,7 +168,7 @@ @Override public void run() { try { - ImageIcon icon = new ImageIcon(new URL("http://sourceforge.net/project/stats/graph/index-graph.php?group_id="+groupId+"&ugn="+projectName+"&graph="+graphType+"&mode=week")); + ImageIcon icon = new ImageIcon(new URL("http://sourceforge.net/project/stats/graph/index-graph.php?group_id="+groupId+"&ugn="+projectName+"&graph="+graphType+"&mode=" + graphPeriod.getUrlValue())); if (icon.getImageLoadStatus() == MediaTracker.COMPLETE) { label = new JLabel(icon); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-05-30 04:41:56
|
Revision: 18 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=18&view=rev Author: dbrosius Date: 2009-05-30 04:41:54 +0000 (Sat, 30 May 2009) Log Message: ----------- add a period menu for choosing what the graph duration is -- not hooked up yet. Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2009-05-30 04:21:21 UTC (rev 17) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2009-05-30 04:41:54 UTC (rev 18) @@ -1,3 +1,22 @@ +/* + * mysfstats - A simple gui to see a set of sourceforge project statistics + * Copyright (C) 2009 Dave Brosius + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.mysfstats; public enum GraphPeriod { @@ -2,16 +21,21 @@ Week("week"), - SixtyDays("60day"), + SixtyDays("60days"), Year("year"), AllTime("alltime"); - private String rawValue; + private String urlValue; + private String propKey; - GraphPeriod(String value) { - rawValue = value; + GraphPeriod(String urlValue) { + this.urlValue = urlValue; + this.propKey = "period." + urlValue; } - @Override - public String toString() { - return rawValue; + public String getUrlValue() { + return urlValue; } + + public String getPropertyKey() { + return propKey; + } } Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2009-05-30 04:21:21 UTC (rev 17) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2009-05-30 04:41:54 UTC (rev 18) @@ -34,6 +34,11 @@ public static final String FAILEDADD = "label.failedadd"; public static final String LOADING = "label.loading"; public static final String LOADFAILED = "label.loadfailed"; + public static final String PERIODDURATION = "period.name"; + public static final String WEEKPERIOD = "period.week"; + public static final String TWOMONTHPERIOD = "period.60days"; + public static final String YEARPERIOD = "period.year"; + public static final String ALLTIMEPERIOD = "period.alltime"; private MySFStatsBundle() { Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-05-30 04:21:21 UTC (rev 17) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-05-30 04:41:54 UTC (rev 18) @@ -36,11 +36,13 @@ import java.util.Properties; import java.util.Set; +import javax.swing.ButtonGroup; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; +import javax.swing.JRadioButtonMenuItem; import javax.swing.JTabbedPane; public class MySFStatsFrame extends JFrame { @@ -50,6 +52,10 @@ private JMenuItem removeProjectMenuItem; private JMenuItem refreshProjectMenuItem; private JMenuItem quitMenuItem; + private JMenuItem weekPeriodMenuItem; + private JMenuItem twoMonthPeriodMenuItem; + private JMenuItem yearPeriodMenuItem; + private JMenuItem allTimePeriodMenuItem; public MySFStatsFrame() { setTitle(MySFStatsBundle.getString(MySFStatsBundle.TITLE)); @@ -101,12 +107,29 @@ removeProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.REMOVEPROJECT)); refreshProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.REFRESHPROJECT)); quitMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.QUIT)); + JMenu periodMenu = new JMenu(MySFStatsBundle.getString(MySFStatsBundle.PERIODDURATION)); + weekPeriodMenuItem = new JRadioButtonMenuItem(MySFStatsBundle.getString(MySFStatsBundle.WEEKPERIOD)); + twoMonthPeriodMenuItem = new JRadioButtonMenuItem(MySFStatsBundle.getString(MySFStatsBundle.TWOMONTHPERIOD)); + yearPeriodMenuItem = new JRadioButtonMenuItem(MySFStatsBundle.getString(MySFStatsBundle.YEARPERIOD)); + allTimePeriodMenuItem = new JRadioButtonMenuItem(MySFStatsBundle.getString(MySFStatsBundle.ALLTIMEPERIOD)); + + ButtonGroup bg = new ButtonGroup(); + bg.add(weekPeriodMenuItem); + bg.add(twoMonthPeriodMenuItem); + bg.add(yearPeriodMenuItem); + bg.add(allTimePeriodMenuItem); + weekPeriodMenuItem.setSelected(true); + sfMenu.add(addProjectMenuItem); - sfMenu.addSeparator(); sfMenu.add(removeProjectMenuItem); - sfMenu.addSeparator(); sfMenu.add(refreshProjectMenuItem); sfMenu.addSeparator(); + sfMenu.add(periodMenu); + periodMenu.add(weekPeriodMenuItem); + periodMenu.add(twoMonthPeriodMenuItem); + periodMenu.add(yearPeriodMenuItem); + periodMenu.add(allTimePeriodMenuItem); + sfMenu.addSeparator(); sfMenu.add(quitMenuItem); setJMenuBar(mb); } @@ -143,6 +166,16 @@ } }); + ActionListener periodListener = new ActionListener() { + public void actionPerformed(ActionEvent ae) { + + } + }; + weekPeriodMenuItem.addActionListener(periodListener); + twoMonthPeriodMenuItem.addActionListener(periodListener); + yearPeriodMenuItem.addActionListener(periodListener); + allTimePeriodMenuItem.addActionListener(periodListener); + addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent we) { @@ -153,7 +186,7 @@ private void createTab(String projectName, String groupId) { try { - MySFStatsPanel panel = new MySFStatsPanel(projectName, groupId); + MySFStatsPanel panel = new MySFStatsPanel(projectName, groupId, GraphPeriod.Week); tabbedPane.insertTab(projectName, null, panel, projectName, tabbedPane.getTabCount()); } catch (Exception e) { JOptionPane.showMessageDialog(MySFStatsFrame.this, MessageFormat.format(MySFStatsBundle.getString(MySFStatsBundle.FAILEDADD), projectName), MySFStatsBundle.getString(MySFStatsBundle.TITLE), JOptionPane.ERROR_MESSAGE); Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-05-30 04:21:21 UTC (rev 17) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-05-30 04:41:54 UTC (rev 18) @@ -41,15 +41,17 @@ private final String projectName; private String groupId; + private final GraphPeriod graphPeriod; - public MySFStatsPanel(String projectName, String groupId) throws Exception { + public MySFStatsPanel(String projectName, String groupId, GraphPeriod period) throws Exception { this.projectName = projectName; setLayout(new GridLayout(2, 2)); if (groupId == null) this.groupId = getGroupId(projectName); else this.groupId = groupId; + graphPeriod = period; add(new JLabel("Loading...")); refresh(); } @@ -63,10 +65,10 @@ } public void refresh() { - final LabelFetcher lfPrWeb = LabelFetcher.getLabelFetcher(groupId, projectName, "prweb"); - final LabelFetcher lfPrDownload = LabelFetcher.getLabelFetcher(groupId, projectName, "prdownload"); - final LabelFetcher lfSfWeb = LabelFetcher.getLabelFetcher(groupId, projectName, "sfweb"); - final LabelFetcher lfTracker = LabelFetcher.getLabelFetcher(groupId, projectName, "tracker"); + final LabelFetcher lfPrWeb = LabelFetcher.getLabelFetcher(groupId, projectName, "prweb", graphPeriod); + final LabelFetcher lfPrDownload = LabelFetcher.getLabelFetcher(groupId, projectName, "prdownload", graphPeriod); + final LabelFetcher lfSfWeb = LabelFetcher.getLabelFetcher(groupId, projectName, "sfweb", graphPeriod); + final LabelFetcher lfTracker = LabelFetcher.getLabelFetcher(groupId, projectName, "tracker", graphPeriod); Thread t = new Thread() { @Override @@ -128,16 +130,18 @@ private final String groupId; private final String projectName; private final String graphType; + private final GraphPeriod graphPeriod; private JLabel label; - private LabelFetcher(String groupId, String projectName, String graphType) { + private LabelFetcher(String groupId, String projectName, String graphType, GraphPeriod graphPeriod) { this.groupId = groupId; this.projectName = projectName; this.graphType = graphType; + this.graphPeriod = graphPeriod; } - public static LabelFetcher getLabelFetcher(String groupId, String projectName, String graphType) { - LabelFetcher lf = new LabelFetcher(groupId, projectName, graphType); + public static LabelFetcher getLabelFetcher(String groupId, String projectName, String graphType, GraphPeriod period) { + LabelFetcher lf = new LabelFetcher(groupId, projectName, graphType, period); lf.start(); return lf; } Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties 2009-05-30 04:21:21 UTC (rev 17) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties 2009-05-30 04:41:54 UTC (rev 18) @@ -8,3 +8,8 @@ label.failedadd = Failed adding {0} tab label.loading = Loading... label.loadfailed = Load Failed +period.name = Graph Duration +period.week = Week +period.60days = Two Months +period.year = Year +period.alltime = All Time This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-05-30 04:21:34
|
Revision: 17 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=17&view=rev Author: dbrosius Date: 2009-05-30 04:21:21 +0000 (Sat, 30 May 2009) Log Message: ----------- an enum for chart granularity Added Paths: ----------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.java 2009-05-30 04:21:21 UTC (rev 17) @@ -0,0 +1,19 @@ +package com.mebigfatguy.mysfstats; + +public enum GraphPeriod { + Week("week"), + SixtyDays("60day"), + Year("year"), + AllTime("alltime"); + + private String rawValue; + + GraphPeriod(String value) { + rawValue = value; + } + + @Override + public String toString() { + return rawValue; + } +} Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/GraphPeriod.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-05-05 03:57:59
|
Revision: 16 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=16&view=rev Author: dbrosius Date: 2009-05-05 03:57:50 +0000 (Tue, 05 May 2009) Log Message: ----------- add shortcut Modified Paths: -------------- trunk/mysfstats/etc/mysfstats.jnlp Modified: trunk/mysfstats/etc/mysfstats.jnlp =================================================================== --- trunk/mysfstats/etc/mysfstats.jnlp 2009-02-28 05:32:08 UTC (rev 15) +++ trunk/mysfstats/etc/mysfstats.jnlp 2009-05-05 03:57:50 UTC (rev 16) @@ -9,7 +9,8 @@ <homepage href="http://mysfstats.sourceforge.net"/> <description>A Sourceforge project statistics aggregator</description> <description kind="short">A Sourceforge project statistics aggregator</description> - <offline-allowed/> + <offline-allowed/> + <shortcut online="false"><menu submenu="MySFStats"/></shortcut> </information> <security> <all-permissions/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-02-28 05:32:09
|
Revision: 15 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=15&view=rev Author: dbrosius Date: 2009-02-28 05:32:08 +0000 (Sat, 28 Feb 2009) Log Message: ----------- only show the image if it loaded successfully Modified Paths: -------------- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-02-24 03:19:53 UTC (rev 14) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-02-28 05:32:08 UTC (rev 15) @@ -21,6 +21,7 @@ import java.awt.Dimension; import java.awt.GridLayout; +import java.awt.MediaTracker; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; @@ -154,7 +155,12 @@ @Override public void run() { try { - label = new JLabel(new ImageIcon(new URL("http://sourceforge.net/project/stats/graph/index-graph.php?group_id="+groupId+"&ugn="+projectName+"&graph="+graphType+"&mode=week"))); + ImageIcon icon = new ImageIcon(new URL("http://sourceforge.net/project/stats/graph/index-graph.php?group_id="+groupId+"&ugn="+projectName+"&graph="+graphType+"&mode=week")); + if (icon.getImageLoadStatus() == MediaTracker.COMPLETE) { + label = new JLabel(icon); + } else { + label = new JLabel("Load Failed"); + } } catch (Exception e) { label = new JLabel("Load Failed"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2009-02-24 03:22:52
|
Revision: 3 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=3&view=rev Author: dbrosius Date: 2009-02-24 02:23:10 +0000 (Tue, 24 Feb 2009) Log Message: ----------- Initial checkin Added Paths: ----------- trunk/mysfstats/src/ trunk/mysfstats/src/com/ trunk/mysfstats/src/com/mebigfatguy/ trunk/mysfstats/src/com/mebigfatguy/mysfstats/ trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java 2009-02-24 02:23:10 UTC (rev 3) @@ -0,0 +1,36 @@ +/* + * mysfstats - A simple gui to see a set of sourceforge project statistics + * Copyright (C) 2009 Dave Brosius + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.mysfstats; + +import java.io.Closeable; +import java.io.IOException; + +public class Closer { + private Closer() { + } + + public static final void close(Closeable c) { + try { + if (c != null) + c.close(); + } catch (IOException ioe) { + } + } +} Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/Closer.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java 2009-02-24 02:23:10 UTC (rev 3) @@ -0,0 +1,28 @@ +/* + * mysfstats - A simple gui to see a set of sourceforge project statistics + * Copyright (C) 2009 Dave Brosius + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.mysfstats; + +public class MySFStats { + public static void main(String[] args) { + MySFStatsFrame frame = new MySFStatsFrame(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } +} Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStats.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java 2009-02-24 02:23:10 UTC (rev 3) @@ -0,0 +1,45 @@ +/* + * mysfstats - A simple gui to see a set of sourceforge project statistics + * Copyright (C) 2009 Dave Brosius + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.mysfstats; + +import java.util.ResourceBundle; + +public class MySFStatsBundle { + private static ResourceBundle rb = ResourceBundle.getBundle("com/mebigfatguy/mysfstats/resources"); + + public static final String TITLE = "mysfstats.title"; + public static final String SOURCEFORGE = "sourceforge.title"; + public static final String ADDPROJECT = "menu.addproject"; + public static final String REMOVEPROJECT = "menu.removeproject"; + public static final String REFRESHPROJECT = "menu.refreshproject"; + public static final String QUIT = "menu.quit"; + public static final String SELECTPROJECT = "label.selectproject"; + public static final String FAILEDADD = "label.failedadd"; + public static final String LOADING = "label.loading"; + public static final String LOADFAILED = "label.loadfailed"; + + private MySFStatsBundle() + { + } + + public static String getString(String key) { + return rb.getString(key); + } +} Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsBundle.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-02-24 02:23:10 UTC (rev 3) @@ -0,0 +1,178 @@ +/* + * mysfstats - A simple gui to see a set of sourceforge project statistics + * Copyright (C) 2009 Dave Brosius + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.mysfstats; + +import java.awt.Container; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.text.MessageFormat; +import java.util.Map; +import java.util.Properties; +import java.util.Set; + +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JTabbedPane; + +public class MySFStatsFrame extends JFrame { + private static final long serialVersionUID = -5706588855721827781L; + private JTabbedPane tabbedPane; + private JMenuItem addProjectMenuItem; + private JMenuItem removeProjectMenuItem; + private JMenuItem refreshProjectMenuItem; + private JMenuItem quitMenuItem; + + public MySFStatsFrame() { + setTitle(MySFStatsBundle.getString(MySFStatsBundle.TITLE)); + initComponents(); + initMenus(); + initListeners(); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + + private void initComponents() { + Container cp = getContentPane(); + tabbedPane = new JTabbedPane(); + cp.add(tabbedPane); + + File f = new File(System.getProperty("user.home") + "/.mebigfatguy/mysfstats/projects.properties"); + if (f.exists()) { + BufferedInputStream bis = null; + try { + bis = new BufferedInputStream(new FileInputStream(f)); + Properties p = new Properties(); + p.load(bis); + + Set<Map.Entry<Object, Object>> entrySet = p.entrySet(); + for (Map.Entry<Object, Object> entry : entrySet) { + String project = (String)entry.getKey(); + String group = (String)entry.getValue(); + createTab(project, group); + } + } catch (IOException ioe) { + ioe.printStackTrace(); + } finally { + Closer.close(bis); + } + pack(); + } else { + setSize(500, 400); + } + } + + private void initMenus() { + JMenuBar mb = new JMenuBar(); + JMenu sfMenu = new JMenu(MySFStatsBundle.getString(MySFStatsBundle.SOURCEFORGE)); + mb.add(sfMenu); + addProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.ADDPROJECT)); + removeProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.REMOVEPROJECT)); + refreshProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.REFRESHPROJECT)); + quitMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.QUIT)); + sfMenu.add(addProjectMenuItem); + sfMenu.addSeparator(); + sfMenu.add(removeProjectMenuItem); + sfMenu.addSeparator(); + sfMenu.add(refreshProjectMenuItem); + sfMenu.addSeparator(); + sfMenu.add(quitMenuItem); + setJMenuBar(mb); + } + + private void initListeners() { + addProjectMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ae) { + String project = JOptionPane.showInputDialog(MySFStatsFrame.this, MySFStatsBundle.getString(MySFStatsBundle.SELECTPROJECT), MySFStatsBundle.getString(MySFStatsBundle.SOURCEFORGE), JOptionPane.QUESTION_MESSAGE); + if (project != null) { + createTab(project, null); + tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1); + } + pack(); + } + }); + + removeProjectMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ae) { + tabbedPane.remove(tabbedPane.getSelectedIndex()); + } + }); + + refreshProjectMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ae) { + MySFStatsPanel panel = (MySFStatsPanel)tabbedPane.getSelectedComponent(); + panel.refresh(); + } + }); + + quitMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ae) { + writeUserProjects(); + dispose(); + } + }); + + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent we) { + writeUserProjects(); + } + }); + } + + private void createTab(String projectName, String groupId) { + try { + MySFStatsPanel panel = new MySFStatsPanel(projectName, groupId); + tabbedPane.insertTab(projectName, null, panel, projectName, tabbedPane.getTabCount()); + } catch (Exception e) { + JOptionPane.showMessageDialog(MySFStatsFrame.this, MessageFormat.format(MySFStatsBundle.getString(MySFStatsBundle.FAILEDADD), projectName), MySFStatsBundle.getString(MySFStatsBundle.TITLE), JOptionPane.ERROR_MESSAGE); + } + } + + private void writeUserProjects() { + BufferedOutputStream bos = null; + try { + File f = new File(System.getProperty("user.home"), ".mebigfatguy/mysfstats"); + f.mkdirs(); + Properties p = new Properties(); + int numProjects = tabbedPane.getTabCount(); + for (int i = 0; i < numProjects; i++) { + MySFStatsPanel panel = (MySFStatsPanel) tabbedPane.getComponent(i); + p.put(panel.getProjectName(), panel.getGroupId()); + } + bos = new BufferedOutputStream(new FileOutputStream(new File(f, "projects.properties"))); + p.store(bos, null); + dispose(); + } catch (IOException ioe) { + ioe.printStackTrace(); + } finally { + Closer.close(bos); + } + } +} Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java 2009-02-24 02:23:10 UTC (rev 3) @@ -0,0 +1,163 @@ +/* + * mysfstats - A simple gui to see a set of sourceforge project statistics + * Copyright (C) 2009 Dave Brosius + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.mysfstats; + +import java.awt.Dimension; +import java.awt.GridLayout; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; + +public class MySFStatsPanel extends JPanel { + private static final long serialVersionUID = 1402613341242783916L; + + private static final String PROJECT_PAGE = "http://sourceforge.net/projects/"; + + private final String projectName; + private String groupId; + + + public MySFStatsPanel(String projectName, String groupId) throws Exception { + this.projectName = projectName; + setLayout(new GridLayout(2, 2)); + if (groupId == null) + this.groupId = getGroupId(projectName); + else + this.groupId = groupId; + add(new JLabel("Loading...")); + refresh(); + } + + public String getProjectName() { + return projectName; + } + + public String getGroupId() { + return groupId; + } + + public void refresh() { + final LabelFetcher lfPrWeb = LabelFetcher.getLabelFetcher(groupId, projectName, "prweb"); + final LabelFetcher lfPrDownload = LabelFetcher.getLabelFetcher(groupId, projectName, "prdownload"); + final LabelFetcher lfSfWeb = LabelFetcher.getLabelFetcher(groupId, projectName, "sfweb"); + final LabelFetcher lfTracker = LabelFetcher.getLabelFetcher(groupId, projectName, "tracker"); + + Thread t = new Thread() { + @Override + public void run() { + final JLabel prweb = lfPrWeb.getLabel(); + final JLabel prdownload = lfPrDownload.getLabel(); + final JLabel sfweb = lfSfWeb.getLabel(); + final JLabel tracker = lfTracker.getLabel(); + + SwingUtilities.invokeLater(new Runnable() { + public void run() { + removeAll(); + add(prweb); + add(prdownload); + add(sfweb); + add(tracker); + invalidate(); + revalidate(); + } + }); + } + }; + t.start(); + } + + @Override + public Dimension getPreferredSize() { + return new Dimension(500, 400); + } + + private String getGroupId(String project) throws Exception { + BufferedReader br = null; + HttpURLConnection con = null; + try { + URL u = new URL(PROJECT_PAGE + project); + con = (HttpURLConnection)u.openConnection(); + con.connect(); + br = new BufferedReader(new InputStreamReader(con.getInputStream())); + Pattern p = Pattern.compile("project/showfiles\\.php\\?group_id=([0-9]*)"); + + String line = br.readLine(); + while (line != null) { + Matcher m = p.matcher(line); + if (m.find()) { + return m.group(1); + } + line = br.readLine(); + } + throw new IllegalArgumentException(project + " is not a sf project"); + } finally { + Closer.close(br); + if (con != null) { + con.disconnect(); + } + } + } + + private static class LabelFetcher extends Thread { + private final String groupId; + private final String projectName; + private final String graphType; + private JLabel label; + + private LabelFetcher(String groupId, String projectName, String graphType) { + this.groupId = groupId; + this.projectName = projectName; + this.graphType = graphType; + } + + public static LabelFetcher getLabelFetcher(String groupId, String projectName, String graphType) { + LabelFetcher lf = new LabelFetcher(groupId, projectName, graphType); + lf.start(); + return lf; + } + + public JLabel getLabel() { + try { + join(); + } catch (InterruptedException ie) { + label = new JLabel("Load Failed"); + } + + return label; + } + + @Override + public void run() { + try { + label = new JLabel(new ImageIcon(new URL("http://sourceforge.net/project/stats/graph/index-graph.php?group_id="+groupId+"&ugn="+projectName+"&graph="+graphType+"&mode=week"))); + } catch (Exception e) { + label = new JLabel("Load Failed"); + } + } + } +} Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsPanel.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties (rev 0) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties 2009-02-24 02:23:10 UTC (rev 3) @@ -0,0 +1,10 @@ +mysfstats.title = MySFStats +sourceforge.title = SourceForge +menu.addproject = Add Project... +menu.removeproject = Remove Project +menu.refreshproject = Refresh Project +menu.quit = Quit +label.selectproject = Select SourceForge project +label.failedadd = Failed adding {0} tab +label.loading = Loading... +label.loadfailed = Load Failed Property changes on: trunk/mysfstats/src/com/mebigfatguy/mysfstats/resources.properties ___________________________________________________________________ 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-02-24 03:19:55
|
Revision: 14 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=14&view=rev Author: dbrosius Date: 2009-02-24 03:19:53 +0000 (Tue, 24 Feb 2009) Log Message: ----------- add google-analytics Modified Paths: -------------- trunk/mysfstats/htdocs/index.html Modified: trunk/mysfstats/htdocs/index.html =================================================================== --- trunk/mysfstats/htdocs/index.html 2009-02-24 03:04:40 UTC (rev 13) +++ trunk/mysfstats/htdocs/index.html 2009-02-24 03:19:53 UTC (rev 14) @@ -22,5 +22,14 @@ projects and see the project statistic graphs for all these projects in one dialog.</p> <img src="mysfstats.png"/> </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-7"); +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-02-24 03:04:43
|
Revision: 13 http://mysfstats.svn.sourceforge.net/mysfstats/?rev=13&view=rev Author: dbrosius Date: 2009-02-24 03:04:40 +0000 (Tue, 24 Feb 2009) Log Message: ----------- add pretty sf icon for menu Modified Paths: -------------- trunk/mysfstats/build.xml trunk/mysfstats/htdocs/index.html trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java Modified: trunk/mysfstats/build.xml =================================================================== --- trunk/mysfstats/build.xml 2009-02-24 03:04:11 UTC (rev 12) +++ trunk/mysfstats/build.xml 2009-02-24 03:04:40 UTC (rev 13) @@ -40,20 +40,16 @@ <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> <delete dir="${javadoc.dir}"/> + <delete dir="${jnlp.dir}"/> <delete> - <fileset dir="${jnlp.dir}"> - <include name="mysfstats*.jar"/> - <include name="*.jnlp"/> - </fileset> - </delete> - <delete> <fileset dir="${basedir}" includes="*.zip"/> </delete> </target> <target name="-init" description="prepares repository for a build"> <mkdir dir="${classes.dir}"/> - <mkdir dir="${javadoc.dir}"/> + <mkdir dir="${javadoc.dir}"/> + <mkdir dir="${jnlp.dir}"/> </target> <target name="compile" depends="-init" description="compiles java files"> Modified: trunk/mysfstats/htdocs/index.html =================================================================== --- trunk/mysfstats/htdocs/index.html 2009-02-24 03:04:11 UTC (rev 12) +++ trunk/mysfstats/htdocs/index.html 2009-02-24 03:04:40 UTC (rev 13) @@ -20,6 +20,7 @@ <p>This simple gui webstart tool allows the user to select a customized list of sourceforge projects and see the project statistic graphs for all these projects in one dialog.</p> + <img src="mysfstats.png"/> </div> </body> </html> Modified: trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java =================================================================== --- trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-02-24 03:04:11 UTC (rev 12) +++ trunk/mysfstats/src/com/mebigfatguy/mysfstats/MySFStatsFrame.java 2009-02-24 03:04:40 UTC (rev 13) @@ -20,6 +20,7 @@ package com.mebigfatguy.mysfstats; import java.awt.Container; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; @@ -83,6 +84,10 @@ Closer.close(bis); } pack(); + Dimension d = getSize(); + d.height += 50; + d.width += 50; + setSize(d); } else { setSize(500, 400); } @@ -90,7 +95,7 @@ private void initMenus() { JMenuBar mb = new JMenuBar(); - JMenu sfMenu = new JMenu(MySFStatsBundle.getString(MySFStatsBundle.SOURCEFORGE)); + JMenu sfMenu = new JMenu(new SFAction()); mb.add(sfMenu); addProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.ADDPROJECT)); removeProjectMenuItem = new JMenuItem(MySFStatsBundle.getString(MySFStatsBundle.REMOVEPROJECT)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |