Custom composite in the Design window

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Custom composite in the Design window

Postby Serge » Sun Nov 12, 2006 7:19 am

I've made a "vertical tabs" composite by editing TabBar composite that comes with gwt, and added it to the palette. My composite has the same set of properties as TabBar.

In the design window my composite appears 1 pixel wide. It's difficult to select it with a mouse. Are there any settings (like special comments) that would change this?

Is it possible to add "tabs" property to the "properties" view?
Serge (gymgoal.com)
Serge
 
Posts: 11
Joined: Fri Oct 27, 2006 10:31 am

Re: Custom composite in the Design window

Postby Eric Clayberg » Sun Nov 12, 2006 6:43 pm

Serge wrote:In the design window my composite appears 1 pixel wide. It's difficult to select it with a mouse. Are there any settings (like special comments) that would change this?

Did you try setting the size property in the proprty pane?

Serge wrote:Is it possible to add "tabs" property to the "properties" view?

You could add a getTabs() and setTabs() pair of accessors that gets and sets an array of Strings.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby Serge » Mon Nov 13, 2006 7:56 am

That's true, but...
    I don't want to set "size" because this is a container, and its size will be determined by tabs. When I drop VerticalPanel (just for example) on the "drawing area", I have a rectangle with text "Empty vertical panel". Its size is not set, but it has nice size on the "drawing area" (because of the text) and is easy to select. The text is gone when I add something to the new panel. How did you do this? Is it possible to do the same for a custom composite which is an empty container?

    TabBar does not have getTabs() or setTabs(), but it does have "tabs" property in the Properties window. How did you do this? Is it possible to do the same for a custom composite? My program does not need getTabs() or setTabs(). I'd rather write a special comment or bean info to have "tabs" property.
Serge (gymgoal.com)
Serge
 
Posts: 11
Joined: Fri Oct 27, 2006 10:31 am

Postby Konstantin.Scheglov » Thu Nov 16, 2006 1:04 am

Serge wrote:That's true, but...
    I don't want to set "size" because this is a container, and its size will be determined by tabs. When I drop VerticalPanel (just for example) on the "drawing area", I have a rectangle with text "Empty vertical panel". Its size is not set, but it has nice size on the "drawing area" (because of the text) and is easy to select. The text is gone when I add something to the new panel. How did you do this? Is it possible to do the same for a custom composite which is an empty container?


We just know that we can place Label with some text on VerticalPanel and do this when there are no child widgets.

Serge wrote:TabBar does not have getTabs() or setTabs(), but it does have "tabs" property in the Properties window. How did you do this? Is it possible to do the same for a custom composite? My program does not need getTabs() or setTabs(). I'd rather write a special comment or bean info to have "tabs" property.


Do you know how to write BeanInfo's for GWT widgets? I don't know. Problem is that widget should be in "client" package, BeanInfo should be in same package (i.e. also in "client"), but for example PropertyDescriptor is not available in GWT runtime, so you will have compilation error.

For each GWT component we have special support for its features. For TabBar we know that it have concept of tab's, so we support them in model.

So... I don't know better solution than array of String's. I don't see however why this is bad. But if you have idea how to solve your problem in general way, let us know.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests