<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>皿洗う人 - Saraarauhito.net</title>
	<atom:link href="http://www.saraarauhito.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.saraarauhito.net</link>
	<description>Saraarauhito - Der Tellerwäscher</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:24:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PowerMac G4 MDD wiederbelebt</title>
		<link>http://www.saraarauhito.net/2012/02/04/powermac-g4-mdd-wiederbelebt/</link>
		<comments>http://www.saraarauhito.net/2012/02/04/powermac-g4-mdd-wiederbelebt/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 22:40:57 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Digitale Welt]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=256</guid>
		<description><![CDATA[Zugegeben, diese Artikel ist wohl sehr nerdig &#8211; aber ich wollte mal erzählen, wie ich einen acht Jahre alten PowerMac G4 MDD, meinen damals ersten Mac und immer noch einer meiner Favoriten was Design angeht, wieder hergerichtet habe. Dieser Mac war mein Einstieg in die Mac-Welt und hat mir knapp dreieinhalb Jahre treue Dienste geleistet, [...]]]></description>
			<content:encoded><![CDATA[<p>Zugegeben, diese Artikel ist wohl sehr nerdig &#8211; aber ich wollte mal erzählen, wie ich einen acht Jahre alten PowerMac G4 MDD, meinen damals ersten Mac und immer noch einer meiner Favoriten was Design angeht, wieder hergerichtet habe.</p>
<p>Dieser Mac war mein Einstieg in die Mac-Welt und hat mir knapp dreieinhalb Jahre treue Dienste geleistet, bis ich auf einen der ersten Intel iMacs mit Core Duo Prozessor umstieg. Die Jahre zuvor hatte ich immer mal wieder auf eBay vorbei geschaut um erschrocken festzustellen, dass für solche alten Macs immer noch horrende Summen bezahlt werden, aber letztes Jahr fiel mir plötzlich bei den eBay Kleinanzeigen ein Gerät für 20€ in die Hände, angeblich defekt. Zwei Tage später stand der Mac bei mir. Von Außen machte das Gerät einen prima Eindruck, da es sehr pfleglich behandelt wurde. Innen jedoch sah die Sache ein klein wenig anders aus. Das Gerät wurde in den 7 Jahren in denen es genutzt wurde wohl kein einziges mal geöffnet und war nahezu randvoll mit Staub gefüllt. Nachdem mit dem Staubsauger das größte Unheil bereinigt war, wurde der Mac versuchsweise gestartet. Und siehe da, von wegen defekt! Der Startgong ertönte und der Mac beschwerte sich über ein fehlendes Bootmedium. Fluchs die alten Mac OS X 10.4 Tiger CDs ausgekramt und los ging es. Auch die Installation und der spätere Betrieb waren problemlos möglich. Leider waren die Ram- und HDD-Ausstattung des PowerMacs etwas mager. Lediglich 256 MB Hauptspeicher waren mir definitiv zu wenig und die Radeon 9000 Pro mit 64 MB Ram war zwar nett, aber da ging definitiv mehr.</p>
<p style="text-align: center;"><a href="http://www.saraarauhito.net/wp-content/uploads/2012/02/P1000559.jpg" rel="lightbox[256]" title="PowerMac G4 MDD"><img class="aligncenter size-medium wp-image-317" title="PowerMac G4 MDD" src="http://www.saraarauhito.net/wp-content/uploads/2012/02/P1000559-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Zuerst geht daher mein Dank an <a title="swift.consult GmbH" href="http://www.swiftconsult.de" target="_blank">swift.consult</a>, welche großzügig 2 GB DDR400 Ram von Kingston spendeten. Dies sind übrigens die einzigen Riegel mit einer große von jeweils 1 GB, die der Mac problemlos schluckt. Ansonsten muss man 4&#215;512 MB Riegel verwenden.</p>
<p>Bei der Grafikkarte gestaltete sich die Sache schon etwas schwieriger. In den &#8220;alten&#8221; Zeiten der PowerPC-Ära war es damals schon nicht ganz einfach, an eine gute Grafikkarte zu kommen. Das sieht heute leider nicht viel anders aus. Nach ein wenig Recherche stieß ich auf die GeForce 7800GS, die stärkste AGP-Karte die es für die PowerPC Macs jemals gab &#8211; inoffiziell. Inoffiziell deshalb, da es diese Karte nie von nVidia für Mac gab. Die Flasher-Szene hatte sich der Tatsache beholfen, dass die letzten PowerMac G5 bereits über PCI-Express Ports verfügten und mit einer GeForce 7900 Grafikkarte ausgerüstet werden konnten. Da nVidia den AGP-Port jedoch zu dieser Zeit noch nicht gänzlich totgesagt hatte, wurde der Chip auch auf AGP-Grafikkarten verwendet welche unter dem Label 7800GS vertrieben wurden. Daher war man in der Lage, mittels der Firmware der 7900 eine 7800GS auch für den AGP Port zu nutzen.</p>
<p>Das Problem an der Sache war jedoch, das Karten mit der GPU der GeForce 7900 nur kurze Zeit im Handel waren und schnell durch Varianten mit eigenen, abgesteckten Chips ersetzt wurden welche günstiger in der Produktion waren. Diese Karten sind bis heute nicht für den Mac verwendbar!</p>
<p>Nach ein wenig Suchen fand ich bei eBay tatsächlich eine passende GeForce 7800GS, natürlich kam das Angebot aus China. Zwar kam die Karte gut bei mir an &#8211; aber nun fing der Spaß erst richtig an. Bei dem Exemplar welches mir geschickt wurde, schien es sich um ein so genanntes Evaluation-Board zu handeln, welches nicht für den Verkauf bestimmt war. Und natürlich funktionierte die Karte mit dem im Internet erhältlichen Firmware nicht, sondern spuckte nur Pixelartefakte aus. Aber ich wäre nicht ich, wenn ich die Odyssee des Editieren des BIOS im Hex-Editor nicht eingegangen wäre.</p>
<p style="text-align: center;"><a href="http://www.saraarauhito.net/wp-content/uploads/2012/02/IMG_0300.jpg" rel="lightbox[256]" title="GeForce 7800GS"><img class="aligncenter size-medium wp-image-325" title="GeForce 7800GS" src="http://www.saraarauhito.net/wp-content/uploads/2012/02/IMG_0300-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Zwar unterschieden sich Mac und PC Firmware in den meisten Teilen wenn man diese in einem Hex-Editor betrachtet, aber es gibt einen kleinen Bereich der fast 1:1 übereinstimmt &#8211; die Speichertimings. Die Herausforderung liegt nur darin, diesen Bereich zu finden und von der PC zur Mac Variante zu portieren. Die Mac Variante hat zusätzlich noch die fiese Eigenschaft, alle paar Bytes einen sogenannten &#8220;Token&#8221; zu besitzen. Eine sich ständig wiederholende Reihenfolge der gleichen Bytes. D.h. die Werte aus dem PC Firmware müssen entsprechend aufgesplittet werden. Nach drei langen Abenden war es dann geschafft, nach dem vierten Flash-Versuch startet die Karte fehlerfrei in OS X. Hurra! <img src='http://www.saraarauhito.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Belastungstest in Form von Doom III und Quake 4 wurden natürlich sofort ausgeführt und verliefen äußerst zufriedenstellend. Im Nachhinein tauschte ich noch die Lüfter des Macs gegen leisere Exemplare und senkte die Spannung der CPUs mittels umsetzen einer Widerstandskodierung auf der CPU-Karte, für einen kühleren Betrieb. Und natürlich wurde das Gehäuse komplett zerlegt und von den letzten Staubresten befreit.</p>
<p style="text-align: center;"><a href="http://www.saraarauhito.net/wp-content/uploads/2012/02/P1000561.jpg" rel="lightbox[256]" title="Innenleben des PowerMac G4 MDDs"><img class="aligncenter size-medium wp-image-318" title="Innenleben des PowerMac G4 MDDs" src="http://www.saraarauhito.net/wp-content/uploads/2012/02/P1000561-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Nun habe ich hier einen bereits 8 Jahre alten PowerMac G4 MMD stehen, der gut ausschaut, annehmbar leise läuft und sogar noch etwas Power unter der Haube hat. Und natürlich kann man einen ganzen Haufen an Mac OS Versionen darauf betreiben <img src='http://www.saraarauhito.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.saraarauhito.net/wp-content/uploads/2012/02/Screen-Shot-2012-02-03-at-11.32.04-PM.png" rel="lightbox[256]" title="Verschiedene Mac OS Versionen"><img class="aligncenter size-medium wp-image-321" title="Verschiedene Mac OS Versionen" src="http://www.saraarauhito.net/wp-content/uploads/2012/02/Screen-Shot-2012-02-03-at-11.32.04-PM-300x201.png" alt="" width="300" height="201" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2012/02/04/powermac-g4-mdd-wiederbelebt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Custom configuration sections for .NET made easy</title>
		<link>http://www.saraarauhito.net/2012/02/02/custom-configuration-sections-for-net-made-easy/</link>
		<comments>http://www.saraarauhito.net/2012/02/02/custom-configuration-sections-for-net-made-easy/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 21:13:57 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=309</guid>
		<description><![CDATA[Currently I&#8217;m working on a bigger project, containing a quit complex web service, talking to a even more complex command line application. Today I realised, that the configuration of my web service was in the need of becoming a little bit more flexible than originally estimated. As I&#8217;ve already written a few custom configuration sections, [...]]]></description>
			<content:encoded><![CDATA[<p>Currently I&#8217;m working on a bigger project, containing a quit complex web service, talking to a even more complex command line application. Today I realised, that the configuration of my web service was in the need of becoming a little bit more flexible than originally estimated. As I&#8217;ve already written a few custom configuration sections, I was desperately trying to find an easier solution as the creation of configuration sections is an extremely time consuming but yet stupid task.</p>
<p>On my search through the web I found <a title="Configuration Section Designer" href="http://csd.codeplex.com/" target="_blank">this great Visual Studio 2010 plugin</a> which offers a visual designer for creating configuration sections. Despite saving time on writing code, this plugin also creates appropriate xsd schemas which enables Visual Studio to offer auto completion on changing the configuration file.</p>
<p style="text-align: center;"><a href="http://www.saraarauhito.net/wp-content/uploads/2012/02/csd.png" rel="lightbox[309]" title="Visual presentation of configuration sections"><img class="aligncenter size-medium wp-image-310" title="Visual presentation of configuration sections" src="http://www.saraarauhito.net/wp-content/uploads/2012/02/csd-300x93.png" alt="" width="300" height="93" /></a></p>
<p>After installing the plugin, add a new item to your project of the type <em>ConfigurationSectionDesigner</em> which will appear in the add item dialog. The rest is a piece of cake!</p>
<p>I have immediately fallen in love with this plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2012/02/02/custom-configuration-sections-for-net-made-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traue niemals einem Handyverkäufer</title>
		<link>http://www.saraarauhito.net/2011/11/29/traue-niemals-einem-handyverkaufer/</link>
		<comments>http://www.saraarauhito.net/2011/11/29/traue-niemals-einem-handyverkaufer/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 22:05:47 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Digitale Welt]]></category>
		<category><![CDATA[携帯/Handys]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=301</guid>
		<description><![CDATA[Es ist zwar nun schon etwas länger her seitdem ich mein iPhone 4 gekauft habe, da ich aber eine neue Tastatur habe und mich an den neuen Hub der Tasten gewöhnen möchte, schreibe ich jetzt mal einfach etwas, was ich eigentlich schon länger machen wollte. Vor 1 1/2 Monaten fasste ich den Endschluss, mein altes [...]]]></description>
			<content:encoded><![CDATA[<p>Es ist zwar nun schon etwas länger her seitdem ich mein iPhone 4 gekauft habe, da ich aber eine neue Tastatur habe und mich an den neuen Hub der Tasten gewöhnen möchte, schreibe ich jetzt mal einfach etwas, was ich eigentlich schon länger machen wollte.</p>
<p>Vor 1 1/2 Monaten fasste ich den Endschluss, mein altes iPhone 3GS in Rente zu schicken und auf das iPhone 4 umzusteigen. Da ich nach dem Vertragsende bei der Telekom glücklich zu o2 zurückgekehrt war, war mein erster Gedanke auch, das iPhone 4 dort zu kaufen. Der Beschluss wurde durch ein plötzlich defektes Display des 3GS bestärkt und deshalb konnte die Beschaffung nicht schnell genug gehen. Was lag also näher, als in den nächsten o2 Shop zu laufen und es dort zu kaufen? Die Vorteile lagen ja auf der Hand. Das Handy und eine neue Micro-Sim wären sofort vorhanden und könnten nach einer kurzen Aktivierungsdauer genutzt werden. Gesagt getan.</p>
<p>Im Shop schien dann auch alles ohne Probleme zu funktionieren. Der Verkäufer war gespielt nett, aber offensichtlich Ahnungslos was Hardware angeht und nebenbei noch ein Androidfan, da er mir die ganze Zeit versuchte zu erklären, wieso Android besser sei und sich fragte warum Leute den so viel mehr Geld nur für ein iPhone ausgeben würden (Hallo, ich kaufe gerade ein iPhone 4!). Beim Bezahlen wurde mir noch kurz erklärt, dass ich nun noch eine zweite Sim mit neuem o2o Vertrag bekommen würde, die ich an jemanden weitergeben könnte, um ihn mit meiner Flat anrufen zu können. Auf den Hinweis, dass ich diesen zweiten Vertrag nicht bräuchte, wurde ich vertröstet, dass dieser ja kostenlos sei und ich ihn jeder Zeit kündigen könnte, es sei ja nur eine nette Geste von o2.</p>
<p>Was ich in dem Moment viel interessanter fand, war der Kunde neben mir, der sich ebenfalls ein iPhone 4 kaufen wollte und gerade von einer der anwesenden Verkäuferinnen angefaucht wurde, warum er denn nicht auch gleich den Vertrag wechseln möchte. Nach weiterem hin und her stellte sich heraus, dass der andere Kunde noch einen älteren Genion S Vertrag mit dem Internetpaket M besaß. Bevor ich zur Telekom gewechselt war, nutzte ich fast zwei Jahre lang genau dieselbe Kombination um kam mit 15€ im Monat bestens über die Runden da ich fast nur mit dem Handy surfte. Der Kunde argumentierte mit den selben Hinweisen und fast schon wollte ich ihm zu seiner klugen Entscheidung bei seinen alten Konditionen zu bleiben gratulieren, als die Verkäuferin tatsächlich sagte (ich zitiere): &#8220;Ey alter, wie kann man so blöd sein, sich so ein geiles Handy kaufen und dann so einen scheiß Vertrag behalten? Denk doch mal nach man!&#8221;</p>
<p>Ich hoffe meine Augen wurden nicht all zu groß, als ich ungläubig in die Richtung der beiden starrte. Im Anschluss wollte ich dann doch nur schnell den Laden verlassen und mich über Gott und die Welt ärgern, das Verkäufer so dreist sind, keine Ahnung haben und überhaupt. Zwar war das iPhone 4 schon eine Stunde später einsatzbereit und erfüllte alle Erwartungen, doch die Rechnung kam erst einen Monat später. </p>
<p>Da erhielt ich nämlich eine Rechnung in höhe von 29,90€ von o2 für die Aktivierungsgebühr meines neuen o2o Vertrags. Toll, ne? Gott sei Dank, hat sich die Hotline von o2 bisher als stets kompetent erwiesen und es dauerte keine 2 Minuten, um auf die nächste Rechnung für meinen regulären Vertrag eine Gutschrift in Höhe von 29,90 € zu erwirken. Zusätzlich entschuldigte sich sogar noch die nette Dame am anderen Ende der Leitung und fragte sich ebenfalls, was die Leute in den Geschäften manchmal anstellen. o2 can eben nur manchmal do!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2011/11/29/traue-niemals-einem-handyverkaufer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Java: Checking which scrolling direction is enabled in Mac OS Lion</title>
		<link>http://www.saraarauhito.net/2011/08/16/java-checking-which-scrolling-direction-is-enabled-in-mac-os-lion/</link>
		<comments>http://www.saraarauhito.net/2011/08/16/java-checking-which-scrolling-direction-is-enabled-in-mac-os-lion/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 18:08:46 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Digitale Welt]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programmieren]]></category>
		<category><![CDATA[Lion]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Natural Scrolling]]></category>
		<category><![CDATA[Touchpad]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=276</guid>
		<description><![CDATA[With the introduce of Mac OS Lion Apple added the option to enable "natural scrolling" which simply inverts the scrolling direction of input devices to get an iOS like scrolling behavior. However, some Apps may require to 'invert the inverted scrolling', like Apps which use scrolling for zooming, which indeed should not be inverted. Unfortunately Apple dropped the development of Java and didn't added a method or property to get the scrolling behaviour.]]></description>
			<content:encoded><![CDATA[<p>With the introduce of Mac OS Lion Apple added the option to enable &#8220;natural scrolling&#8221; which simply inverts the scrolling direction of input devices to get an iOS like scrolling behavior. However, some Apps may require to &#8216;invert the inverted scrolling&#8217;, like Apps which use scrolling for zooming, which indeed should not be inverted. Unfortunately Apple dropped the development of Java and didn&#8217;t added a method or property to get the scrolling behaviour.</p>
<p>So today I tried to find a solution which helps to find out if natural scrolling is enabled or not in Java. I know that the preference would be saved in a .plist file so I checked with fseventer which one it was. After this the only thing I had to do was finding a library which allowed me to read .plist files and to check the scrolling property.</p>
<p>You will need <a href="http://code.google.com/p/plist/">this library</a> to run the snippet.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.saraarauhito.net/wp-content/plugins/wp-codebox/wp-codebox.php?p=276&amp;download=checklionscrolling.java">checklionscrolling.java</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2761"><td class="code" id="p276code1"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a> globalPref <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user.home&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;/Library/Preferences/.GlobalPreferences.plist&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    NSDictionary dict <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>NSDictionary<span style="color: #009900;">&#41;</span>PropertyListParser.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span>globalPref<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    NSNumber pref <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>NSNumber<span style="color: #009900;">&#41;</span>dict.<span style="color: #006633;">objectForKey</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;com.apple.swipescrolldirection&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>pref.<span style="color: #006633;">boolValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//natural scrolling is enabled</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> ex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Faild to parse plist: &quot;</span> <span style="color: #339933;">+</span> ex.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>
Hopefully this small snippet will be useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2011/08/16/java-checking-which-scrolling-direction-is-enabled-in-mac-os-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting ready</title>
		<link>http://www.saraarauhito.net/2011/02/06/getting-ready/</link>
		<comments>http://www.saraarauhito.net/2011/02/06/getting-ready/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 21:28:58 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Cocoa & Objective-C]]></category>
		<category><![CDATA[Digitale Welt]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=271</guid>
		<description><![CDATA[Few more tweaks and ready to go]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.saraarauhito.net/wp-content/uploads/2011/02/Screen-shot-2011-02-06-at-22.25.41.png" rel="lightbox[271]" title="Screen shot 2011-02-06 at 22.25.41"><img src="http://www.saraarauhito.net/wp-content/uploads/2011/02/Screen-shot-2011-02-06-at-22.25.41-300x213.png" alt="" title="Screen shot 2011-02-06 at 22.25.41" width="300" height="213" class="aligncenter size-medium wp-image-272" /></a></p>
<p>Few more tweaks and ready to go <img src='http://www.saraarauhito.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2011/02/06/getting-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa is sucking and ruling synchronously</title>
		<link>http://www.saraarauhito.net/2011/01/29/cocoa-is-sucking-and-ruling-synchronously/</link>
		<comments>http://www.saraarauhito.net/2011/01/29/cocoa-is-sucking-and-ruling-synchronously/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 23:09:19 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=261</guid>
		<description><![CDATA[Slowly I&#8217;m getting a feeling of how to create apps with the help of objective-c and cocoa. And it both sucks and rules at the same time! At first, the things I like. Bindings. They are impressing! Generating small apps without a single line of code, visualizing data with several UI components fast. Makes really [...]]]></description>
			<content:encoded><![CDATA[<p>Slowly I&#8217;m getting a feeling of how to create apps with the help of objective-c and cocoa. And it both sucks and rules at the same time!</p>
<p>At first, the things I like. Bindings. They are impressing! Generating small apps without a single line of code, visualizing data with several UI components fast. Makes really fun. Also objective-c as a programming language is cool combined with cocoa as the framework, even if objective-c feels a little bit outdated compared to something like C#.</p>
<p>Now what really sucks. Creating layouts with the interface builder. In took me nearly an hour, to complete a simple view like this:</p>
<p><img src="http://www.saraarauhito.net/wp-content/uploads/2011/01/Screen-shot-2011-01-28-at-23.50.24-300x219.png" alt="" title="simplesplitview" width="300" height="219" class="aligncenter size-medium wp-image-263" /></p>
<p>A basic window with a NSSPlitView and a NSOutlineView. At first, positioning the elements not to overlap was a pain in the ass. Second, my simple wish to fix the size of the left view seemed to be impossible within the interface builder. After a little bit of googling I&#8217;ve found following snippet.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.saraarauhito.net/wp-content/plugins/wp-codebox/wp-codebox.php?p=261&amp;download=nssplitviewdelegate.txt">nssplitviewdelegate.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2613"><td class="code" id="p261code3"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>splitView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSplitView_Class/"><span style="color: #400080;">NSSplitView</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>sender resizeSubviewsWithOldSize<span style="color: #002200;">:</span>
<span style="color: #002200;">&#40;</span>NSSize<span style="color: #002200;">&#41;</span>oldSize
<span style="color: #002200;">&#123;</span>
	CGFloat dividerThickness <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>sender dividerThickness<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">NSRect</span> leftRect  <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>sender subviews<span style="color: #002200;">&#93;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span> frame<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">NSRect</span> rightRect <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>sender subviews<span style="color: #002200;">&#93;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span> frame<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">NSRect</span> newFrame  <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>sender frame<span style="color: #002200;">&#93;</span>;
&nbsp;
	leftRect.size.height <span style="color: #002200;">=</span> newFrame.size.height;
	leftRect.origin <span style="color: #002200;">=</span> NSMakePoint<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span>;
	rightRect.size.width <span style="color: #002200;">=</span> newFrame.size.width <span style="color: #002200;">-</span> leftRect.size.width
	<span style="color: #002200;">-</span> dividerThickness;
	rightRect.size.height <span style="color: #002200;">=</span> newFrame.size.height;
	rightRect.origin.x <span style="color: #002200;">=</span> leftRect.size.width <span style="color: #002200;">+</span> dividerThickness;
&nbsp;
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>sender subviews<span style="color: #002200;">&#93;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span> setFrame<span style="color: #002200;">:</span>leftRect<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>sender subviews<span style="color: #002200;">&#93;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span> setFrame<span style="color: #002200;">:</span>rightRect<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

<p>As nearly every component can have a delegate defined which is triggered at certain actions, this one is triggered on resizing the split view. Simply, the old size of the left side is taken and kept, while the new size of the right side will be passed through. </p>
<p>Now going to fill this stuff with life!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2011/01/29/cocoa-is-sucking-and-ruling-synchronously/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GeForce FX6200 ROM for Cube without temp. sensor released</title>
		<link>http://www.saraarauhito.net/2011/01/01/geforce-fx6200-rom-for-cube-without-temp-sensor-released/</link>
		<comments>http://www.saraarauhito.net/2011/01/01/geforce-fx6200-rom-for-cube-without-temp-sensor-released/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 15:45:30 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Digitale Welt]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=258</guid>
		<description><![CDATA[Maybe a few people will be excited about this. I&#8217;ve created a GeForce FX6200 ROM (XFX PVT44AWANG GeForce 6200 256MB 64-bit DDR) for Cube owners, which has reduced clock rates and a disabled temperature sensor. For a long time now, only three different versions of the GeForce FX6200 ROM for the Mac have been available [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe a few people will be excited about this. I&#8217;ve created a GeForce FX6200 ROM (<em>XFX PVT44AWANG GeForce 6200 256MB 64-bit DDR</em>) for Cube owners, which has reduced clock rates and a disabled temperature sensor.</p>
<p>For a long time now, only three different versions of the GeForce FX6200 ROM for the Mac have been available on the internet. At first, an original rom with stock clock rates and enabled temperature sensor, one with the same clock rates and a disabled temperature sensor and at last one with lowered clock rates (heat issue) and an enabled temperature sensor for cube owners.</p>
<p>The disabled temperature sensor however is required for Leopard users, because with an enabled sensor Leopards needs about 4 minutes to boot, as the sensor first needs to become hot enough for being discovered by the OS X driver.</p>
<p>So I created my own ROM, which has both &#8211; lowered clock rates and a disabled temperature sensor for Cube owners. You will need a PC to flash the card, information is available on the <a href="http://themacelite.wikidot.com/nvidia-general-flashing">macelite wiki</a>.</p>
<p>You can download the rom <a href="http://www.saraarauhito.net/wp-content/uploads/2011/01/MLP256XFX2_NoSensor_Cube.rom_.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2011/01/01/geforce-fx6200-rom-for-cube-without-temp-sensor-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling touch events in Java on Mac OS X</title>
		<link>http://www.saraarauhito.net/2010/10/30/handling-touch-events-in-java-on-mac-os-x/</link>
		<comments>http://www.saraarauhito.net/2010/10/30/handling-touch-events-in-java-on-mac-os-x/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 10:58:34 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=243</guid>
		<description><![CDATA[Two days ago I discovered that Apple has implemented multi touch support with the Java update 2 for Snow Leopard and update 7 for Leopard into the Java API. Immediately I had to play with it and have written following little sample application. Further I&#8217;ve discovered that Apple also implemented support to detect horizontal scrolling, [...]]]></description>
			<content:encoded><![CDATA[<p>Two days ago I discovered that Apple has implemented multi touch support with the Java update 2 for Snow Leopard and update 7 for Leopard into the Java API. Immediately I had to play with it and have written following little sample application. Further I&#8217;ve discovered that Apple also implemented support to detect horizontal scrolling, by abusing the shift modifier on MouseWheelEvents. It is quit fun to use and I have the idea of an MultiTouch Tetris (&#8220;Touchris&#8221;) floating around in my head <img src='http://www.saraarauhito.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.saraarauhito.net/wp-content/plugins/wp-codebox/wp-codebox.php?p=243&amp;download=Gesturetest.java">Gesturetest.java</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2435"><td class="code" id="p243code5"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">net.saraarauhito.gesturetest</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.apple.eawt.event.GestureUtilities</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.apple.eawt.event.MagnificationEvent</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.apple.eawt.event.MagnificationListener</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.apple.eawt.event.RotationEvent</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.apple.eawt.event.RotationListener</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.Color</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.Graphics2D</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.Rectangle</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.event.MouseWheelEvent</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.event.MouseWheelListener</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.image.BufferedImage</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.File</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.imageio.ImageIO</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.swing.JFrame</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.swing.JPanel</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.swing.SwingUtilities</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #008000; font-style: italic; font-weight: bold;">/**
 *
 * @author Jan-Peter Zurek
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gesturetest <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajframe+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JFrame</span></a> f<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">double</span> rot <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Arectangle+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Rectangle</span></a> r <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Arectangle+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Rectangle</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">125</span>, <span style="color: #cc66cc;">125</span>, <span style="color: #cc66cc;">50</span>, <span style="color: #cc66cc;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedimage+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">BufferedImage</span></a> img<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Put your own image here</span>
        img <span style="color: #339933;">=</span> ImageIO.<span style="color: #006633;">read</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;your_image.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aswingutilities+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">SwingUtilities</span></a>.<span style="color: #006633;">invokeLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Arunnable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Runnable</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            f <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajframe+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JFrame</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            f.<span style="color: #006633;">setSize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajpanel+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JPanel</span></a> p <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajpanel+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JPanel</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">setSize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            f.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            f.<span style="color: #006633;">setLocationRelativeTo</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            f.<span style="color: #006633;">setVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            f.<span style="color: #006633;">createBufferStrategy</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            f.<span style="color: #006633;">addMouseWheelListener</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> MouseWheelListener<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                <span style="color: #666666; font-style: italic;">/* Apple added support for horizontal scrolling by
                 * using the shift modifier
                 */</span>
                <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> mouseWheelMoved<span style="color: #009900;">&#40;</span>MouseWheelEvent e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>e.<span style="color: #006633;">isShiftDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getWheelRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>                             
                            r.<span style="color: #006633;">y</span> <span style="color: #339933;">-=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
                         <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getWheelRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
                            r.<span style="color: #006633;">y</span> <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getWheelRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
                             r.<span style="color: #006633;">x</span> <span style="color: #339933;">-=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
                         <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getWheelRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
                            r.<span style="color: #006633;">x</span> <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
&nbsp;
                    draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            GestureUtilities.<span style="color: #006633;">addGestureListenerTo</span><span style="color: #009900;">&#40;</span>p, <span style="color: #000000; font-weight: bold;">new</span> MagnificationListener<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> magnify<span style="color: #009900;">&#40;</span>MagnificationEvent e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMagnification</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        r.<span style="color: #006633;">setBounds</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span>, <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span>,
                                <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">2</span>, <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMagnification</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                         r.<span style="color: #006633;">setBounds</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span>, <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span>,
                                 <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span>, <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>r.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                     <span style="color: #009900;">&#125;</span>
                     draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                 <span style="color: #009900;">&#125;</span>
             <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
             GestureUtilities.<span style="color: #006633;">addGestureListenerTo</span><span style="color: #009900;">&#40;</span>p, <span style="color: #000000; font-weight: bold;">new</span> RotationListener<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                     <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> rotate<span style="color: #009900;">&#40;</span>RotationEvent e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                         <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
                            rot <span style="color: #339933;">-=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
                        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
                            rot <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
&nbsp;
                        draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Agraphics2d+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Graphics2D</span></a> g <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Agraphics2d+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Graphics2D</span></a><span style="color: #009900;">&#41;</span> f.<span style="color: #006633;">getGraphics</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> mx <span style="color: #339933;">=</span> r.<span style="color: #006633;">x</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>r.<span style="color: #006633;">width</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> my <span style="color: #339933;">=</span> r.<span style="color: #006633;">y</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>r.<span style="color: #006633;">height</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        g.<span style="color: #006633;">clearRect</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span>
        g.<span style="color: #006633;">rotate</span><span style="color: #009900;">&#40;</span>rot <span style="color: #339933;">/</span> <span style="color: #cc66cc;">100</span>, mx, my<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        g.<span style="color: #006633;">setColor</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acolor+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Color</span></a>.<span style="color: #006633;">red</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        g.<span style="color: #006633;">drawImage</span><span style="color: #009900;">&#40;</span>img, r.<span style="color: #006633;">x</span>, r.<span style="color: #006633;">y</span>, r.<span style="color: #006633;">width</span>, r.<span style="color: #006633;">height</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        g.<span style="color: #006633;">rotate</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>rot <span style="color: #339933;">/</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span>, mx, my<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        g.<span style="color: #006633;">dispose</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Use rotation and zoom gesture to rotate and zoom the picture and move it with two fingers around the window.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2010/10/30/handling-touch-events-in-java-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jResizer for Mac released</title>
		<link>http://www.saraarauhito.net/2010/10/25/jresizer-released/</link>
		<comments>http://www.saraarauhito.net/2010/10/25/jresizer-released/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 20:32:12 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=233</guid>
		<description><![CDATA[Today I publish my first application for OS X, called jResizer. Recently I had to resize some images and stumbled upon the fact that the preview.app of OS X doesn&#8217;t offer any option to select the sampling mode for resizing an image like billinear or bicubic. Even the famous pixelmator doesn&#8217;t offer this option. As [...]]]></description>
			<content:encoded><![CDATA[<p>Today I publish my first application for OS X, called jResizer. Recently I had to resize some images and stumbled upon the fact that the preview.app of OS X doesn&#8217;t offer any option to select the sampling mode for resizing an image like billinear or bicubic. Even the famous pixelmator doesn&#8217;t offer this option.</p>
<p>As I&#8217;ve recently pushed my Java knowledge a little, I decided to write a small, fully OS X integrated, Java application over the weekend for easy resizing pictures and the possibility to select between the different sampling modes.</p>
<p><a href="http://www.saraarauhito.net/wp-content/uploads/2010/10/jResizer.png" rel="lightbox[233]" title="jResizer"><img class="aligncenter size-full wp-image-234" title="jResizer" src="http://www.saraarauhito.net/wp-content/uploads/2010/10/jResizer.png" alt="" width="299" height="264" /></a></p>
<p>You can use drag and drop to drop an image into the app or just press Command-O or the choose button to select an image. Change the resolution, press save, save as, command-s or shift-command-s and you will find your image saved as a .png file.</p>
<p>I&#8217;m not quit sure, but I believe that my App will require that you have the latest Java update from Apple installed.</p>
<p>For future releases I plan to ingrate several file formats for saving, unit selection (pixel/cm/inch) and batch resizing.</p>
<p>I want to thank Kenneth Orr from <a href="http://explodingpixels.wordpress.com/" target="_blank">Exploding Pixels</a> for his great work on MacWidgets, which I&#8217;ve slightly modified for my use.</p>
<p><a href="http://www.saraarauhito.net/wp-content/uploads/2010/10/jResizer.zip">jResizer Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2010/10/25/jresizer-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kabelloser Salat</title>
		<link>http://www.saraarauhito.net/2010/08/22/kabelloser-salat/</link>
		<comments>http://www.saraarauhito.net/2010/08/22/kabelloser-salat/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 17:05:11 +0000</pubDate>
		<dc:creator>yan.kun0567</dc:creator>
				<category><![CDATA[Digitale Welt]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://www.saraarauhito.net/?p=227</guid>
		<description><![CDATA[Nachdem ich eine ganze Zeit lang unter WIndows unterwegs war, wollte ich heute wieder einige Dinge unter Mac OS X ausprobieren. Jedoch satunte ich nicht schlecht, als meine Magic Mouse unter OS X nicht erkannt wurde. Zwar war laut der Statusbar Bluetooth aktiviert, in den Systemeinstellung wurde es jedoch als deaktiviert gemeldet. Auch waren plötzlich [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem ich eine ganze Zeit lang unter WIndows unterwegs war, wollte ich heute wieder einige Dinge unter Mac OS X ausprobieren.</p>
<p>Jedoch satunte ich nicht schlecht, als meine Magic Mouse unter OS X nicht erkannt wurde. Zwar war laut der Statusbar Bluetooth aktiviert, in den Systemeinstellung wurde es jedoch als deaktiviert gemeldet. Auch waren plötzlich alle Möglichkeiten, Bluetooth zu aktivieren nicht mehr zugänglich. Auch ein SMC- und PRAM-Reset zeigten keine Wirkung.</p>
<p>Nachdem kurzes Googlen keine verwertbaren Ergebnisse brachte, versuchte ich mein Glück mit dem kleinen Tool <a href="http://www.frederikseiffert.de/blueutil/">Blueutil</a> für die Kommandozeile. Dieses sagte mir ebenso, das Bluetooth deaktiviert sei. Nachdem ich den Befehl &#8220;On&#8221; verwendete, wurde mir Bluetooth als aktiviert angezeigt, funktionierte jedoch immer noch nicht.<br />
Nach einem Neustart konnte die Maus jedoch wieder gefunden werden und nun läuft alles wieder wie gehabt <img src='http://www.saraarauhito.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Glück gehabt!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saraarauhito.net/2010/08/22/kabelloser-salat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

