Hi,
I'm using the following enviroment:
smartgwt 4.0
IE8
JDK 1.6
I'm drawing an DrawImage like this:
final DrawImage img = new DrawImage();
img.setDrawPane(panel);
img.setLeft(50);
img.setTop(300);
img.setWidth(150);
img.setHeight(100);
img.setCanDrag(true);
img.setSrc("http://image-store.slidesharecdn.com/c97d992a-58e4-11e3-9482-12313d174431-large.jpg");
img.showKnobs(KnobType.RESIZE);
img.draw();
img.addDragResizeMoveHandler(new DragResizeMoveHandler() {
public void onDragResizeMove(DragResizeMoveEvent event) {
label.setContents("Image WIDTH= " + event.getNewWidth()
+ " <> Image HEIGHT= " + event.getNewHeight());
}
});
panel.addChild(label);
In the label, I can see that the image coordinates change but the image is not being streched. Why is happening this? Thank you
With DrawTriangle I cannot resize it by using Knobs. I cannot drag the knobs. Does anyone know what I'm doing wrong.
For DrawTriangle this is the code:
final DrawTriangle triangle = new DrawTriangle();
triangle.setDrawPane(drawPane);
triangle.setPoints(new Point(100, 50), new Point(150, 150), new Point(
50, 150));
triangle.setFillColor("white");
triangle.setLineWidth(2);
triangle.setKnobs(KnobType.RESIZE);
triangle.setDrawPane(drawPane);
triangle.setCanDrag(true);
triangle.draw();
I'm using the following enviroment:
smartgwt 4.0
IE8
JDK 1.6
I'm drawing an DrawImage like this:
final DrawImage img = new DrawImage();
img.setDrawPane(panel);
img.setLeft(50);
img.setTop(300);
img.setWidth(150);
img.setHeight(100);
img.setCanDrag(true);
img.setSrc("http://image-store.slidesharecdn.com/c97d992a-58e4-11e3-9482-12313d174431-large.jpg");
img.showKnobs(KnobType.RESIZE);
img.draw();
img.addDragResizeMoveHandler(new DragResizeMoveHandler() {
public void onDragResizeMove(DragResizeMoveEvent event) {
label.setContents("Image WIDTH= " + event.getNewWidth()
+ " <> Image HEIGHT= " + event.getNewHeight());
}
});
panel.addChild(label);
In the label, I can see that the image coordinates change but the image is not being streched. Why is happening this? Thank you
With DrawTriangle I cannot resize it by using Knobs. I cannot drag the knobs. Does anyone know what I'm doing wrong.
For DrawTriangle this is the code:
final DrawTriangle triangle = new DrawTriangle();
triangle.setDrawPane(drawPane);
triangle.setPoints(new Point(100, 50), new Point(150, 150), new Point(
50, 150));
triangle.setFillColor("white");
triangle.setLineWidth(2);
triangle.setKnobs(KnobType.RESIZE);
triangle.setDrawPane(drawPane);
triangle.setCanDrag(true);
triangle.draw();