|
1 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 <html lang="en" xml:lang="en"> |
|
3 <head> |
|
4 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> |
|
5 <meta name="copyright" content="(C) Copyright 2005" /> |
|
6 <meta name="DC.rights.owner" content="(C) Copyright 2005" /> |
|
7 <meta content="concept" name="DC.Type" /> |
|
8 <meta name="DC.Title" content="WRTKit Control Class" /> |
|
9 <meta scheme="URI" name="DC.Relation" content="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html" /> |
|
10 <meta content="XHTML" name="DC.Format" /> |
|
11 <meta content="GUID-6DDB8154-3FED-40FC-B282-85E6D3AD494F" name="DC.Identifier" /> |
|
12 <meta content="en" name="DC.Language" /> |
|
13 <link href="commonltr.css" type="text/css" rel="stylesheet" /> |
|
14 <title> |
|
15 WRTKit Control Class</title> |
|
16 </head> |
|
17 <body id="GUID-6DDB8154-3FED-40FC-B282-85E6D3AD494F"><a name="GUID-6DDB8154-3FED-40FC-B282-85E6D3AD494F"><!-- --></a> |
|
18 |
|
19 |
|
20 |
|
21 <h1 class="topictitle1"> |
|
22 WRTKit Control Class</h1> |
|
23 |
|
24 <div> |
|
25 |
|
26 <div class="section"><h2 class="sectiontitle"> |
|
27 Description</h2> |
|
28 |
|
29 |
|
30 <p> |
|
31 |
|
32 The Control class is an abstract base class for user interface controls. |
|
33 Don't instantiate Control directly but rather one of its subclasses. |
|
34 </p> |
|
35 |
|
36 </div> |
|
37 |
|
38 <div class="section"><h2 class="sectiontitle"> |
|
39 Inherits from</h2> |
|
40 |
|
41 |
|
42 <p> |
|
43 |
|
44 <a href="WRTKit_UIElement_Class-GUID-37b82f75-720c-4f54-9769-cda18453ffa3.html"> |
|
45 UIElement</a> |
|
46 </p> |
|
47 |
|
48 </div> |
|
49 |
|
50 <div class="section"><h2 class="sectiontitle"> |
|
51 Events</h2> |
|
52 |
|
53 |
|
54 <br /><ul> |
|
55 |
|
56 <li> |
|
57 |
|
58 <p> |
|
59 FocusStateChanged</p> |
|
60 |
|
61 |
|
62 |
|
63 <p> |
|
64 |
|
65 This event is fired when focus state of the control has changed. |
|
66 </p> |
|
67 |
|
68 |
|
69 </li> |
|
70 |
|
71 <li> |
|
72 |
|
73 <p> |
|
74 HoverStateChanged</p> |
|
75 |
|
76 |
|
77 |
|
78 <p> |
|
79 |
|
80 This event is fired when hover state of the control has changed. |
|
81 </p> |
|
82 |
|
83 |
|
84 </li> |
|
85 |
|
86 </ul> |
|
87 |
|
88 </div> |
|
89 |
|
90 </div> |
|
91 |
|
92 <div> |
|
93 <div class="familylinks"> |
|
94 <div class="parentlink"><strong>Parent topic:</strong> <a href="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html">WRTKit API Reference</a></div> |
|
95 </div> |
|
96 </div> |
|
97 <div class="nested1" id="GUID-CF6C59C7-1FB2-4B30-85F1-31818B519739"><a name="GUID-CF6C59C7-1FB2-4B30-85F1-31818B519739"><!-- --></a> |
|
98 |
|
99 <h2 class="topictitle2"> |
|
100 getCaption()</h2> |
|
101 |
|
102 <div> |
|
103 |
|
104 <div class="section"><h3 class="sectiontitle"> |
|
105 Syntax</h3> |
|
106 |
|
107 |
|
108 <pre> |
|
109 [String] Control.getCaption(void)</pre> |
|
110 |
|
111 </div> |
|
112 |
|
113 <div class="section"><h3 class="sectiontitle"> |
|
114 Description</h3> |
|
115 |
|
116 |
|
117 <p> |
|
118 |
|
119 Retrieves the current caption of the control. |
|
120 The value is an XHTML string. |
|
121 </p> |
|
122 |
|
123 </div> |
|
124 |
|
125 <div class="section"><h3 class="sectiontitle"> |
|
126 Arguments</h3> |
|
127 |
|
128 |
|
129 <p> |
|
130 |
|
131 This method does not take any arguments. |
|
132 </p> |
|
133 |
|
134 </div> |
|
135 |
|
136 <div class="section"><h3 class="sectiontitle"> |
|
137 Return value</h3> |
|
138 |
|
139 |
|
140 <p> |
|
141 |
|
142 The current caption of the control or null if the control doesn't have a caption. |
|
143 </p> |
|
144 |
|
145 </div> |
|
146 |
|
147 </div> |
|
148 |
|
149 </div> |
|
150 |
|
151 <div class="nested1" id="GUID-2746C552-8BFB-4C81-8790-3CAC42E6D73A"><a name="GUID-2746C552-8BFB-4C81-8790-3CAC42E6D73A"><!-- --></a> |
|
152 |
|
153 <h2 class="topictitle2"> |
|
154 setCaption()</h2> |
|
155 |
|
156 <div> |
|
157 |
|
158 <div class="section"><h3 class="sectiontitle"> |
|
159 Syntax</h3> |
|
160 |
|
161 |
|
162 <pre> |
|
163 [void] Control.setCaption(String caption)</pre> |
|
164 |
|
165 </div> |
|
166 |
|
167 <div class="section"><h3 class="sectiontitle"> |
|
168 Description</h3> |
|
169 |
|
170 |
|
171 <p> |
|
172 |
|
173 Sets the caption for the control. If null is specified as the caption |
|
174 then the caption is removed (entirely hidden) for the control. |
|
175 The value is an XHTML string. |
|
176 </p> |
|
177 |
|
178 </div> |
|
179 |
|
180 <div class="section"><h3 class="sectiontitle"> |
|
181 Arguments</h3> |
|
182 |
|
183 |
|
184 <br /><ul> |
|
185 |
|
186 <li> |
|
187 |
|
188 <p> |
|
189 caption</p> |
|
190 |
|
191 |
|
192 |
|
193 <p> |
|
194 |
|
195 The new caption for the control or null for no caption. |
|
196 </p> |
|
197 |
|
198 |
|
199 </li> |
|
200 |
|
201 </ul> |
|
202 |
|
203 </div> |
|
204 |
|
205 <div class="section"><h3 class="sectiontitle"> |
|
206 Return value</h3> |
|
207 |
|
208 |
|
209 <p> |
|
210 |
|
211 This method does not return a value. |
|
212 </p> |
|
213 |
|
214 </div> |
|
215 |
|
216 </div> |
|
217 |
|
218 </div> |
|
219 |
|
220 <div class="nested1" id="GUID-CC9D9EA5-DCD8-4EBE-9FAC-A3C87C845AB2"><a name="GUID-CC9D9EA5-DCD8-4EBE-9FAC-A3C87C845AB2"><!-- --></a> |
|
221 |
|
222 <h2 class="topictitle2"> |
|
223 isEnabled()</h2> |
|
224 |
|
225 <div> |
|
226 |
|
227 <div class="section"><h3 class="sectiontitle"> |
|
228 Syntax</h3> |
|
229 |
|
230 |
|
231 <pre> |
|
232 [Boolean] Control.isEnabled(void)</pre> |
|
233 |
|
234 </div> |
|
235 |
|
236 <div class="section"><h3 class="sectiontitle"> |
|
237 Description</h3> |
|
238 |
|
239 |
|
240 <p> |
|
241 |
|
242 Retrieves the enabled state of the control. |
|
243 </p> |
|
244 |
|
245 </div> |
|
246 |
|
247 <div class="section"><h3 class="sectiontitle"> |
|
248 Arguments</h3> |
|
249 |
|
250 |
|
251 <p> |
|
252 |
|
253 This method does not take any arguments. |
|
254 </p> |
|
255 |
|
256 </div> |
|
257 |
|
258 <div class="section"><h3 class="sectiontitle"> |
|
259 Return value</h3> |
|
260 |
|
261 |
|
262 <p> |
|
263 |
|
264 The current enabled state of the control. |
|
265 </p> |
|
266 |
|
267 </div> |
|
268 |
|
269 </div> |
|
270 |
|
271 </div> |
|
272 |
|
273 <div class="nested1" id="GUID-F336AA4D-EDFF-4109-A7C5-A6C0AF0DCC11"><a name="GUID-F336AA4D-EDFF-4109-A7C5-A6C0AF0DCC11"><!-- --></a> |
|
274 |
|
275 <h2 class="topictitle2"> |
|
276 setEnabled()</h2> |
|
277 |
|
278 <div> |
|
279 |
|
280 <div class="section"><h3 class="sectiontitle"> |
|
281 Syntax</h3> |
|
282 |
|
283 |
|
284 <pre> |
|
285 [void] Control.setEnabled(Boolean state)</pre> |
|
286 |
|
287 </div> |
|
288 |
|
289 <div class="section"><h3 class="sectiontitle"> |
|
290 Description</h3> |
|
291 |
|
292 |
|
293 <p> |
|
294 |
|
295 Sets the enabled state for the control. |
|
296 </p> |
|
297 |
|
298 </div> |
|
299 |
|
300 <div class="section"><h3 class="sectiontitle"> |
|
301 Arguments</h3> |
|
302 |
|
303 |
|
304 <br /><ul> |
|
305 |
|
306 <li> |
|
307 |
|
308 <p> |
|
309 state</p> |
|
310 |
|
311 |
|
312 |
|
313 <p> |
|
314 |
|
315 The new enabled state for the control; true to enable, false to disable. |
|
316 </p> |
|
317 |
|
318 |
|
319 </li> |
|
320 |
|
321 </ul> |
|
322 |
|
323 </div> |
|
324 |
|
325 <div class="section"><h3 class="sectiontitle"> |
|
326 Return value</h3> |
|
327 |
|
328 |
|
329 <p> |
|
330 |
|
331 This method does not return a value. |
|
332 </p> |
|
333 |
|
334 </div> |
|
335 |
|
336 </div> |
|
337 |
|
338 </div> |
|
339 |
|
340 <div class="nested1" id="GUID-1667AEC9-B037-4A45-A89E-38369F63CCD0"><a name="GUID-1667AEC9-B037-4A45-A89E-38369F63CCD0"><!-- --></a> |
|
341 |
|
342 <h2 class="topictitle2"> |
|
343 isFocusable()</h2> |
|
344 |
|
345 <div> |
|
346 |
|
347 <div class="section"><h3 class="sectiontitle"> |
|
348 Syntax</h3> |
|
349 |
|
350 |
|
351 <pre> |
|
352 [Boolean] Control.isFocusable(void)</pre> |
|
353 |
|
354 </div> |
|
355 |
|
356 <div class="section"><h3 class="sectiontitle"> |
|
357 Description</h3> |
|
358 |
|
359 |
|
360 <p> |
|
361 |
|
362 Retrieves the focusable state of a control. The focusable state tells |
|
363 whether the control can be focused or not. E.g. a label control cannot |
|
364 be focused because it does not have any interactive action to perform. |
|
365 </p> |
|
366 |
|
367 </div> |
|
368 |
|
369 <div class="section"><h3 class="sectiontitle"> |
|
370 Arguments</h3> |
|
371 |
|
372 |
|
373 <p> |
|
374 |
|
375 This method does not take any arguments. |
|
376 </p> |
|
377 |
|
378 </div> |
|
379 |
|
380 <div class="section"><h3 class="sectiontitle"> |
|
381 Return value</h3> |
|
382 |
|
383 |
|
384 <p> |
|
385 |
|
386 The focusable state of the control. |
|
387 </p> |
|
388 |
|
389 </div> |
|
390 |
|
391 </div> |
|
392 |
|
393 </div> |
|
394 |
|
395 <div class="nested1" id="GUID-954AA9E7-4239-432E-A1D9-66CDD75F274E"><a name="GUID-954AA9E7-4239-432E-A1D9-66CDD75F274E"><!-- --></a> |
|
396 |
|
397 <h2 class="topictitle2"> |
|
398 isFocused()</h2> |
|
399 |
|
400 <div> |
|
401 |
|
402 <div class="section"><h3 class="sectiontitle"> |
|
403 Syntax</h3> |
|
404 |
|
405 |
|
406 <pre> |
|
407 [Boolean] Control.isFocused(void)</pre> |
|
408 |
|
409 </div> |
|
410 |
|
411 <div class="section"><h3 class="sectiontitle"> |
|
412 Description</h3> |
|
413 |
|
414 |
|
415 <p> |
|
416 |
|
417 Retrieves the focused state of the control. |
|
418 </p> |
|
419 |
|
420 </div> |
|
421 |
|
422 <div class="section"><h3 class="sectiontitle"> |
|
423 Arguments</h3> |
|
424 |
|
425 |
|
426 <p> |
|
427 |
|
428 This method does not take any arguments. |
|
429 </p> |
|
430 |
|
431 </div> |
|
432 |
|
433 <div class="section"><h3 class="sectiontitle"> |
|
434 Return value</h3> |
|
435 |
|
436 |
|
437 <p> |
|
438 |
|
439 The current focused state of the control. |
|
440 </p> |
|
441 |
|
442 </div> |
|
443 |
|
444 </div> |
|
445 |
|
446 </div> |
|
447 |
|
448 <div class="nested1" id="GUID-B8FD2E60-F202-4089-A253-11B765EF0C41"><a name="GUID-B8FD2E60-F202-4089-A253-11B765EF0C41"><!-- --></a> |
|
449 |
|
450 <h2 class="topictitle2"> |
|
451 setFocused()</h2> |
|
452 |
|
453 <div> |
|
454 |
|
455 <div class="section"><h3 class="sectiontitle"> |
|
456 Syntax</h3> |
|
457 |
|
458 |
|
459 <pre> |
|
460 [void] Control.setFocused(Boolean state)</pre> |
|
461 |
|
462 </div> |
|
463 |
|
464 <div class="section"><h3 class="sectiontitle"> |
|
465 Description</h3> |
|
466 |
|
467 |
|
468 <p> |
|
469 |
|
470 Sets the focused state for the control. Note that it's not always possible |
|
471 to carry out the request to focus a control. E.g. a control might not be |
|
472 visible or the focus might be locked to another control. |
|
473 </p> |
|
474 |
|
475 </div> |
|
476 |
|
477 <div class="section"><h3 class="sectiontitle"> |
|
478 Arguments</h3> |
|
479 |
|
480 |
|
481 <br /><ul> |
|
482 |
|
483 <li> |
|
484 |
|
485 <p> |
|
486 state</p> |
|
487 |
|
488 |
|
489 |
|
490 <p> |
|
491 |
|
492 The new focused state for the control; true to focus, false to blur. |
|
493 </p> |
|
494 |
|
495 |
|
496 </li> |
|
497 |
|
498 </ul> |
|
499 |
|
500 </div> |
|
501 |
|
502 <div class="section"><h3 class="sectiontitle"> |
|
503 Return value</h3> |
|
504 |
|
505 |
|
506 <p> |
|
507 |
|
508 This method does not return a value. |
|
509 </p> |
|
510 |
|
511 </div> |
|
512 |
|
513 </div> |
|
514 |
|
515 </div> |
|
516 |
|
517 <div class="nested1" id="GUID-DAB168FA-2ED0-4733-AE59-ABC4B7F0AFB2"><a name="GUID-DAB168FA-2ED0-4733-AE59-ABC4B7F0AFB2"><!-- --></a> |
|
518 |
|
519 <h2 class="topictitle2"> |
|
520 updateStyleFromState()</h2> |
|
521 |
|
522 <div> |
|
523 |
|
524 <div class="section"><h3 class="sectiontitle"> |
|
525 Syntax</h3> |
|
526 |
|
527 |
|
528 <pre> |
|
529 [void] Control.updateStyleFromState()</pre> |
|
530 |
|
531 </div> |
|
532 |
|
533 <div class="section"><h3 class="sectiontitle"> |
|
534 Description</h3> |
|
535 |
|
536 |
|
537 <p> |
|
538 |
|
539 Called to let the control update its style to match its internal state. |
|
540 The method doesn't need to be called manually as the toolkit takes care of |
|
541 calling it whenever the state of a control changes. Override this method |
|
542 if you wish to implement custom styling for a control. Typically using |
|
543 CSS rules will be sufficient for customizing looks so only use this method |
|
544 when CSS is insufficient. |
|
545 </p> |
|
546 |
|
547 </div> |
|
548 |
|
549 <div class="section"><h3 class="sectiontitle"> |
|
550 Arguments</h3> |
|
551 |
|
552 |
|
553 <p> |
|
554 |
|
555 This method does not take any arguments. |
|
556 </p> |
|
557 |
|
558 </div> |
|
559 |
|
560 <div class="section"><h3 class="sectiontitle"> |
|
561 Return value</h3> |
|
562 |
|
563 |
|
564 <p> |
|
565 |
|
566 This method does not return a value. |
|
567 </p> |
|
568 |
|
569 </div> |
|
570 |
|
571 </div> |
|
572 |
|
573 </div> |
|
574 |
|
575 <div class="nested1" id="GUID-B790F37D-A86B-47F1-80CC-950C4653BEA2"><a name="GUID-B790F37D-A86B-47F1-80CC-950C4653BEA2"><!-- --></a> |
|
576 |
|
577 <h2 class="topictitle2"> |
|
578 view</h2> |
|
579 |
|
580 <div> |
|
581 |
|
582 <div class="section"><h3 class="sectiontitle"> |
|
583 Syntax</h3> |
|
584 |
|
585 |
|
586 <pre> |
|
587 [View] Control.view</pre> |
|
588 |
|
589 </div> |
|
590 |
|
591 <div class="section"><h3 class="sectiontitle"> |
|
592 Description</h3> |
|
593 |
|
594 |
|
595 <p> |
|
596 |
|
597 The view property references the view that the control is attached to. |
|
598 If the control has not been attached to any view then the property is null. |
|
599 </p> |
|
600 |
|
601 </div> |
|
602 |
|
603 </div> |
|
604 |
|
605 </div> |
|
606 |
|
607 |
|
608 </body> |
|
609 </html> |