1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
12 import javax
.microedition
.lcdui
.Choice
;
13 import javax
.microedition
.lcdui
.Display
;
14 import javax
.microedition
.lcdui
.List
;
15 import lcdui
.BaseDisplay
;
18 * Base class for testing LCDUI {@link List}.
22 public abstract class BaseList
26 * Tests on the given list.
28 * @param __display The display being tested.
29 * @param __list The list to test on.
30 * @param __type The type of list used.
31 * @param __typeName The type name of the list.
32 * @throws Throwable On any exception.
35 protected abstract void test(Display __display
, List __list
, int __type
,
44 public void test(Display __display
, String __param
)
47 // Which type of list is used?
52 listType
= Choice
.EXCLUSIVE
;
56 listType
= Choice
.IMPLICIT
;
60 listType
= Choice
.MULTIPLE
;
64 throw new IllegalArgumentException(__param
);
67 // Setup and test list
68 List list
= new List("List " + __param
, listType
);
70 __display
.setCurrent(list
);
72 this.test(__display
, list
, listType
, __param
);