Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Custom Button
Custom Button [message #668579] Fri, 06 May 2011 06:19 Go to next message
Oussema  is currently offline Oussema
Messages: 11
Registered: April 2011
Junior Member
Hello,
I'm using GWT Designer which is based on WindowBuilder and I developped a custom button which is base on a GXT Button.

package com.mycompany.project.client;
import com.extjs.gxt.ui.client.widget.button.Button;
public class MyButton extends Button{
Button button=new Button();
public MyButton() {}
public void invocation(){
}
@Override
public void setVisible(boolean visible) {
if (visible) {
show();
} else {
hide();
}}}

I added in the folder wbp-meta the file MyButton.wbp-component.xml with the same path of the module.

My problem is that i want to add a property "Visible" in the designer which will call the method setVisible(java.lang.Boolean).

MyButton.wbp-component.xml looks like that
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="http://www.instantiations.com/D2/WBPComponent">
<creation>
<source><![CDATA[new com.mycompany.project.client.MyButton()]]></source>
<invocation signature="invocation()"/>
</creation>
<property id="setVisible(java.lang.Boolean)">
<category value="preferred"/>
</property>
</component>


I think that this is related to the method setVisible but i didn't identified the problem
Could some one help me please?
Thanks a lot for your help


Best Regards
--
Oussema
Re: Custom Button [message #668621 is a reply to message #668579] Fri, 06 May 2011 09:04 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
Use setVisible(boolean) signature.
Alternatively, you can just use
<properties-preferred names="visible"/>


Konstantin Scheglov,
Google, Inc.
Re: Custom Button [message #668639 is a reply to message #668621] Fri, 06 May 2011 10:21 Go to previous message
Oussema  is currently offline Oussema
Messages: 11
Registered: April 2011
Junior Member
Thanks a lot for your help Very Happy
This is exactly what i want

Best regards

--
Oussema
Previous Topic:Bundle ClassLoader Question
Next Topic:Custom contextual menu for component
Goto Forum:
  


Current Time: Thu Aug 21 06:23:03 EDT 2014

Powered by FUDForum. Page generated in 0.01611 seconds