Author: jerome
Date: 2008-08-15 14:15:52 +0200 (Fri, 15 Aug 2008)
New Revision: 1501
Modified:
software_suite_v2/software/tools/chatterTux/trunk/Chatter_tux/src/ChatterTux.java
Log:
* Added stop chatter tux button.
Modified:
software_suite_v2/software/tools/chatterTux/trunk/Chatter_tux/src/ChatterTux.java
===================================================================
---
software_suite_v2/software/tools/chatterTux/trunk/Chatter_tux/src/ChatterTux.java
2008-08-15 12:09:04 UTC (rev 1500)
+++
software_suite_v2/software/tools/chatterTux/trunk/Chatter_tux/src/ChatterTux.java
2008-08-15 12:15:52 UTC (rev 1501)
@@ -38,15 +38,12 @@
private JPanel jContentPane;
private JRadioButton configure;
private JRadioButton startServer;
+ private JRadioButton stopServer;
private ButtonGroup group;
private JLabel Message = new JLabel("Select Chatter Tux action");
private JButton ok;
private JButton cancel;
- private byte action = -1;
- private static final byte CONFIGURE = 0;
- private static final byte START = 1;
-
/**
* Class constructor.
*/
@@ -83,6 +80,7 @@
jContentPane.setLayout(null);
jContentPane.add(this.getConfigure());
jContentPane.add(this.getStartServer());
+ jContentPane.add(this.getStopServer());
this.Message.setSize(new Dimension(200, 20));
this.Message.setLocation(new Point(10, 4));
this.Message.setFont(new Font("verdana", Font.BOLD,
11));
@@ -92,6 +90,7 @@
this.group = new ButtonGroup();
this.group.add(this.configure);
this.group.add(this.startServer);
+ this.group.add(this.stopServer);
}
return jContentPane;
}
@@ -116,18 +115,30 @@
}
+ public JRadioButton getStopServer(){
+ if(this.stopServer == null){
+ this.stopServer = new JRadioButton("Stop Chatter");
+ this.stopServer.setSize(new Dimension(100, 25));
+ this.stopServer.setLocation(new Point(20, 80));
+ }
+ return this.stopServer;
+ }
+
public JButton getOkButton(){
if(this.ok == null){
this.ok = new JButton("Ok");
this.ok.setSize(new Dimension(80,24));
- this.ok.setLocation(new Point(24, 90));
+ this.ok.setLocation(new Point(24, 115));
this.ok.addMouseListener(new
java.awt.event.MouseAdapter(){
public void
mouseClicked(java.awt.event.MouseEvent event){
if(group.getSelection().equals(configure.getModel())){
- action = ChatterTux.CONFIGURE;
- }else{
- action = ChatterTux.START;
+ //Start configuration
+ }else
if(group.getSelection().equals(startServer.getModel())){
+ //Start chatter Tux
}
+ else{ //Stop chatter tux.
+
+ }
}
});
}
@@ -139,7 +150,7 @@
if(this.cancel == null){
this.cancel = new JButton("Cancel");
cancel.setSize(new Dimension(80, 24));
- cancel.setLocation(new Point(110, 90));
+ cancel.setLocation(new Point(110, 115));
cancel.addMouseListener(new
java.awt.event.MouseAdapter(){
public void
mouseClicked(java.awt.event.MouseEvent event){
System.exit(0);
-------------------------------------------------------------------------
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