Check-in [6fded67d37]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initialize some item types.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6fded67d37894d52cacfdf4da29e9c768ed8673d
User & Date: stephanie.gawroriski 2019-05-17 19:44:03
Context
2019-05-17
23:10
Initialization of some item types. check-in: 359a924923 user: stephanie.gawroriski tags: trunk
19:44
Initialize some item types. check-in: 6fded67d37 user: stephanie.gawroriski tags: trunk
16:20
Capability get of pointer events. check-in: b75815213e user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/ChoiceGroup.java.

118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
...
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
...
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
	public int append(String __s, Image __i)
	{
		// Check
		if (__s == null)
			throw new NullPointerException("NARG");
		
		// Just insert at the end
		synchronized (this._lock)
		{
			int rv;
			insert((rv = size()), __s, __i);
			return rv;
		}
	}
	
	public void delete(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	public void insert(int __v, String __s, Image __i)
		throws IndexOutOfBoundsException, NullPointerException
	{
		// Check
		if (__s == null)
			throw new NullPointerException("NARG");
		
		// Insert wherever
		synchronized (this._lock)
		{
			// {@squirreljme.error EB19 Cannot insert choice at the specified
			// index because it is not within bounds. (The index to add at)}
			List<__ChoiceEntry__> entries = this._entries;
			if (__v < 0 || __v > entries.size())
				throw new IndexOutOfBoundsException(String.format("EB19 %d",
					__v));
			
			// Insert
			entries.add(__v, new __ChoiceEntry__(__s, __i));
		}
	}
	
	public boolean isEnabled(int __i)
	{
		throw new todo.TODO();
	}
	
................................................................................
	 * Returns the number of choices which are in this group.
	 *
	 * @return The number of choices in this group.
	 * @since 2017/08/20
	 */
	public int size()
	{
		synchronized (this._lock)
		{
			return this._entries.size();
		}
	}
}









<
<
|
|
|
<







 







<
<
<
|
|
|
|
|
|
|
|
|
<







 







<
<
|
<




118
119
120
121
122
123
124


125
126
127

128
129
130
131
132
133
134
...
184
185
186
187
188
189
190



191
192
193
194
195
196
197
198
199

200
201
202
203
204
205
206
...
243
244
245
246
247
248
249


250

251
252
253
254
	public int append(String __s, Image __i)
	{
		// Check
		if (__s == null)
			throw new NullPointerException("NARG");
		
		// Just insert at the end


		int rv;
		this.insert((rv = size()), __s, __i);
		return rv;

	}
	
	public void delete(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	public void insert(int __v, String __s, Image __i)
		throws IndexOutOfBoundsException, NullPointerException
	{
		// Check
		if (__s == null)
			throw new NullPointerException("NARG");
		



		// {@squirreljme.error EB19 Cannot insert choice at the specified
		// index because it is not within bounds. (The index to add at)}
		List<__ChoiceEntry__> entries = this._entries;
		if (__v < 0 || __v > entries.size())
			throw new IndexOutOfBoundsException(String.format("EB19 %d",
				__v));
		
		// Insert
		entries.add(__v, new __ChoiceEntry__(__s, __i));

	}
	
	public boolean isEnabled(int __i)
	{
		throw new todo.TODO();
	}
	
................................................................................
	 * Returns the number of choices which are in this group.
	 *
	 * @return The number of choices in this group.
	 * @since 2017/08/20
	 */
	public int size()
	{


		return this._entries.size();

	}
}


Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/DateField.java.

22
23
24
25
26
27
28











29

30
31
32

33
34









35

36
37
38






39
40
41
42
43
44
45
	
	public static final int DATE_TIME =
		3;
	
	public static final int TIME =
		2;
	











	public DateField(String __a, int __b)

	{
		super();
		throw new todo.TODO();

	}
	









	public DateField(String __a, int __b, TimeZone __c)

	{
		super();
		throw new todo.TODO();






	}
	
	public Date getDate()
	{
		throw new todo.TODO();
	}
	







>
>
>
>
>
>
>
>
>
>
>
|
>

<
<
>


>
>
>
>
>
>
>
>
>
|
>

