javauis/lcdui_qt/src/javax/microedition/lcdui/AlertType.java
changeset 23 98ccebc37403
parent 21 2a9601315dfc
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: 
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 package javax.microedition.lcdui;
    17 package javax.microedition.lcdui;
    18 
    18 
    19 /**
    19 /**
    20  * Implementation of LCDUI <code>AlertType</code> class.
    20  * Implementation of LCDUI <code>AlertType</code> class.
    21  */
    21  */
    22 public class AlertType extends Object {
    22 public class AlertType extends Object
       
    23 {
    23 
    24 
    24     /**
    25     /**
    25      * Alarm Alert type.
    26      * Alarm Alert type.
    26      */
    27      */
    27     public static final AlertType ALARM = new AlertType();
    28     public static final AlertType ALARM = new AlertType();
    47     public static final AlertType WARNING = new AlertType();
    48     public static final AlertType WARNING = new AlertType();
    48 
    49 
    49     /**
    50     /**
    50      * Protected constructor for subclasses.
    51      * Protected constructor for subclasses.
    51      */
    52      */
    52     protected AlertType() {
    53     protected AlertType()
       
    54     {
    53     }
    55     }
    54 
    56 
    55     /**
    57     /**
    56      * Play Alert sound for the user.
    58      * Play Alert sound for the user.
    57      *
    59      *
    58      * @param display on which the sound should be played
    60      * @param display on which the sound should be played
    59      * @return true is the sound was played, false otherwise.
    61      * @return true is the sound was played, false otherwise.
    60      */
    62      */
    61     public boolean playSound(Display display) {
    63     public boolean playSound(Display display)
    62         if (display == null) {
    64     {
       
    65         if(display == null)
       
    66         {
    63             throw new NullPointerException(
    67             throw new NullPointerException(
    64                     MsgRepository.ALERTTYPE_EXCEPTION_PLAYSOUND_NULL_POINTER);
    68                 MsgRepository.ALERTTYPE_EXCEPTION_PLAYSOUND_NULL_POINTER);
    65         }
    69         }
    66         // TODO: eSWT support required
    70         // TODO: eSWT support required
    67         return false;
    71         return false;
    68     }
    72     }
    69 
    73