Short patches: Difference between revisions

From FreeMind
Jump to navigationJump to search
No edit summary
(-navigation bar: moved to MediaWiki:Sidebar)
 
(27 intermediate revisions by 20 users not shown)
Line 1: Line 1:
<table><tr>
<table><tr>
<td valign=top>
{{Navigation_bar}}
<td>&nbsp;
<td width=600>
<td width=600>


Line 31: Line 28:
(You'll need to remove the space at the start of each line)
(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
  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/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
  +++ freemind-loz/freemind/main/XMLElement.java 2004-11-12 20:46:18.568427860 +0000
  @@ -480,9 +480,9 @@
  @@ -480,9 +480,9 @@
           this.children = new Vector();
           this.children = new Vector();
Line 74: Line 71:
               if (withClosingTag) {
               if (withClosingTag) {


------------*[<a href="http://xdc.freewebpage.org/ ">蓄电池</a>]
[[Category:Development]]
[蓄电池 http://xdc.freewebpage.org/]
[<a href="http://fishingtackl.freewebpage.org/ ">fishing tackle</a>]
[fishing tackle http://fishingtackl.freewebpage.org/]
[<a href="http://fishhook.freewebpage.org/ ">fish hook</a>]
[fish hook http://fishhook.freewebpage.org/]
[<a href="http://ganfazhiliji.freewebpage.org/ ">干法制粒机</a>]
[干法制粒机 http://ganfazhiliji.freewebpage.org/]
[<a href="http://ganzhaoji.freewebpage.org/ ">干燥机</a>]
[干燥机 http://ganzhaoji.freewebpage.org/]
[<a href="http://gzsb.freewebpage.org/ ">干燥设备</a>]
[干燥设备 http://gzsb.freewebpage.org/]
[<a href="http://lures.freewebpage.org/ ">lures</a>]
[ lures http://lures.freewebpage.org/]
[<a href="http://softbait.freewebpage.org/ ">soft bait</a>]
[soft bait http://softbait.freewebpage.org/]
[<a href="http://tuliao1.freewebpage.org/ ">涂料</a>]
[涂料 http://tuliao1.freewebpage.org/]
[<a href="http://zhiliji.freewebpage.org/ ">制粒机</a>]
[制粒机 http://zhiliji.freewebpage.org/]
[<a href="http://gfzlj.freewebpage.org/ ">干法造粒机</a>]
[http://gfzlj.freewebpage.org/ 干法造粒机]
[<a href="http://www.czhot/xdc ">蓄电池</a>]
[蓄电池 http://www.czhot.com/xdc]
[<a href="http://www.czhot/dengju ">灯具</a>]
[灯具 http://www.czhot.com/dengju]
[<a href="http://www.czhot/ganfazholiji ">干法制粒机</a>]
[干法制粒机 http://www.czhot.com/ganfazholiji]
[<a href="http://www.czhot/gfzlj ">干法造粒机</a>]
[干法造粒机 http://www.czhot.com/gfzlj]
[<a href="http://www.czhot/gzj ">干燥机</a>]
[干燥机 http://www.czhot.com/gzj]
[<a href="http://www.czhot/gzsb ">干燥设备</a>]
[干燥设备 http://www.czhot.com/gzsb]
[<a href="http://www.czhot/zhiliji ">制粒机</a>]
[制粒机 http://www.czhot.com/zhiliji]
[<a href="http://www.czhot/zlj ">造粒机</a>]
[造粒机 http://www.czhot.com/zlj ]
[<a href="http://chugui.freewebpage.org ">厨柜</a>]
[厨柜 http://chugui.freewebpage.org ]
[<a href="http://zuqiou.freewebpage.org ">足球</a>]
[足球 http://zuqiou.freewebpage.org ]
[<a href="http://www.light518.com ">[灯具]</a>]
[http://www.light518.com 灯具]
[<a href="http://hgjx.freewebpage.org ">化工机械</a>]
[化工机械 http://hgjx.freewebpage.org ]
[<a href="http://tljx.freewebpage.org ">涂料机械</a>]
[涂料机械 http://tljx.freewebpage.org ]
[<a href="http://ymjx.freewebpage.org ">油墨机械</a>]
[油墨机械 http://ymjx.freewebpage.org ]

Latest revision as of 11:30, 25 February 2011

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) {