0
+ − 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 GlobalNoteLayout() {
+ − 22
}
+ − 23
+ − 24
GlobalNoteLayout.prototype.layout = function(instance, laf) {
+ − 25
var properties = instance.properties;
+ − 26
var flags = Font.ALIGN_LEFT;
+ − 27
if (properties.textProcessing)
+ − 28
flags |= Font.WRAPPING_ENABLED;
+ − 29
+ − 30
var iconRect = getIconRect(0, laf);
+ − 31
var rect = calculateBounds(properties, laf, flags, iconRect.x, 0);
+ − 32
+ − 33
properties.location.x = rect.x;
+ − 34
properties.location.y = rect.y;
+ − 35
properties.size.width = rect.width;
+ − 36
properties.size.height = rect.height;
+ − 37
}
+ − 38
+ − 39
GlobalNoteLayout.prototype.getPreferredSize = function(instance, laf, wHint, hHint) {
+ − 40
return null;
+ − 41
}
+ − 42
+ − 43
GlobalNoteLayout.prototype.propertyChanged = function(instance, property) {
+ − 44
if (property == "text" || property == "textProcessing") {
+ − 45
instance.forceLayout();
+ − 46
}
+ − 47
}