Author: jerome
Date: 2008-08-18 13:14:31 +0200 (Mon, 18 Aug 2008)
New Revision: 1551

Modified:
   
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/About.java
Log:
* Added websites links to about panel.

Modified: 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/About.java
===================================================================
--- 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/About.java
     2008-08-18 10:53:03 UTC (rev 1550)
+++ 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/About.java
     2008-08-18 11:14:31 UTC (rev 1551)
@@ -33,6 +33,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
+import java.util.Vector;
 
 import javax.swing.BorderFactory;
 import javax.swing.ImageIcon;
@@ -48,6 +49,7 @@
 
 import com.tuxdroid.cc.CcInterface;
 import com.tuxdroid.cc.Listener.HandCursorChanger;
+import com.tuxdroid.cc.Utils.OnlineViewer;
 import com.tuxdroid.cc.Utils.languages.Languages;
 
 
@@ -123,6 +125,12 @@
                        JLabel contributor = new JLabel(lang.getContributors());
                        JLabel contributorsNames = new 
JLabel(lang.getContributorsNames());
                        
+                       //Websites
+                       Vector<JLabel> labels = new Vector<JLabel>();
+                       labels.add(new JLabel("http://www.kysoh.com";));
+                       labels.add(new JLabel("http://www.tuxisalive.com";));
+                       labels.add(new JLabel("      
http://www.livewithapenguin.com        "));
+                       
                        about = new JPanel();
                        about.setSize(getWidth() - 40, getHeight() -100);
                        about.setPreferredSize(about.getSize());
@@ -133,8 +141,29 @@
                        about.add(contributorsNames);
                        JLabel img = new JLabel();
                        img.setIcon(image);
+                       
+                       for(JLabel label : labels){
+                               label.setForeground(Color.blue);
+                               label.addMouseListener(new 
OpenLinkListener(label.getText()));
+                               label.addMouseMotionListener(new 
HandCursorChanger(label));
+                               about.add(label);
+                       }
                        about.add(img);
                }
                return this.about;
        }
+       
+       
+       private class OpenLinkListener extends java.awt.event.MouseAdapter{
+               
+               String url;
+               
+               public OpenLinkListener(String url){
+                       this.url = url;
+               }
+               
+               public void mousePressed(java.awt.event.MouseEvent event){
+                       new OnlineViewer(url).display();
+               }
+       }
 }


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to