Reformatting.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1111 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2003-05-03 00:10:27 +00:00
parent 1f6df2835f
commit 136fb4cd61
@@ -1,5 +1,5 @@
// //
// $Id: CommandButton.java,v 1.1 2003/01/29 22:20:14 ray Exp $ // $Id: CommandButton.java,v 1.2 2003/05/03 00:10:27 mdb Exp $
package com.samskivert.swing; package com.samskivert.swing;
@@ -64,27 +64,22 @@ public class CommandButton extends JButton
? arg = ((CommandEvent) proto).getArgument() ? arg = ((CommandEvent) proto).getArgument()
: null; : null;
// if we were passed an actionevent, or if it was a // if we were passed an action event, or if it was a command event
// command event with a null arg.. // with a null arg...
if (arg == null) { if (arg == null) {
// use ours // ...use ours
arg = getActionArgument(); arg = getActionArgument();
} }
if (arg == null) { if (arg == null) {
// just create a plain actionEvent // just create a plain ActionEvent
return new ActionEvent(CommandButton.this, return new ActionEvent(CommandButton.this,
ActionEvent.ACTION_PERFORMED, ActionEvent.ACTION_PERFORMED, actionCommand,
actionCommand, proto.getWhen(), proto.getModifiers());
proto.getWhen(),
proto.getModifiers());
} else { } else {
// if we found an arg somewhere, create a commandevent // if we found an arg somewhere, create a CommandEvent
return new CommandEvent(CommandButton.this, return new CommandEvent(CommandButton.this, actionCommand, arg,
actionCommand, proto.getWhen(), proto.getModifiers());
arg,
proto.getWhen(),
proto.getModifiers());
} }
} }