CC-GNU LGPL
This software is licensed under the CC-GNU LGPL.

GWT Widget Library

Monday, May 29, 2006

 

ANNOUNCE: GWT Widget Library 0.0.2


What's New in GTW Widget Library 0.0.2


Download Version 0.0.2


Wrap existing HTML elements as widgets. Support for hyperlinks, images, buttons, and panels.

WButton action = new WButton("action-button");

WHyperlink searchLink = new WHyperlink("link-to-search");

WPanel content = new WPanel("content");

WImage headerImg = new WImage("header-image");


Wrap an existing HTML element with the most appropriate wrapper.

WrappedWidget navLinkSearch = WBuilder.getWidgetFromDOM("nav-link-search");

if (navLinkSearch.isHyperlink()) {
((WHyperlink)navLinkSearch).addClickListener(navListener);
}


Replace existing elements and widgets on the page with other widgets.

WBuilder.replaceElementWithWidget(element, widget);

WBuilder.replaceWidget(oldWidget, newWidget);


PNGImage widget, with support for transparancy in IE5.5 and IE6.

PNGImage img = new PNGImage("/images/test.png", width, height);


Color and BorderStyle constants for setting styles. Currently used in the new ImageButton widget.


ImageButton widget designed for use in tool bars. Allows for creation of buttons individually, or with the help of the ImageButtonFactory.

ImageButtonFactory fac = new ImageButtonFactory();
fac.setBackgroundOffColor(Color.LIGHT_GRAY);
fac.setBackgroundOnColor(Color.YELLOW);
fac.setBorderOnColor(Color.NONE);

FlowPanel iconBar = new FlowPanel();

iconBar.add(fac.createImageButton("icons/applications-accessories.png", 22, 22));
iconBar.add(fac.createImageButton("icons/applications-development.png", 22, 22));
iconBar.add(fac.createImageButton("icons/applications-games.png", 22, 22));
iconBar.add(fac.createImageButton("icons/applications-graphics.png", 22, 22));
iconBar.add(fac.createImageButton("icons/applications-internet.png", 22, 22));
iconBar.add(fac.createImageButton("icons/applications-multimedia.png", 22, 22));

RootPanel.get().add(iconBar);

Friday, May 26, 2006

 

GWT Widget Library Additions

The next release of the GWT Widget Library should be out by Tuesday. The main addition thus far are the ImageButton and ToggleButton widgets. Both of these support the usual JPEG and GIF, as well as PNG.

If you are unfamiliar with PNG it may be because IE6 does not have proper support for it, although there is a workaround. The new button widgets take advantage of the workaround and allow the use of PNG in IE 5.5 and IE6. The advantage of PNG is that it supports an alpha channel, allowing you to see through the image. This avoids having to deal with matting, and the image looks good no matter what background color is used behind it.

Here is a screenshot of an icon bar consisting of several ImageButton widgets using PNG images from the Tango Project.

Icon Bar

 

ANNOUNCE: GWT Widget Library

The GWT Widget Library is a library of widgets and wrappers for the Google Web Toolkit. Currently this is a very short list, which will expand in time.

This is being distributed under the GNU-LGPL.

Version 0.0.1 Features:
Download:
Examples:

Example of using an effect with options:

Effect.highlight(widget, new EffectOption[]{
new EffectOption("startcolor", "#ff0000")
});


Example of using an effect with no options:

Effect.fade(widget);


Example of using an effect on a specific element id:

Effect.switchOff(RootPanel.get("leftNav"));

Archives

May 2006   June 2006  

This page is powered by Blogger. Isn't yours?