Short patches: Difference between revisions
From FreeMind
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<table><tr> | |||
<td valign=top> | |||
{{Navigation_bar}} | |||
<td> | |||
<td width=600> | |||
Let us put short patches directly here. | Let us put short patches directly here. | ||
| Line 22: | Line 28: | ||
} | } | ||
</table> | |||
Revision as of 14:35, 25 September 2004
|
Let us put short patches directly here. Patch resizing images upon zoomOur 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;
}
|