tn5250j/src/org/tn5250j/tools Macronizer.java,1.8,1.9

[email protected]
Newsgroups gmane.comp.java.tn5250j.cvs
Message-ID <[email protected]>
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv21924

Modified Files:
	Macronizer.java 
Log Message:
Add macro remove method

Index: Macronizer.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/tools/Macronizer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Macronizer.java	9 Jul 2003 18:55:39 -0000	1.8
--- Macronizer.java	30 Nov 2003 11:01:10 -0000	1.9
***************
*** 123,126 ****
--- 123,141 ----
     }
  
+    public final static void removeMacroByName(String name) {
+ 
+       Set macroSet = macros.keySet();
+       Iterator macroIterator = macroSet.iterator();
+       String byName = null;
+       while (macroIterator.hasNext()) {
+          byName = (String)macroIterator.next();
+          if (byName.endsWith(name)) {
+             macros.remove(byName);
+             saveMacros();
+             return;
+          }
+       }
+    }
+ 
     public final static void setMacro(String name, String keyStrokes) {
  
***************
*** 222,223 ****
--- 237,239 ----
  
  }
+ 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.