"Java MobilePDA Program Design" Reading Note 5 - LCDAUI Advanced API Alert

xiaoxiao2021-03-06  14

AlertType is a tool class that cannot be instantiated. It provides several definition AlertyTPEs to assist the Alert class. Includes: ALARM Alert Confirmation Determines ERROR Error INFO Provide Information Warning Warning

Warning tones: Display display; AlertType.ALARM.playSound (display); AlertType.CONFIRMATION.playSound (display); AlertType.ERROR.playSound (display); AlertType.INFO.playSound (display); AlertType.WARNING.playSound (display) ;

Alert uses Display's setCurrent () Set it to the screen currently displayed on the screen, it will send a sound first, then display himself on the screen, after a while, automatically jump back the previous page.

If Alert is displayed as the first display on the screen, you must use setcommandListener () to set event processing, or an error message will occur.

Constructor: With a parameter - specify the title to bring four parameters - title, including text, image, type. Settype () / gertype () setstring () / getString () setImage () / getImage () is an operation function of the above parameters.

You can use the setTimeout () function, incoming alert.Forever as a parameter to prevent Alert from automatically jump back to the characteristics of the original place for a while. This is a manual handling by the user.

We can use AddCommand () to add a system menu item, if the Alert itself does not join any Command, its static member dismiss_command will use the unique system menu item. Once we join your own command, Dismiss_Command will not appear. RemoveCommand () After deleting Command in all Alert, Dismiss_Command will appear again to make sure there is at least one option on Alert available.

SetCommandListener () is used to register a Alert event. If there is any event, press it back to the previous page.

转载请注明原文地址:https://www.9cbs.com/read-47165.html

New Post(0)