question: public Object executeCommand ( final int ID , Object [ ] args ) { if ( args != null && args . length == 1 && args [ 0 ] == null ) { args = null ; } Object status = null ; currentGUI . setExecutingCommand ( true ) ; final Map jpedalActionHandlers = ( Map ) decode_pdf . getExternalHandler ( Options . JPedalActionHandlers ) ; if ( jpedalActionHandlers != null ) { final JPedalActionHandler jpedalAction = ( JPedalActionHandler ) jpedalActionHandlers . get ( ID ) ; if ( jpedalAction != null ) { jpedalAction . actionPerformed ( currentGUI , this ) ; return null ; } } if ( ! SharedViewer . isFX ( ) ) { status = executeSwingCommand ( ID , args , status ) ; } if ( ! currentGUI . isCommandInThread ( ) ) { currentGUI . setExecutingCommand ( false ) ; } return status ; }
target:  main routine which executes code for current command Values can also be passed in so it can be called from your own code some commands return a status Object otherwise null