Can I remove (+) and (-) knees from GWT Tree?

68 views
Skip to first unread message

dduck

unread,
Dec 15, 2008, 7:13:27 AM12/15/08
to Google Web Toolkit
Hi,

Subject really says it all.

I would like to use GWT Tree on a panel as a pop-up menu with grouped
menu items, but the expand/collapse knee is a bit of an eyesore for
that purpose...

Sincerely,
Anders S. Johansen, ange.dk

dduck

unread,
Dec 15, 2008, 9:09:03 AM12/15/08
to Google Web Toolkit
...and the answer is:

Make a TreeImages descendant that uses transparent images for the
"knees".

interface NoKneesTreeImages extends TreeImages {

@Resource("dk/ange/gwt/dataqualitybrowser/public/images/
transparent-16x16.gif")
public AbstractImagePrototype treeClosed();

@Resource("dk/ange/gwt/dataqualitybrowser/public/images/
transparent-16x16.gif")
public AbstractImagePrototype treeOpen();

}

Use it when constructing the Tree.

private final TreeImages images = (TreeImages)GWT.create
(NoKneesTreeImages.class);

private final Tree actionsTree = new Tree(images);


You will need a small, transparent gif or png image.

Please remember to modify the paths to the images to reflect you own
package structure.

A
Reply all
Reply to author
Forward
0 new messages