javauis/lcdui_qt/src/javax/microedition/lcdui/MsgRepository.java
branchRCL_3
changeset 65 ae942d28ec0e
equal deleted inserted replaced
60:6c158198356e 65:ae942d28ec0e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 package javax.microedition.lcdui;
       
    18 
       
    19 import org.eclipse.swt.SWT;
       
    20 /**
       
    21  * Repository for text messages used in OpenLCDUI. String constants in this
       
    22  * class should begin with prefix "CLASSNAME_" where CLASSNAME is the name of
       
    23  * the class which is using the constant.
       
    24  */
       
    25 final class MsgRepository
       
    26 {
       
    27 
       
    28     // Command labels:
       
    29     public static final String COMMAND_LABEL_SCREEN =
       
    30         OpenLcduiLocalization.getMessage("key_select");
       
    31 
       
    32     public static final String COMMAND_LABEL_BACK =
       
    33         OpenLcduiLocalization.getMessage("back");
       
    34 
       
    35     public static final String COMMAND_LABEL_CANCEL =
       
    36         SWT.getMessage("cancel");
       
    37 
       
    38     public static final String COMMAND_LABEL_OK =
       
    39         SWT.getMessage("ok");
       
    40 
       
    41     public static final String COMMAND_LABEL_HELP =
       
    42         OpenLcduiLocalization.getMessage("help");
       
    43 
       
    44     public static final String COMMAND_LABEL_STOP =
       
    45         OpenLcduiLocalization.getMessage("key_stop");
       
    46 
       
    47     public static final String COMMAND_LABEL_EXIT =
       
    48         OpenLcduiLocalization.getMessage("close");
       
    49 
       
    50     public static final String COMMAND_LABEL_ITEM =
       
    51         OpenLcduiLocalization.getMessage("key_select");
       
    52 
       
    53     // Alert texts:
       
    54     public static final String ALERT_DEFAULT_TEXT_ERROR =
       
    55         OpenLcduiLocalization.getMessage("alert_error");
       
    56 
       
    57     public static final String ALERT_DEFAULT_TEXT_WARNING =
       
    58         OpenLcduiLocalization.getMessage("alert_warning");
       
    59 
       
    60     public static final String ALERT_DEFAULT_TEXT_INFO =
       
    61         OpenLcduiLocalization.getMessage("alert_info");
       
    62 
       
    63     public static final String ALERT_DEFAULT_TEXT_CONFIRMATION =
       
    64         OpenLcduiLocalization.getMessage("alert_conf");
       
    65 
       
    66     public static final String ALERT_DEFAULT_TEXT_ALARM =
       
    67         OpenLcduiLocalization.getMessage("alert_alarm");
       
    68 
       
    69     public static final String ALERT_DEFAULT_TEXT_ALERT =
       
    70         OpenLcduiLocalization.getMessage("alert_null");
       
    71 
       
    72 
       
    73     // Exceptions below - dont need translation !!!
       
    74 
       
    75 
       
    76     public static final String COMMAND_EXCEPTION_LABEL_IS_NULL =
       
    77         "Short label cannot be null";
       
    78 
       
    79     public static final String COMMAND_EXCEPTION_INVALID_TYPE =
       
    80         "Invalid command type";
       
    81 
       
    82 
       
    83     // Display:
       
    84     public static final String DISPLAY_EXCEPTION_MIDLET_IS_NULL =
       
    85         "Midlet cannot be null";
       
    86 
       
    87     public static final String DISPLAY_EXCEPTION_NEGATIVE_DURATION =
       
    88         "Duration cannot be negative.";
       
    89 
       
    90     public static final String DISPLAY_EXCEPTION_INVALID_COLOR_IDENTIFIER =
       
    91         "Color identifier is incorrect";
       
    92 
       
    93     public static final String DISPLAY_EXCEPTION_ALERT_IS_NULL =
       
    94         "Alert cannot be null";
       
    95 
       
    96     public static final String DISPLAY_EXCEPTION_NEXTDISP_IS_NULL =
       
    97         "Next displayable cannot be null";
       
    98 
       
    99     public static final String DISPLAY_EXCEPTION_NEXTDISP_IS_ALERT =
       
   100         "Next displayable cannot be an Alert";
       
   101 
       
   102     public static final String DISPLAY_EXCEPTION_ITEM_IS_NULL =
       
   103         "Item cannot be null.";
       
   104 
       
   105     public static final String DISPLAY_EXCEPTION_ITEM_HAS_NO_PARENT =
       
   106         "Item is not owned by a container.";
       
   107 
       
   108 
       
   109     // Displayable:
       
   110     public static final String DISPLAYABLE_EXCEPTION_NULL_PARAMETER =
       
   111         "Parameter was null";
       
   112 
       
   113 
       
   114     // Alert:
       
   115     public static final String ALERT_EXCEPTION_INVALID_TIMEOUT =
       
   116         "Invalid timeout value";
       
   117 
       
   118     public static final String ALERT_EXCEPTION_INVALID_INDICATOR =
       
   119         "Indicator violates restrictions";
       
   120 
       
   121 
       
   122 
       
   123     // AlertType:
       
   124     public static final String ALERTTYPE_EXCEPTION_PLAYSOUND_NULL_POINTER =
       
   125         "Parameter display cannot be null";
       
   126 
       
   127 
       
   128     // Textbox & TextField:
       
   129     public static final String TEXT_EXCEPTION_WRONG_TEXT =
       
   130         "Input txt doesn't meet constraints";
       
   131 
       
   132     public static final String TEXT_EXCEPTION_MAX_SIZE_EXCEEDED =
       
   133         "Text length exceeds maximum size";
       
   134 
       
   135     public static final String TEXT_EXCEPTION_INVALID_MAX_SIZE =
       
   136         "Maximum size is 0 or negative";
       
   137 
       
   138     public static final String TEXT_EXCEPTION_INVALID_CONSTRAINTS =
       
   139         "Invalid constraints";
       
   140 
       
   141     public static final String TEXT_EXCEPTION_TXT_IS_NULL =
       
   142         "Text must not be null";
       
   143 
       
   144     public static final String TEXT_EXCEPTION_ARRAY_IS_NULL =
       
   145         "Character data must not be null";
       
   146 
       
   147     public static final String TEXT_EXCEPTION_ARRAY_IS_TOO_SHORT =
       
   148         "Character data length is too short";
       
   149 
       
   150     public static final String TEXT_EXCEPTION_ARRAY_INDEX_OUT_OF_BOUNDS =
       
   151         "Offset and length do not specify a valid range";
       
   152 
       
   153     public static final String TEXT_EXCEPTION_INVALID_SIZE =
       
   154         "Invalid size";
       
   155 
       
   156 
       
   157     // Item:
       
   158     public static final String ITEM_EXCEPTION_INVALID_LAYOUT =
       
   159         "New layout value was not combination of layout directives";
       
   160 
       
   161     public static final String ITEM_EXCEPTION_NULL_COMMAND_ADDED =
       
   162         "Unable to add null-command to item";
       
   163 
       
   164     public static final String ITEM_EXCEPTION_INVALID_DIMENSION =
       
   165         "Width and height cannot be less than -1";
       
   166 
       
   167     public static final String ITEM_EXCEPTION_NOT_OWNED_BY_FORM =
       
   168         "Item is not owned by a form";
       
   169 
       
   170     public static final String ITEM_EXCEPTION_OWNED_BY_ALERT =
       
   171         "Not allowed when item is owned by an Alert";
       
   172 
       
   173 
       
   174     // StringItem:
       
   175     public static final String STRINGITEM_EXCEPTION_INVALID_APPMODE =
       
   176         "Invalid appearance mode";
       
   177 
       
   178 
       
   179     // ImageItem:
       
   180     public static final String IMAGEITEM_EXCEPTION_INVALID_APPMODE =
       
   181         "Invalid apperance mode";
       
   182 
       
   183 
       
   184     // Gauge:
       
   185     public static final String GAUGE_EXCEPTION_INVALID_VALUE =
       
   186         "Invalid value";
       
   187 
       
   188     public static final String GAUGE_EXCEPTION_INVALID_MAXVALUE =
       
   189         "Invalid maximum value";
       
   190 
       
   191 
       
   192     // List & ChoiceGroup
       
   193     public static final String LIST_EXCEPTION_INVALID_TYPE =
       
   194         "List type is invalid";
       
   195 
       
   196     public static final String CHOICEGROUP_EXCEPTION_INVALID_TYPE =
       
   197         "ChoiceGroup type is invalid";
       
   198 
       
   199     public static final String CHOICE_EXCEPTION_INVALID_FIT_POLICY =
       
   200         "Invalid fit policy";
       
   201 
       
   202     public static final String CHOICE_EXCEPTION_INVALID_ARRAY_LENGTHS =
       
   203         "Array lengths mismatch";
       
   204 
       
   205     public static final String CHOICE_EXCEPTION_INVALID_ITEM_INDEX =
       
   206         "Index of item is invalid";
       
   207 
       
   208     public static final String CHOICE_EXCEPTION_ITEM_NULL =
       
   209         "Null element with index";
       
   210 
       
   211     public static final String CHOICE_EXCEPTION_STRING_NULL =
       
   212         "Parameter text cannot be null";
       
   213 
       
   214     public static final String CHOICE_EXCEPTION_ARRAY_NULL =
       
   215         "Parameter array cannot be null";
       
   216 
       
   217     public static final String CHOICE_EXCEPTION_TEXT_ARRAY_NULL =
       
   218         "Parameter text array cannot be null";
       
   219 
       
   220     public static final String CHOICE_EXCEPTION_INVALID_ARRAY_SIZE =
       
   221         "Parameter array size must match choice size";
       
   222 
       
   223 
       
   224     // Spacer:
       
   225     public static final String SPACER_EXCEPTION_INVALID_STATE_LABEL =
       
   226         "Spacer cannot have a label";
       
   227 
       
   228     public static final String SPACER_EXCEPTION_INVALID_STATE_COMMAND =
       
   229         "Spacer cannot have a command";
       
   230 
       
   231     public static final String SPACER_EXCEPTION_INVALID_WIDTH_HEIGHT =
       
   232         "Width and height cannot be negative";
       
   233 
       
   234 
       
   235     // DateField:
       
   236     public static final String DATEFIELD_EXCEPTION_INVALID_MODE =
       
   237         "Invalid mode.";
       
   238 
       
   239 
       
   240     // Form:
       
   241     public static final String FORM_EXCEPTION_STRING_NULL_POINTER =
       
   242         "Parameter text cannot be null";
       
   243 
       
   244     public static final String FORM_EXCEPTION_IMAGE_NULL_POINTER =
       
   245         "Parameter img cannot be null";
       
   246 
       
   247     public static final String FORM_EXCEPTION_ITEM_NULL_POINTER =
       
   248         "Parameter item cannot be null";
       
   249 
       
   250     public static final String FORM_EXCEPTION_ITEM_OWNED_BY_CONTAINER =
       
   251         "Item is alread owned by container";
       
   252 
       
   253     public static final String FORM_EXCEPTION_INVALID_ITEM_INDEX =
       
   254         "Index of item is incorrect";
       
   255 
       
   256 
       
   257     // Font
       
   258     public static final String FONT_EXCEPTION_INVALID_SPECIFIER =
       
   259         "Invalid specifier parameter";
       
   260 
       
   261     public static final String FONT_EXCEPTION_INVALID_FACE =
       
   262         "Invalid face parameter";
       
   263 
       
   264     public static final String FONT_EXCEPTION_INVALID_STYLE =
       
   265         "Invalid style parameter";
       
   266 
       
   267     public static final String FONT_EXCEPTION_INVALID_SIZE =
       
   268         "Invalid size parameter";
       
   269 
       
   270     public static final String FONT_EXCEPTION_NULL_STRING =
       
   271         "String parameter is null";
       
   272 
       
   273 
       
   274     // Canvas
       
   275     public static final String CANVAS_EXCEPTION_INVALID_KEY_CODE =
       
   276         "Key code is invalid";
       
   277 
       
   278     public static final String CANVAS_EXCEPTION_INVALID_GAME_ACTION =
       
   279         "Game action is invalid";
       
   280 
       
   281     public static final String CANVAS_EXCEPTION_FRAMEBUFFER_NULL =
       
   282         "Framebuffer is null";
       
   283 
       
   284 
       
   285     // Graphics:
       
   286     public static final String GRAPHICS_EXCEPTION_ILLEGAL_STROKE_STYLE =
       
   287         "Stroke style is invalid";
       
   288 
       
   289     public static final String GRAPHICS_EXCEPTION_INVALID_ANCHOR =
       
   290         "Invalid anchor value";
       
   291 
       
   292     public static final String GRAPHICS_EXCEPTION_STRING_IS_NULL =
       
   293         "String is null";
       
   294 
       
   295     public static final String GRAPHICS_EXCEPTION_ARRAY_OUT_OF_BOUNDS =
       
   296         "Array bounds invalid";
       
   297 
       
   298     public static final String GRAPHICS_EXCEPTION_ARRAY_IS_NULL =
       
   299         "Char array is null";
       
   300 
       
   301     public static final String GRAPHICS_EXCEPTION_SAME_SOURCE_AND_DESTINATION =
       
   302         "Source and destination can not be the same";
       
   303 
       
   304     public static final String GRAPHICS_EXCEPTION_DESTINATION_IS_SCREEN =
       
   305         "Destination can not be screen device.";
       
   306 
       
   307 
       
   308     // DirectGraphics:
       
   309     public static final String DIRECTGRAPHICS_EXCEPTION_INVALID_MANIPULATION =
       
   310         "Invalid manipulation";
       
   311 
       
   312     public static final String DIRECTGRAPHICS_EXCEPTION_INVALID_FORMAT =
       
   313         "Invalid or unsupported format";
       
   314 
       
   315     public static final String DIRECTGRAPHICS_EXCEPTION_INVALID_WIDTH_HEIGHT =
       
   316         "Invalid width or height";
       
   317     // Image:
       
   318     public static final String IMAGE_EXCEPTION_FILE_NAME_IS_NULL =
       
   319         "File name specified is null";
       
   320 
       
   321     public static final String IMAGE_EXCEPTION_IO_ERROR =
       
   322         "I/O error loading image";
       
   323 
       
   324     public static final String IMAGE_EXCEPTION_IMMUTABLE =
       
   325         "Immutable image";
       
   326 
       
   327     public static final String IMAGE_EXCEPTION_FILE_STREAM_IS_NULL =
       
   328         "Stream specified is null";
       
   329 
       
   330     public static final String IMAGE_EXCEPTION_DATA_IS_NULL =
       
   331         "Image data is null";
       
   332 
       
   333     public static final String IMAGE_EXCEPTION_INVALID_BOUNDS =
       
   334         "Invalid image array bounds";
       
   335 
       
   336     public static final String IMAGE_EXCEPTION_IS_NULL =
       
   337         "Image is null";
       
   338 
       
   339     public static final String IMAGE_EXCEPTION_INVALID_DATA =
       
   340         "Image data is invalid";
       
   341 
       
   342     public static final String IMAGE_EXCEPTION_INVALID_DIMENSIONS =
       
   343         "Invalid image dimensions";
       
   344 
       
   345     public static final String IMAGE_EXCEPTION_INVALID_TRANSFORM =
       
   346         "Invalid transform value";
       
   347 
       
   348     public static final String IMAGE_EXCEPTION_INVALID_REGION =
       
   349         "Invalid image region specified";
       
   350 
       
   351     public static final String IMAGE_EXCEPTION_INVALID_SCANLENGTH =
       
   352         "Invalid length value";
       
   353 
       
   354 
       
   355     public static final String TICKER_EXCEPTION_NULL_STRING =
       
   356         "Text parameter cannot be null.";
       
   357 
       
   358 
       
   359     /**
       
   360      * Private Constructor.
       
   361      */
       
   362     private MsgRepository()
       
   363     {
       
   364     }
       
   365 }