|
<
>
>
>
>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
	
	public static final int DATE_TIME =
		3;
	
	public static final int TIME =
		2;
	
	/** The timezone to use. */
	private final TimeZone _zone;
	
	/**
	 * Initializes the date field with the default timezone.
	 *
	 * @param __l The label to use.
	 * @param __m The mode used.
	 * @throws IllegalArgumentException If the mode is not valid.
	 * @since 2019/05/17
	 */
	public DateField(String __l, int __m)
		throws IllegalArgumentException
	{


		this(__l, __m, null);
	}
	
	/**
	 * Initializes the date field with the default timezone.
	 *
	 * @param __l The label to use.
	 * @param __m The mode used.
	 * @param __z The time zone to use, {@code null} is the default.
	 * @throws IllegalArgumentException If the mode is not valid.
	 * @since 2019/05/17
	 */
	public DateField(String __l, int __m, TimeZone __z)
		throws IllegalArgumentException
	{
		super(__l);

		
		// {@squirreljme.error EB35 Invalid date field mode. (The mode)}
		if (__m != DATE && __m != DATE_TIME && __m != TIME)
			throw new IllegalArgumentException("EB35 " + __m);
		
		this._zone = __z;
	}
	
	public Date getDate()
	{
		throw new todo.TODO();
	}
	

Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/Form.java.

9
10
11
12
13
14
15




16
17
18
19
20
21
22
..
55
56
57
58
59
60
61
62
63
64
65








66

67
68


69

70









71

72
73


74


75









76

77
78













79
80
81
82
83
84
85
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// ---------------------------------------------------------------------------

package javax.microedition.lcdui;

