Selection Behavior problems [message #1385365] |
Thu, 05 June 2014 16:27  |
Eclipse User |
|
|
|
Hi all,
I've a shape like this:
- invisible rectangle
- ellipse
- text
I want only the ellipse and text to be clickable. Following your tutorial http://help.eclipse.org/juno/topic/org.eclipse.graphiti.doc/resources/docu/gfw/selection-behavior.htm?cp=30_1_4_6 I've override the method getClickArea as below (this is just a test):
@Override
public GraphicsAlgorithm[] getClickArea(PictogramElement pe) {
if (pe instanceof ContainerShape) {
GraphicsAlgorithm[] graphicsAlgorithmsList = new GraphicsAlgorithm[100];
int i =0;
for (Shape shape : ((ContainerShape) pe).getChildren()) {
if(shape.getGraphicsAlgorithm().getLineVisible()){
graphicsAlgorithmsList[i++]=shape.getGraphicsAlgorithm();
}
}
return graphicsAlgorithmsList;
}
return super.getClickArea(pe);
}
but even if this return the ellipse and text, I can still click on the invisible rectangle.
What I am doing wrong here?
Thanks for your help
Simone
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05983 seconds