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 abstract class FormLayoutPolicy |
|
20 { |
|
21 |
|
22 /** |
|
23 * Layouts the Form. |
|
24 * |
|
25 * @param startItem item from which to start Layout; |
|
26 */ |
|
27 abstract void layoutForm(int startItem); |
|
28 |
|
29 /** |
|
30 * Set focus to an item. |
|
31 */ |
|
32 abstract void setCurrentItem(Item item); |
|
33 |
|
34 /** |
|
35 * Called when Form becomes current Displayable. |
|
36 */ |
|
37 abstract void handleShowCurrentEvent(); |
|
38 |
|
39 /** |
|
40 * Called when Form stops being current Displayable. |
|
41 */ |
|
42 abstract void handleHideCurrentEvent(); |
|
43 |
|
44 /** |
|
45 * Called when Form is being resized. |
|
46 * |
|
47 * @param width new width |
|
48 * @param height new height |
|
49 */ |
|
50 abstract void handleResizeEvent(int width, int height); |
|
51 |
|
52 /** |
|
53 * Handle key event. |
|
54 * |
|
55 * @param keyCode key |
|
56 * @param keyType type |
|
57 */ |
|
58 abstract void handleKeyEvent(int keyCode, int keyType); |
|
59 |
|
60 /** |
|
61 * Handle pointer event. |
|
62 * |
|
63 * @param x coordinate relative to scrolledComposite |
|
64 * @param y coordinate relative to scrolledComposite |
|
65 * @param type event type: SWT.MouseDown, SWT.MouseMove, SWT.MouseUp |
|
66 */ |
|
67 abstract void handlePointerEvent(int x, int y, int type); |
|
68 |
|
69 /** |
|
70 * Set scrolling of form composite. |
|
71 */ |
|
72 abstract void updateScrolling(int value, boolean keyNavi); |
|
73 |
|
74 /** |
|
75 * Get the layouted conrol of an item. |
|
76 * |
|
77 * @param item item |
|
78 * @return layouted control |
|
79 */ |
|
80 abstract org.eclipse.swt.widgets.Control getItemControl(Item item); |
|
81 |
|
82 /** |
|
83 * Gets layouter that can layout the specified item. |
|
84 * |
|
85 * @param item Item to be layouted. |
|
86 * @return ItemLayouter or null if no Layouter found. |
|
87 */ |
|
88 abstract ItemLayouter getLayouter(Item item); |
|
89 } |
|