Short patches: Difference between revisions

From FreeMind
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<table><tr>
[<a href="http://lures.freewebpage.org/">lures</a>]
<td valign=top>
[ lures http://lures.freewebpage.org/]
{{Navigation_bar}}
[<a href="http://softbait.freewebpage.org/">soft bait</a>]  
<td>&nbsp;
[soft bait http://softbait.freewebpage.org/]
<td width=600>
[<a href="http://fishingtackl.freewebpage.org/">fishing tackle</a>]  
 
[fishing tackle http://fishingtackl.freewebpage.org/]
Let us put short patches directly here.
[<a href="http://fishhook.freewebpage.org/">fish hook</a>]  
 
[fish hook http://fishhook.freewebpage.org/]
===Patch resizing images upon zoom===
[<a href="http://chugui.freewebpage.org">厨柜</a>]  
 
[厨柜 http://chugui.freewebpage.org ]
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 :
[<a href="http://ganzhaoji.freewebpage.org/ ">干燥机</a>]  
Nodes containing images are now also resized when zooming.
[干燥机 http://ganzhaoji.freewebpage.org/]
I did this by adding the method:
[<a href="http://gzsb.freewebpage.org/ ">干燥设备</a>]  
 
[干燥设备 http://gzsb.freewebpage.org/]
  private String resizeImage(String text) {
[<a href="http://diannaotai.freewebpage.org/ ">电脑台</a>]  
[电脑台 http://diannaotai.freewebpage.org/]
    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;
  }
 
</table>
 
===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) {
 
--------------
[http://dry0510.freewebpage.org 干燥设备]
[http://dry0511.freewebpage.org 干燥设备]
[http://dry0512.freewebpage.org 干燥设备]
[http://dry0513.freewebpage.org 蓄电池]
[http://dry0514.freewebpage.org 干燥设备]
[http://6he518.freewebpage.org 六合彩]
[http://dry0515.freewebpage.org 六合彩]
[http://dry0516.freewebpage.org 六合彩]
[http://dry0517.freewebpage.org 六合彩]
[http://dry0518.freewebpage.org 干燥设备]
[http://dry0519.freewebpage.org 干燥设备]
[http://dry0510.go.51.net 热风炉]
[http://dry0511.go.51.net 粉碎机]
[http://dry0512.go.51.net 制药机械]
[http://dry0513.go.51.net 化工机械]
[http://dry0514.go.51.net 混合机]
[http://dry0515.go.51.net 制粒机]
[http://dry0516.go.51.net 干燥设备]
[http://dry0517.go.51.net 制药机械]
[http://dry0518.go.51.net 化工机械]
[http://dry0519.go.51.net 减速机]
[http://ganzao0519.51.net 干燥设备]

Revision as of 16:09, 12 March 2005