if( !handleAction( command ) )
{
if( !handleCommand( command ) )
{
final List list = (List) displayable;
final ControllerEvent event = AbstractController.buildEvent(
this,
command,
list
);
if( event.getCode() == ControllerEvent.LIST_ITEM )
{
final int listSelectedIndex = list.getSelectedIndex();
if( listSelectedIndex < speedOptionsAction.size() )
{
event.setCode(
((Integer) speedOptionsAction.elementAt(
listSelectedIndex
)).intValue()
);
}
else
{
if( page == 0 )
{
if( listSelectedIndex < pageSize )
{
event.setIndex( listSelectedIndex );
}
else
{
event.setCode( PAGE_DOWN );
}
}
else
{
if( listSelectedIndex == speedOptionsAction.size() )
{
event.setCode( PAGE_UP );
}
else if( listSelectedIndex < (pageSize + speedOptionsAction.size() + 1) )
{
event.setIndex( listSelectedIndex );
}
else
{
event.setCode( PAGE_DOWN );
}
}
}
}
controller.handle( event );