2
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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 the License "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 |
|
|
18 |
|
|
19 |
include("popupDialogLibrary.js")
|
|
20 |
|
|
21 |
function StandardNoteLayout() {
|
|
22 |
}
|
|
23 |
|
|
24 |
StandardNoteLayout.prototype.layout = function(instance, laf) {
|
|
25 |
var properties = instance.properties;
|
|
26 |
var flags = Font.ALIGN_LEFT;
|
|
27 |
flags |= Font.WRAPPING_ENABLED;
|
|
28 |
|
|
29 |
var iconRect = getIconRect(0, laf);
|
|
30 |
var rect = calculateBounds(properties, laf, flags, iconRect.x, 0);
|
|
31 |
|
|
32 |
properties.location.x = rect.x;
|
|
33 |
properties.location.y = rect.y;
|
|
34 |
properties.size.width = rect.width;
|
|
35 |
properties.size.height = rect.height;
|
|
36 |
}
|
|
37 |
|
|
38 |
StandardNoteLayout.prototype.getPreferredSize = function(instance, laf, wHint, hHint) {
|
|
39 |
return null;
|
|
40 |
}
|
|
41 |
|
|
42 |
StandardNoteLayout.prototype.propertyChanged = function(instance, property) {
|
|
43 |
if (property == "text") {
|
|
44 |
instance.forceLayout();
|
|
45 |
}
|
|
46 |
}
|