public class Form
	extends Screen
{




	/**
	 * Initializes an empty form with an optionally specified title.
	 *
	 * @param __t The title of the form, may be {@code null}.
	 * @since 2017/08/19
	 */
	public Form(String __t)
................................................................................
		if (__i != null)
			for (Item i : __i)
			{
				// Check
				if (i == null)
					throw new NullPointerException("NARG");
				
				append(i);
			}
	}
	








	public int append(String __a)

	{
		throw new todo.TODO();


	}

	









	public int append(Image __a)

	{
		throw new todo.TODO();


	}


	









	public int append(Item __a)

	{
		throw new todo.TODO();













	}
	
	public void delete(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getHeight()
	{
		throw new todo.TODO();
		/*
		return this.__defaultHeight();
		*/
	}
	
	public FormLayoutPolicy getLayoutPolicy()
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getWidth()
	{
		throw new todo.TODO();
		/*
		return this.__defaultWidth();
		*/
	}
	
	public void insert(int __a, Item __b)
	{
		throw new todo.TODO();
	}
	







>
>
>
>







 







|



>
>
>
>
>
>
>
>
|
>

<
>
>
|
>
|
>
>
>
>
>
>
>
>
>
|
>

<
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
|
>

<
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
<
<
<







 







|
<
<
<







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
..
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
146
147
148
149
150
151
152
153



154
155
156
157
158
159
160
...
161
162
163
164
165
166
167
168



169
170
171
172
173
174
175
// ---------------------------------------------------------------------------

package javax.microedition.lcdui;

public class Form
	extends Screen
{
	/** Items on the form. */
	final __VolatileList__<Item> _items =
		new __VolatileList__<>();
	
	/**
	 * Initializes an empty form with an optionally specified title.
	 *
	 * @param __t The title of the form, may be {@code null}.
	 * @since 2017/08/19
	 */
	public Form(String __t)
................................................................................
		if (__i != null)
			for (Item i : __i)
			{
				// Check
				if (i == null)
					throw new NullPointerException("NARG");
				
				this.append(i);
			}
	}
	
	/**
	 * Appends the given string.
	 *
	 * @param __s The string.
	 * @return The index of the item.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/05/17
	 */
	public int append(String __s)
		throws NullPointerException
	{

		if (__s == null)
			throw new NullPointerException("NARG");
		
		return this.append(new StringItem(null, __s));
	}
	
	/**
	 * Appends the given image.
	 *
	 * @param __i The image.
	 * @return The index of the item.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/05/17
	 */
	public int append(Image __i)
		throws NullPointerException
	{

		if (__i == null)
			throw new NullPointerException("NARG");
		
		return this.append(new ImageItem(null, __i, ImageItem.LAYOUT_DEFAULT,
			null));
	}
	
	/**
	 * Appends the given item to the form.
	 *
	 * @param __i The item to append.
	 * @return The index of the item.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/05/17
	 */
	public int append(Item __i)
		throws NullPointerException
	{

		if (__i == null)
			throw new NullPointerException("NARG");
		
		// Append item
		__VolatileList__<Item> items = this._items;
		int rv = items.append(__i);
		
		// Update display
		Display d = this._display;
		if (d != null)
			d._phoneui.repaint();
		
		return rv;
	}
	
	public void delete(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getHeight()
	{
		return Displayable.__getHeight(this, false);



	}
	
	public FormLayoutPolicy getLayoutPolicy()
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getWidth()
	{
		return Displayable.__getWidth(this, false);



	}
	
	public void insert(int __a, Item __b)
	{
		throw new todo.TODO();
	}
	

Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/Gauge.java.

26
27
28
29
30
31
32






















33

34
35
36




















37
38
39
40
41
42
43
	
	public static final int INCREMENTAL_UPDATING =
		3;
	
	public static final int INDEFINITE =
		-1;
	






















	public Gauge(String __a, boolean __b, int __c, int __d)

	{
		super();
		throw new todo.TODO();




















	}
	
	public int getIncrementValue()
	{
		throw new todo.TODO();
	}
	







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>

|
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
	
	public static final int INCREMENTAL_UPDATING =
		3;
	
	public static final int INDEFINITE =
		-1;
	
	/** Is this interactive? */
	final boolean _interactive;
	
	/** Maximum value. */
	volatile int _maxvalue;
	
	/** Current value. */
	volatile int _value;
	
	/**
	 * Initializes the gauge.
	 *
	 * @param __l The label.
	 * @param __int Can the user change the value?
	 * @param __max The maximum value.
	 * @param __iv The initial value.
	 * @throws IllegalArgumentException If the max value is not positive for
	 * interactive ranges, if the max value is not positive or
	 * {@link #INDEFINITE} for non-interactive ranges, or the initial value
	 * is not one of the special values if it is {@link #INDEFINITE}.
	 * @since 2019/05/17
	 */
	public Gauge(String __l, boolean __int, int __max, int __iv)
		throws IllegalArgumentException
	{
		super(__l);

		
		// {@squirreljme.error EB37 An interactive gauge cannot have a negative
		// maximum value.}
		if (__int && __max < 0)
			throw new IllegalArgumentException("EB37");
		
		// {@squirreljme.error EB38 A non-interactive gauge cannot have a
		// negative value that is not indefinite.}
		if (!__int && !(__max >= 0 || __max == INDEFINITE))
			throw new IllegalArgumentException("EB38");
		
		// {@squirreljme.error EB39 Invalid symbolism for indefinite range.}
		if (__max == INDEFINITE && __iv != CONTINUOUS_IDLE &&
			__iv != CONTINUOUS_RUNNING && __iv != INCREMENTAL_IDLE &&
			__iv != INCREMENTAL_UPDATING)
			throw new IllegalArgumentException("EB39");
		
		this._interactive = __int;
		this._value = __iv;
		this._maxvalue = __max;
	}
	
	public int getIncrementValue()
	{
		throw new todo.TODO();
	}
	

Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/Item.java.

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86











87
88
89
90
91
92
93
	
	public static final int LAYOUT_VSHRINK =
		4096;
	
	public static final int PLAIN =
		0;
	
	/** Thread safe lock. */
	final Object _lock =
		new Object();
	
	/** The current layout of the item. */
	private volatile int _layout =
		LAYOUT_DEFAULT;
	
	/** The label of this item. */
	private volatile String _label;
	
	/**
	 * Initializes the base item.
	 *
	 * @since 2017/08/19
	 */
	Item()
	{
	}











	
	public void addCommand(Command __a)
	{
		throw new todo.TODO();
	}
	
	public Command[] getCommands()







|
|
<






|









>
>
>
>
>
>
>
>
>
>
>







61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	
	public static final int LAYOUT_VSHRINK =
		4096;
	
	public static final int PLAIN =
		0;
	
	/** The owning form. */
	volatile Form _form;

	
	/** The current layout of the item. */
	private volatile int _layout =
		LAYOUT_DEFAULT;
	
	/** The label of this item. */
	volatile String _label;
	
	/**
	 * Initializes the base item.
	 *
	 * @since 2017/08/19
	 */
	Item()
	{
	}
	
	/**
	 * Initializes the base item with some parameters.
	 *
	 * @param __l The label to use.
	 * @since 2019/05/17
	 */
	Item(String __l)
	{
		this._label = __l;
	}
	
	public void addCommand(Command __a)
	{
		throw new todo.TODO();
	}
	
	public Command[] getCommands()

Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/List.java.

100
101
102
103
104
105
106
107
108
109
110

111
112

113
114
115
116
117
118
119
120
121
122
...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
...
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
		__VolatileList__<__ChoiceEntry__> items = this._items;
		int rv = items.append((e = new __ChoiceEntry__(__s, __i)));
		
		// If this is the only item and this is an exclusive list, select it
		if (items.size() == 1 && this._type == Choice.EXCLUSIVE)
			e._selected = true;
		
		throw new todo.TODO();
		/*
		// Visual changed, need to recalculate
		UIPersist lastpersist = this._lastpersist;

		if (lastpersist != null)
			lastpersist.visualUpdate(true);

		
		return rv;
		*/
	}
	
	public void delete(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getHeight()
	{
		throw new todo.TODO();
		/*
		return this.__defaultHeight();
		*/
	}
	
	public Image getImage(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getWidth()
	{
		throw new todo.TODO();
		/*
		return this.__defaultWidth();
		*/
	}
	
	public void insert(int __a, String __b, Image __c)
	{
		throw new todo.TODO();
	}
	







|
<
<
<
>
|
<
>


<







 







|
<
<
<







 







|
<
<
<







100
101
102
103
104
105
106
107



108
109

110
111
112

113
114
115
116
117
118
119
...
140
141
142
143
144
145
146
147



148
149
150
151
152
153
154
...
189
190
191
192
193
194
195
196



197
198
199
200
201
202
203
		__VolatileList__<__ChoiceEntry__> items = this._items;
		int rv = items.append((e = new __ChoiceEntry__(__s, __i)));
		
		// If this is the only item and this is an exclusive list, select it
		if (items.size() == 1 && this._type == Choice.EXCLUSIVE)
			e._selected = true;
		
		// Update display



		Display d = this._display;
		if (d != null)

			d._phoneui.repaint();
		
		return rv;

	}
	
	public void delete(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getHeight()
	{
		return Displayable.__getHeight(this, false);



	}
	
	public Image getImage(int __a)
	{
		throw new todo.TODO();
	}
	
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2017/05/24
	 */
	@Override
	public int getWidth()
	{
		return Displayable.__getWidth(this, false);



	}
	
	public void insert(int __a, String __b, Image __c)
	{
		throw new todo.TODO();
	}
	

Changes to runt/apis/midp-lcdui/javax/microedition/lcdui/StringItem.java.

11
12
13
14
15
16
17













18
19
20
21

22
23








24

25
26
27








28
29
30
31
32
33
34
package javax.microedition.lcdui;

import cc.squirreljme.runtime.lcdui.SerializedEvent;

public class StringItem
	extends Item
{













	public StringItem(String __a, String __b)
	{
		super();
		throw new todo.TODO();

	}
	








	public StringItem(String __a, String __b, int __c)

	{
		super();
		throw new todo.TODO();








	}
	
	public int getAppearanceMode()
	{
		throw new todo.TODO();
	}
	







>
>
>
>
>
>
>
>
>
>
>
>
>
|

<
<
>


>
>
>
>
>
>
>
>
|
>

|
<
>
>
>
>
>
>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package javax.microedition.lcdui;

import cc.squirreljme.runtime.lcdui.SerializedEvent;

public class StringItem
	extends Item
{
	/** Apperance mode. */
	final int _amode;
	
	/** The item text. */
	volatile String _text;
	
	/**
	 * Initializes the string item with the plain style.
	 *
	 * @param __l The label.
	 * @param __t The text.
	 * @since 2019/05/17
	 */
	public StringItem(String __l, String __t)
	{


		this(__l, __t, PLAIN);
	}
	
	/**
	 * Initializes the string item with the plain style.
	 *
	 * @param __l The label.
	 * @param __t The text.
	 * @throws IllegalArgumentException If the appearance mode is not valid.
	 * @since 2019/05/17
	 */
	public StringItem(String __l, String __t, int __am)
		throws IllegalArgumentException
	{
		super(__l);

		
		// {@squirreljme.error EB36 The appearance mode is not valid.
		// (The appearance mode)}
		if (__am != PLAIN && __am != BUTTON && __am != HYPERLINK)
			throw new IllegalArgumentException("EB36 " + __am);
		
		this._text = __t;
		this._amode = __am;
	}
	
	public int getAppearanceMode()
	{
		throw new todo.TODO();
	}