uidesigner/com.nokia.sdt.series60.componentlibrary/components/statuspane/StatusPane_visual.js
changeset 2 d760517a8095
equal deleted inserted replaced
-1:000000000000 2:d760517a8095
       
     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 function StatusPaneVisual() {
       
    20 }
       
    21 
       
    22 var NAV_HEIGHT = 14;
       
    23 
       
    24 StatusPaneVisual.prototype.draw = function(instance, laf, graphics) {
       
    25 	var properties = instance.properties;
       
    26 	var thisWidth = properties.size.width;
       
    27 	var thisHeight = properties.size.height;
       
    28 	
       
    29 	var white = Colors.getColor(255, 255, 255);
       
    30 	var navGradientStart = Colors.getColor(0, 0, 150);
       
    31 	var navGradientEnd = Colors.getColor(0, 0, 255);
       
    32 
       
    33 	graphics.setBackground(white);
       
    34 	graphics.fillRectangle(0, 0, thisWidth, thisHeight);
       
    35 	
       
    36 	var navTop = thisHeight - NAV_HEIGHT;
       
    37 	
       
    38 	graphics.setForeground(navGradientStart);
       
    39 	graphics.setBackground(navGradientEnd);
       
    40 	graphics.fillGradientRectangle(0, navTop, thisWidth, NAV_HEIGHT, false);
       
    41 }
       
    42 
       
    43 StatusPaneVisual.prototype.getPreferredSize = function(instance, laf, wHint, hHint) {
       
    44 	return null; // needs implementation	
       
    45 }
       
    46