uidesigner/com.nokia.sdt.series60.componentlibrary/components/transient/StandardNote_visual.js
changeset 0 fb279309251b
equal deleted inserted replaced
-1:000000000000 0:fb279309251b
       
     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("../renderLibrary.js")
       
    20 include("../messageLibrary.js")
       
    21 include("popupDialogLibrary.js")
       
    22 
       
    23 function StandardNoteVisual() {
       
    24 }
       
    25 
       
    26 StandardNoteVisual.prototype.draw = function(instance, laf, graphics) {
       
    27 
       
    28 	var flags = 0;
       
    29 	flags |= Font.WRAPPING_ENABLED;
       
    30 	flags |= Font.ALIGN_LEFT;
       
    31 
       
    32 	var bounds = new Rectangle(0, 0, instance.properties.size.width, instance.properties.size.height);
       
    33 	drawPopupDialog(instance, laf, graphics, flags, bounds, getIconRect(0, laf), 0);	
       
    34 }
       
    35 
       
    36 StandardNoteVisual.prototype.getPreferredSize = function(instance, laf, wHint, hHint) {
       
    37 	return null;
       
    38 }
       
    39 
       
    40 // IDirectLabelEdit
       
    41 StandardNoteVisual.prototype.getPropertyPaths = function(instance) {
       
    42 	return new Array("text");
       
    43 }
       
    44 
       
    45 StandardNoteVisual.prototype.getLabelBounds = function(instance, propertyPath, laf) {
       
    46 	var properties = instance.properties;
       
    47 	var iconRect = getIconRect(0, laf);
       
    48 
       
    49 	return new Rectangle(0, 0, iconRect.x, properties.size.height);
       
    50 }
       
    51 
       
    52 StandardNoteVisual.prototype.getLabelFont = function(instance, propertyPath, laf) {
       
    53 	return laf.getFont("message.font");
       
    54 }
       
    55