Java Reference
In-Depth Information
<code src="flickr_viewer.he"/>
<img src="bkg.png"/>
<img src="selector.png"/>
<img src="bubble_genie.png"/>
<img src="form_choice_bg.png"/>
<img src="form_choice_bg_selected.png"/>
<img src="form_choice_arrow.png"/>
<!-some stylesheet contents omitted for brevity-->
<!-- Form example -->
form.base {
margin: 0 10 5 10;
background: solid #e3e3e3;
border: 1 1 1 1;
border-type: rectangle #a4a4a4;
padding: 2 4 2 2;
font: proportional small plain;
color: #333333;
focused {
border-type: rectangle red;
<!-layout section goes here -->
We add the url parameter, which points to a feed URL that is used to
fetch items from Flickr. You can think of it as a file-wide variable that is
used in other sections of widget.xml .
Another important addition is the <services> element. A widget
can call a server-side service (from WidSets server) using its ID and some
parameters. For example, there are services for consuming and parsing
RSS feeds, syndicating feeds, downloading and scaling images, and so on.
As you can see, services provide functionality that would be too heavy
or impractical to implement in widgets, therefore most applications use
many services. Our example uses one service, Syndication, which allows
a widget to receive a feed in an easy-to-use format, regardless of whether
it is an RSS or ATOM feed. The server also polls for updates in the feed
and notifies the widget about new content.
The <resources> section contains a pointer to the source code as
usual and also has several <img> resources. These images are loaded
by the WidSets engine and are made available to your widget through
getImage(String name) . The developer does not need to worry
about classpath, file path or load failures. If the image fails to load, an
informative image is loaded.
All UI components used in a widget are laid out according to a
stylesheet. The
element contains more and more complex
Search WWH ::

Custom Search