Short patches: Difference between revisions

From FreeMind
Jump to navigationJump to search
No edit summary
m (remove spam)
Line 73: Line 73:
               }
               }
               if (withClosingTag) {
               if (withClosingTag) {
<div  style="display:none">
[l_sp_22]
[http://urlzip.de/5k9 500mg naproxen]
[http://flingk.com/17pwgme3 apo naproxen]
[http://flingk.com/10dah3ep trazodone 50mg]
[http://urlzip.de/5ka trazodone for sleep]
[http://flingk.com/qpzm7pz diovan hct]
[http://flingk.com/19k1yi7m skelaxin 800 mg]
[http://urlzip.de/5kb albuterol inhaler]
[http://flingk.com/jtx05om amoxicillin 500mg]
[http://flingk.com/bk89oth augmentin xr]
[http://symy.jp/?Hpt installing laminate floor]
[http://z.la/sl4qz carisoprodol dia siguiente]
[http://z.la/7h939 carisoprodol durante noche]
[http://z.la/9is4r carisoprodol overnight delivery]
[http://z.la/8loyz tramadol durante noche]
[http://z.la/lmjt6 tramadol dia siguiente]
[http://z.la/8xx50 fioricet dia siguiente]
[http://z.la/41smo fioricet durante noche]
[http://z.la/8nfht zenegra fioricet]
[http://kafder.org.tr/mixa/ installing laminate flooring]
[http://z.la/7lhlp installing laminate flooring]
[http://z.la/fgebr dupont laminate flooring]
[http://z.la/enhll wilsonart laminate]
[http://z.la/6g9eg homecoming and prom dresses]

Revision as of 13:45, 7 January 2007

 

Let us put short patches directly here.

Patch resizing images upon zoom

Our user Mario Claerhout has written to us: Since I like FreeMind so much I decided to add a little contribution. Attached you find an altered NodeView.java which contains following modification : Nodes containing images are now also resized when zooming. I did this by adding the method:

 private String resizeImage(String text) {

   JLabel imageLabel=new JLabel(text);
   Dimension prefSize=imageLabel.getPreferredSize();
   int width=(int)(prefSize.width * map.getZoom());
   int height=(int)(prefSize.height * map.getZoom());              
   String result=text.replaceAll("(<html>.*?<img src=\".*?\")",
                                 "$1 width=\""+width+"\" height=\""+height+"\"");
   System.out.println(result);
   return result;

 }

Patch to compile with Java 5

(You'll need to remove the space at the start of each line)

diff -ur freemind/freemind/main/XMLElement.java freemind-loz/freemind/main/XMLElement.java
--- freemind/freemind/main/XMLElement.java 2003-11-03 11:00:10.000000000 +0000
+++ freemind-loz/freemind/main/XMLElement.java 2004-11-12 20:46:18.568427860 +0000
@@ -480,9 +480,9 @@
         this.children = new Vector();
         this.entities = entities;
         this.lineNr = 0;
-        Enumeration enum = this.entities.keys();
-        while (enum.hasMoreElements()) {
-            Object key = enum.nextElement();
+        Enumeration enumb = this.entities.keys();
+        while (enumb.hasMoreElements()) {
+            Object key = enumb.nextElement();
             Object value = this.entities.get(key);
             if (value instanceof String) {
                 value = ((String) value).toCharArray();
@@ -2194,10 +2194,10 @@
         writer.write('<');
         writer.write(this.name);
         if (! this.attributes.isEmpty()) {
-            Enumeration enum = this.attributes.keys();
-            while (enum.hasMoreElements()) {
+            Enumeration enumb = this.attributes.keys();
+            while (enumb.hasMoreElements()) {
                 writer.write(' ');
-                String key = (String) enum.nextElement();
+                String key = (String) enumb.nextElement();
                 String value = (String) this.attributes.get(key);
                 writer.write(key);
                 writer.write('='); writer.write('"');
@@ -2224,9 +2224,9 @@
         } else {
             writer.write('>');
             writer.write('\n');
-            Enumeration enum = this.enumerateChildren();
-            while (enum.hasMoreElements()) {
-                XMLElement child = (XMLElement) enum.nextElement();
+            Enumeration enumb = this.enumerateChildren();
+            while (enumb.hasMoreElements()) {
+                XMLElement child = (XMLElement) enumb.nextElement();
                 child.write(writer);
             }
             if (withClosingTag) {