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("../implLibrary.js")
|
|
20 |
include("../renderLibrary.js")
|
|
21 |
include("../srcgenLibrary.js")
|
|
22 |
|
|
23 |
function StatusPaneContextVisual() {
|
|
24 |
}
|
|
25 |
|
|
26 |
StatusPaneContextVisual.prototype.draw = function(instance, laf, graphics) {
|
|
27 |
var properties = instance.properties;
|
|
28 |
|
|
29 |
if (laf.getBoolean("show.context.icon", true)) {
|
|
30 |
graphics.setBackground(getBackgroundColor(instance, laf));
|
|
31 |
|
|
32 |
// do not blend, since status pane has two different colors
|
|
33 |
renderImage(StatusPaneContextVisual.prototype, instance, laf, graphics,
|
|
34 |
0, 0, "image", false);
|
|
35 |
}
|
|
36 |
|
|
37 |
}
|
|
38 |
|
|
39 |
StatusPaneContextVisual.prototype.getViewableSize = function(instance, propertyId, laf) {
|
|
40 |
var size = instance.properties.size;
|
|
41 |
return new Point(size.width, size.height);
|
|
42 |
}
|
|
43 |
|
|
44 |
StatusPaneContextVisual.prototype.isScaling = function(instance, propertyId, laf) {
|
|
45 |
return isScalingIcons();
|
|
46 |
}
|
|
47 |
|
|
48 |
StatusPaneContextVisual.prototype.getAlignmentWeights = function(instance, propertyId, laf) {
|
|
49 |
return new Point(ImageUtils.ALIGN_CENTER_OR_LEFT, ImageUtils.ALIGN_CENTER_OR_TOP);
|
|
50 |
}
|
|
51 |
|
|
52 |
StatusPaneContextVisual.prototype.isPreservingAspectRatio = function(instance, propertyId, laf) {
|
|
53 |
return true;
|
|
54 |
}
|
|
55 |
|
|
56 |
|
|
57 |
StatusPaneContextVisual.prototype.getPreferredSize = function(instance, laf, wHint, hHint) {
|
|
58 |
return null; // needs implementation
|
|
59 |
}
|
|
60 |
|
|
61 |
setupCommonDirectImageEditing(StatusPaneContextVisual.prototype, "image",
|
|
62 |
null // areafunction
|
|
63 |
)
|