--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Command.java Tue Apr 27 16:30:29 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 1999 - 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package javax.microedition.lcdui;
+
+public class Command
+{
+ public static final int SCREEN = 1;
+ public static final int BACK = 2;
+ public static final int CANCEL =3 ;
+ public static final int OK = 4;
+ public static final int HELP = 5;
+ public static final int STOP = 6;
+ public static final int EXIT = 7;
+ public static final int ITEM = 8;
+
+ private String iShortLabel;
+ private String iLongLabel;
+ private int iCommandType;
+ private int iPriority;
+
+ public Command(String aShortLabel, int aCommandType, int aPriority)
+ {
+ this(aShortLabel, null, aCommandType, aPriority);
+ }
+
+ public Command(String aShortLabel,String aLongLabel,int aCommandType,int aPriority)
+ {
+ if (aShortLabel == null)
+ {
+ throw new NullPointerException();
+ }
+ if (aCommandType < SCREEN || aCommandType > ITEM)
+ {
+ throw new IllegalArgumentException();
+ }
+ iShortLabel = aShortLabel;
+ iLongLabel = aLongLabel;
+ iCommandType = aCommandType;
+ iPriority = aPriority;
+ }
+
+ Command(int aCommandType)
+ {
+ iShortLabel = "";
+ iLongLabel = null;
+ iCommandType = aCommandType;
+ iPriority = 0;
+ }
+
+ public String getLabel()
+ {
+ return iShortLabel;
+ }
+
+ public String getLongLabel()
+ {
+ return iLongLabel;
+ }
+
+ public int getCommandType()
+ {
+ return iCommandType;
+ }
+
+ public int getPriority()
+ {
+ return iPriority;
+ }
+}
+
+