equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
25 |
25 |
26 |
26 |
27 /** |
27 /** |
28 * Base class |
28 * Base class |
29 */ |
29 */ |
30 abstract class M2GObject |
30 abstract class M2GObject |
31 { |
31 { |
32 //-------------------------------------------------- |
32 //-------------------------------------------------- |
33 // STATIC CONSTANTS |
33 // STATIC CONSTANTS |
34 //-------------------------------------------------- |
34 //-------------------------------------------------- |
35 public static final int INVALID_NATIVE_HANDLE = 0; |
35 public static final int INVALID_NATIVE_HANDLE = 0; |
36 // static final String ESWT_PACKAGE = "org.eclipse.swt.widgets.Display" ; |
36 // static final String ESWT_PACKAGE = "org.eclipse.swt.widgets.Display" ; |
37 //-------------------------------------------------- |
37 //-------------------------------------------------- |
38 // VARIABLES |
38 // VARIABLES |
39 //-------------------------------------------------- |
39 //-------------------------------------------------- |
40 int iNativeHandle; |
40 int iNativeHandle; |
41 M2GManager iManager; |
41 M2GManager iManager; |
48 * Constructor. |
48 * Constructor. |
49 */ |
49 */ |
50 M2GObject() |
50 M2GObject() |
51 { |
51 { |
52 this(INVALID_NATIVE_HANDLE); |
52 this(INVALID_NATIVE_HANDLE); |
53 |
53 |
54 } |
54 } |
55 |
55 |
56 /** |
56 /** |
57 * Constructor. |
57 * Constructor. |
58 * @param a native handle |
58 * @param a native handle |
59 */ |
59 */ |
60 M2GObject(int aHandle) |
60 M2GObject(int aHandle) |
61 { |
61 { |
62 |
62 |
63 iNativeHandle = aHandle; |
63 iNativeHandle = aHandle; |
64 |
64 |
65 iManager = M2GManager.getInstance(); |
65 iManager = M2GManager.getInstance(); |
66 |
66 |
67 } |
67 } |
68 |
68 |
69 /** |
69 /** |
70 * Checks handle validity. |
70 * Checks handle validity. |
71 * @return true if valid |
71 * @return true if valid |
103 */ |
103 */ |
104 void createDestroyer() |
104 void createDestroyer() |
105 { |
105 { |
106 Logger.LOG(Logger.EJavaUI, Logger.EInfo, |
106 Logger.LOG(Logger.EJavaUI, Logger.EInfo, |
107 "createDestroyer(): " + this.getClass().getName()); |
107 "createDestroyer(): " + this.getClass().getName()); |
108 |
108 |
109 } |
109 } |
110 |
110 |
111 /** |
111 /** |
112 * Gets native handle |
112 * Gets native handle |
113 * @return native handle |
113 * @return native handle |