You Are Here:

Community: Wiki

This page was last modified on 18 November 2009, at 15:45.

Widget

From Forum Nokia Wiki

Inheritance

Nokia.Widget 

1 - Description

This is the basic class for Guarana Components.


2 - Visual Design

Not Applicable for this component.


3 - Component Dependencies

3.1 CSS

Not Applicable for this component.


3.2 Javascript

<!-- jQuery file -->
<script src="/lib/jquery/jQuery.js" type="text/javascript" charset="utf-8"></script>
<!-- Guarana file -->
<script src="/lib/Guarana.js" type="text/javascript" charset="utf-8"></script>


4 - Functional Specifications/Requirements

4.1 - Options

  • element: 'selector'
    • jQuery selector or the DOM reference to become the container of the component.


4.2 - Events - Callbacks

Not Applicable for this component.


4.3 - Methods

  • registerData: function(name)
  • setDefaultVibraval: function(value)
  • setDefaultVibratime: function(value)
  • getDefaultVibraval: function()
  • getDefaultVibratime: function()
  • setRightSoftkeyLabel: function(message, callback)
  • setLeftSoftkeyLabel: function(message, callback)
  • vibrate: function(vibraval, vibratime)
  • maximize: function(selector)
  • fireCallback: function(type)
  • registerVibrationOn: function(types)
  • openURL: function(url)

4.4 - Default options

Not Applicable for this component.


5 - Component Demo

5.1 HTML

Not Applicable for this component.


5.2 Javascript (Creating a component extending Widget Class)

Nokia.SampleWidget = Nokia.Widget.extend({
     initialize: function(options) {
          var instance = this;
          instance._super.apply(instance, arguments);
     },

     foo: function() {
          alert("I am a brand new method.")
     },

     bar: function() {
          alert("I am another brand new method.")
     }
});

// creating a new instance of Nokia.SampleWidget that inherits from Nokia.Widget

var SampleWidget = new Nokia.SampleWidget({
     option1: 1,
     option2: 2
});

SampleWidget.foo(); // foo
SampleWidget.bar(); // bar

6 - Nokia WRT Browser Compatibility

Not Applicable for this component.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia