CustomButton and ImageBundles don't display in 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

CustomButton and ImageBundles don't display in design window

Postby SoulDad57 » Mon Jul 30, 2007 11:39 am

I have migrated all my button faces from CSS "sprites" to ImageBundles and CustomButton (PushButton to be exact).

My application works fine, but the buttons do not display properly in the design window or the preview window. Instead a generic text label of the button class name is displayed on a pink background.

I assume that the problem is related to the fact that I am using ImageBundles. Any suggestions?


TIA

Rick
"Fanaticism consists in redoubling your effort when you have forgotten your aim."

— George Santayana
SoulDad57
 
Posts: 15
Joined: Wed May 16, 2007 4:44 am
Location: Texas

Re: CustomButton and ImageBundles don't display in design wi

Postby Eric Clayberg » Mon Jul 30, 2007 12:11 pm

SoulDad57 wrote:My application works fine, but the buttons do not display properly in the design window or the preview window. Instead a generic text label of the button class name is displayed on a pink background.

That means that the widget threw an exception and a placeholder is being used rather than the actual component.

Your ".log" file should indicate the reason.

Feel free to send us a test case and your complete Eclipse ".log" file.
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

Re: CustomButton and ImageBundles don't display in design wi

Postby SoulDad57 » Tue Jul 31, 2007 9:06 am

There is no trace in the '.log' file.

Here is the only Java code required for a test case:
Code: Select all
public class ImageViewer implements EntryPoint {
   public void onModuleLoad() {
      RootPanel rootPanel = RootPanel.get();

      final Images theBundle = (Images)GWT.create(Images.class);
      final PushButton pushButton = new PushButton("Up text", "Down text");
      pushButton.getUpHoveringFace().setImage(theBundle.downFace().createImage());
      pushButton.getUpFace().setImage(theBundle.upFace().createImage());
      pushButton.getDownFace().setImage(theBundle.downFace().createImage());
      rootPanel.add(pushButton, 49, 71);
      pushButton.addClickListener(new ClickListener() {
         public void onClick(final Widget sender) {
            Window.alert("RING RING!");
         }
      });
      pushButton.setStyleName("my-Pushbutton");
   }
   
    public interface Images extends ImageBundle {
       
       /**
        *
        * @gwt.resource com/cisco/buttontest/public/button.png
        */
          AbstractImagePrototype upFace();
          
       /**
        *
        * @gwt.resource com/cisco/buttontest/public/button-down.png
        */
          AbstractImagePrototype downFace();
          

    }

}


I can send you the zipped project folder if you like, it's small (250K).


Eric Clayberg wrote:
SoulDad57 wrote:My application works fine, but the buttons do not display properly in the design window or the preview window. Instead a generic text label of the button class name is displayed on a pink background.

That means that the widget threw an exception and a placeholder is being used rather than the actual component.

Your ".log" file should indicate the reason.

Feel free to send us a test case and your complete Eclipse ".log" file.
SoulDad57
 
Posts: 15
Joined: Wed May 16, 2007 4:44 am
Location: Texas

Re: CustomButton and ImageBundles don't display in design wi

Postby Eric Clayberg » Wed Aug 01, 2007 4:17 am

Give this a try in the latest build.

We added support for @gwt.resource JavaDoc tags.
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

Re: CustomButton and ImageBundles don't display in design wi

Postby SoulDad57 » Thu Aug 02, 2007 11:28 am

That fixed it , thanks!

Eric Clayberg wrote:Give this a try in the latest build.

We added support for @gwt.resource JavaDoc tags.
SoulDad57
 
Posts: 15
Joined: Wed May 16, 2007 4:44 am
Location: Texas

Re: CustomButton and ImageBundles don't display in design wi

Postby Eric Clayberg » Thu Aug 02, 2007 11:57 am

SoulDad57 wrote:That fixed it , thanks!

Good! :-)
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


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests