Called by a system to indicated that a command has been invoked on a particular displayable. @param command the Command that was invoked @param displayable the Displayable where the command was invoked
(Command command, Displayable displayable)
| 306 | * @param displayable the Displayable where the command was invoked |
| 307 | */ |
| 308 | public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction |
| 309 | // write pre-action user code here |
| 310 | if (displayable == acceptLicense) {//GEN-BEGIN:|7-commandAction|1|709-preAction |
| 311 | if (command == NO_COMMAND) {//GEN-END:|7-commandAction|1|709-preAction |
| 312 | // write pre-action user code here |
| 313 | exitMIDlet();//GEN-LINE:|7-commandAction|2|709-postAction |
| 314 | // write post-action user code here |
| 315 | } else if (command == YES_COMMAND) {//GEN-LINE:|7-commandAction|3|715-preAction |
| 316 | // write pre-action user code here |
| 317 | /* |
| 318 | * Won't be needed anymore. |
| 319 | */ |
| 320 | acceptLicense = null; |
| 321 | lastBookAvailable();//GEN-LINE:|7-commandAction|4|715-postAction |
| 322 | // write post-action user code here |
| 323 | }//GEN-BEGIN:|7-commandAction|5|119-preAction |
| 324 | } else if (displayable == bookBrowser) { |
| 325 | if (command == CANCEL_COMMAND) {//GEN-END:|7-commandAction|5|119-preAction |
| 326 | // write pre-action user code here |
| 327 | displayBookCanvas();//GEN-LINE:|7-commandAction|6|119-postAction |
| 328 | // write post-action user code here |
| 329 | } else if (command == FileBrowser.SELECT_FILE_COMMAND) {//GEN-LINE:|7-commandAction|7|34-preAction |
| 330 | // write pre-action user code here |
| 331 | bookURL = getBookBrowser().getSelectedFileURL(); |
| 332 | switchDisplayable(null, getLoadBook());//GEN-LINE:|7-commandAction|8|34-postAction |
| 333 | // write post-action user code here |
| 334 | }//GEN-BEGIN:|7-commandAction|9|103-preAction |
| 335 | } else if (displayable == bookError) { |
| 336 | if (command == DISMISS_COMMAND) {//GEN-END:|7-commandAction|9|103-preAction |
| 337 | // write pre-action user code here |
| 338 | switchDisplayable(null, getBookBrowser());//GEN-LINE:|7-commandAction|10|103-postAction |
| 339 | // write post-action user code here |
| 340 | }//GEN-BEGIN:|7-commandAction|11|730-preAction |
| 341 | } else if (displayable == bookInfo) { |
| 342 | if (command == DISMISS_COMMAND) {//GEN-END:|7-commandAction|11|730-preAction |
| 343 | // write pre-action user code here |
| 344 | unloadInfo();//GEN-LINE:|7-commandAction|12|730-postAction |
| 345 | // write post-action user code here |
| 346 | }//GEN-BEGIN:|7-commandAction|13|962-preAction |
| 347 | } else if (displayable == bookmarkText) { |
| 348 | if (command == BACK_COMMAND) {//GEN-END:|7-commandAction|13|962-preAction |
| 349 | // write pre-action user code here |
| 350 | returnToBookmarks();//GEN-LINE:|7-commandAction|14|962-postAction |
| 351 | // write post-action user code here |
| 352 | } else if (command == NEXT_COMMAND) {//GEN-LINE:|7-commandAction|15|963-preAction |
| 353 | // write pre-action user code here |
| 354 | processBookmark();//GEN-LINE:|7-commandAction|16|963-postAction |
| 355 | // write post-action user code here |
| 356 | }//GEN-BEGIN:|7-commandAction|17|918-preAction |
| 357 | } else if (displayable == bookmarks) { |
| 358 | if (command == ADD_COMMAND) {//GEN-END:|7-commandAction|17|918-preAction |
| 359 | // write pre-action user code here |
| 360 | bookmarkAdding = true; |
| 361 | setTextBoxString(getBookmarkText(), bookmarkString); |
| 362 | switchDisplayable(null, getBookmarkText());//GEN-LINE:|7-commandAction|18|918-postAction |
| 363 | // write post-action user code here |
| 364 | } else if (command == BACK_COMMAND) {//GEN-LINE:|7-commandAction|19|915-preAction |
| 365 | // write pre-action user code here |
nothing calls this directly
no test coverage detected