RollOver effect and Custom Property Editors

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

RollOver effect and Custom Property Editors

Postby vampie » Mon Nov 06, 2006 11:27 am

are there anyway to set rollover effect and adding new custom based events
to list?

I have been using Echostudio to test, and i could not add My Custom Class
Property Editors to the Property Sheet. Is it possible on GWT and your designer
vampie
 
Posts: 89
Joined: Mon Nov 06, 2006 10:18 am

Postby Konstantin.Scheglov » Tue Nov 07, 2006 12:49 am

Echostudio? Do you mean this http://www.nextapp.com/platform/echo1/echostudio/ ? It is not related with GWT or GWT Designer.

What kind of property editors do you want? Can you give examples? We have support for custom property editors in our Swing and SWT Designer's, so we can add something like with for GWT (most probably same as for SWT because Eclipse is SWT based, so SWT is native for us). But I would like to see what you want first to decide if we will want something valuable for you.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Custom Property Editors

Postby vampie » Tue Nov 07, 2006 5:49 am

>Echostudio? Do you mean this >http://www.nextapp.com/platform/echo1/echostudio/ ? It is not related with >GWT or GWT Designer.

No please look echo2.. it is related with ajax... Echo1 is old.

>What kind of property editors do you want? Can you give examples? We >have support for custom property editors in our Swing and SWT Designer's, >so we can add something like with for GWT

For example i need to have jbuilder style QueryDataset. I have written
some library for fetching data and JBuilder like dbSwing componets ( data
aware components )

To be more specific, I need to have property editor that is inherited from
JPanel... I have PBDBConnection class derived from Connection. in this editor i need JDBC URL Text Edit, JDBC jar class path textedit.. and so on..

Is it possible to write such property editors and make them shown in your property sheet ?

Thx in advance...
vampie
 
Posts: 89
Joined: Mon Nov 06, 2006 10:18 am

Re: Custom Property Editors

Postby Konstantin.Scheglov » Tue Nov 07, 2006 11:52 pm

vampie wrote:>For example i need to have jbuilder style QueryDataset. I have written
some library for fetching data and JBuilder like dbSwing componets ( data
aware components )

To be more specific, I need to have property editor that is inherited from
JPanel... I have PBDBConnection class derived from Connection. in this editor i need JDBC URL Text Edit, JDBC jar class path textedit.. and so on..

Is it possible to write such property editors and make them shown in your property sheet ?

Thx in advance...


In general yes, this is possible. But I don't understand why you speak about JBuilder, JPanel and Swing at all. I can see only two GUI toolkits: SWT (because Eclipse is SWT based) and GWT (because we support GWT). So, why Swing?

Here is old topic about custom property editors and SWT in our forum: http://www.instantiations.com/forum/viewtopic.php?t=756&highlight=custom+property
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: RollOver effect and Custom Property Editors

Postby Konstantin.Scheglov » Wed Nov 08, 2006 1:41 am

vampie wrote:are there anyway to set rollover effect and adding new custom based events
to list?


Keep in mind that GWT is different from just using JavaScript for adding some effect. In GWT you can write special widgets that support needed functionality. For example, see below simple subclass of Hyperlink that has rollover effect for image. In general you can do anything in onBrowserEvent(), for example change style (using addStyleName() or setStyleName()) and use CSS to change look of your widget.

Code: Select all
/**
* Simple {@link Hyperlink} with rollover effect for image.
*
* @author scheglov_ke
*/
public class RolloverImageHyperlink extends Hyperlink {
   private final Image m_image = new Image();
   private String m_normalURL;
   private String m_hotURL;
   ////////////////////////////////////////////////////////////////////////////
   //
   // Constructor
   //
   ////////////////////////////////////////////////////////////////////////////
   public RolloverImageHyperlink() {
      DOM.insertChild(getElement(), m_image.getElement(), 0);
      m_image.unsinkEvents(Event.ONCLICK | Event.MOUSEEVENTS);
      sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS);
   }
   ////////////////////////////////////////////////////////////////////////////
   //
   // Images
   //
   ////////////////////////////////////////////////////////////////////////////
   public void setNormalURL(String normalURL) {
      m_normalURL = normalURL;
      m_image.setUrl(m_normalURL);
   }
   public void setHotURL(String hotURL) {
      m_hotURL = hotURL;
   }
   ////////////////////////////////////////////////////////////////////////////
   //
   // Events
   //
   ////////////////////////////////////////////////////////////////////////////
   public void onBrowserEvent(Event event) {
      super.onBrowserEvent(event);
      switch (DOM.eventGetType(event)) {
         case Event.ONMOUSEOVER : {
            m_image.setUrl(m_hotURL);
            break;
         }
         case Event.ONMOUSEOUT : {
            m_image.setUrl(m_normalURL);
            break;
         }
      }
   }
}


And test case for it, don't forget to add your own images.

Code: Select all
public class ImageViewer implements EntryPoint {
   final RootPanel rootPanel = RootPanel.get();
   public void onModuleLoad() {
      {
         final RolloverImageHyperlink rolloverImageHyperlink = new RolloverImageHyperlink();
         rootPanel.add(rolloverImageHyperlink, 153, 188);
         rolloverImageHyperlink.setText("New hyperlink");
         rolloverImageHyperlink.setNormalURL("radio_button.gif");
         rolloverImageHyperlink.setHotURL("check_box.gif");
      }
   }
}
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Postby vampie » Wed Nov 08, 2006 12:49 pm

I just give example about what kind of Property Editors I want. I do not code in swing right now. I am trying to use gwt Like swingset.sf.net DB widgets.
I want to implement them in GWT. I am comparing GWT and Echo2 ajax
frameworks...

Thx for the help so far.
vampie
 
Posts: 89
Joined: Mon Nov 06, 2006 10:18 am

Postby Eric Clayberg » Thu Nov 16, 2006 1:46 pm

Are you saying that you want to actually implement custom property editors in GWT itself?
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 vampie » Sat Nov 18, 2006 10:58 am

No I want to implement new db aware beans like swingset.sf.net...
vampie
 
Posts: 89
Joined: Mon Nov 06, 2006 10:18 am

Postby Eric Clayberg » Sun Nov 19, 2006 1:26 pm

vampie wrote:No I want to implement new db aware beans like swingset.sf.net...

What toolkit do you want to use in order to create your custom property editors?
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 vampie » Mon Nov 20, 2006 9:04 am

Sure i want to use GWT but not sure if gwt support custom property editors same like JBuilder or Netbeans. If not i will try to implement. Does Gwt designer's property sheet have support for Custom Editors ?
vampie
 
Posts: 89
Joined: Mon Nov 06, 2006 10:18 am


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests