Hi,
I have a composite widget made of a textbox and a custom widget, which are then added to a verticalPanel. I created this custom widget using Raphael JS.
Now i want this Composite widget to recognize both click event and also the ctrl event. I tried implementing clicklistener in both the classes with no fruitful results.
here is the code lay-out:
This class creates the custom widget from Raphael JS:
public class CustomShapeRet extends RaphaelJSWidget{
public CustomShapeRet(){
super();
Rectangle r = new Rectangle(10, 10, 50, 20);
r.attr("stroke", "black");
r.attr("stroke-width", "5");
}
}
This class here creates the composite widget:
public class Test extends Composite{
public Test(){
TextBox t1 = new TextBox();
t1.setSize("100px", "20px");
t1.setText("Hi");
t1.setTitle("textbox");
CustomShapeRet r = new CustomShapeRet();
r.setTitle("rec");
VerticalPanel v1 = new VerticalPanel();
v1.setStyleName("vertical");
v1.add(r);
v1.add(t1);
initWidget(v1);
}
}
Question: Is there a way to get this working? and what would be your recommendation?
Thank you.