public void commandAction(
final Command command,
final Displayable displayable
)
{
final List menu = this.menu;
final Command search = this.search;
final Command cancelSearch = this.cancelSearch;
if( command == search )
{
menu.removeCommand( search );
menu.addCommand( cancelSearch );
new DiscoveryThread( this ).start();
}
else if( command == cancelSearch )
{
synchronized( threadLock )
{
searching = false;
}
BTTool.cancelDiscovery();
menu.removeCommand( cancelSearch );
menu.addCommand( search );
}
else
{
final ControllerEvent event = AbstractController.buildEvent(
this,