[Pixelle-commit] SF.net SVN: pixelle: [159] trunk/pixelle/src/com/mebigfatguy/pixelle/ AlgorithmArc
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-07-12 17:28:15
|
Revision: 159
http://pixelle.svn.sourceforge.net/pixelle/?rev=159&view=rev
Author: dbrosius
Date: 2008-07-12 10:28:23 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
add saved algos to the menu
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/AlgorithmArchiver.java
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/AlgorithmArchiver.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/AlgorithmArchiver.java 2008-07-12 17:20:33 UTC (rev 158)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/AlgorithmArchiver.java 2008-07-12 17:28:23 UTC (rev 159)
@@ -116,8 +116,15 @@
public String[] getUserGroups() {
return userAlgorithms.keySet().toArray(new String[userAlgorithms.size()]);
}
- public void addAlgorithm(String group, String name, Map<PixelleComponent, String> algorithm) {
+
+ public void addAlgorithm(String groupName, String algorithmName, Map<PixelleComponent, String> algorithm) {
+ Map<String, Map<PixelleComponent, String>> group = userAlgorithms.get(groupName);
+ if (group == null) {
+ group = new HashMap<String, Map<PixelleComponent, String>>();
+ userAlgorithms.put(groupName, group);
+ }
+ group.put(algorithmName, new HashMap<PixelleComponent, String>(algorithm));
}
public void removeAlgorithm(String group, String name) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|