canExecute() method give some problems [message #174461] |
Wed, 30 March 2005 10:01 |
Eclipse User |
|
|
|
Originally posted by: jdelgad.correo.ugr.es
Hi all,
I want to allow that a figure can have several input connections. I
have created the following canExecute() method:
public boolean canExecute() {
if (target != null) {
Vector conns = target.getConnections();
Iterator i = conns.iterator();
while (i.hasNext()) {
Arrow conn = (Arrow)i.next();
if (targetTerminal != null &&
conn.getTargetTerminal() !=
null)
if (conn.getTargetTerminal().equals(targetTerminal) &&
conn.getTarget().equals(source))
return false;
}
}
return true;
}
This code allows to create several input connections, but when I close
the file and I reopen it, only one input connection is created correctly
and the others have an incorrect end position (but all the same). Why this
ocurrs?
Thank you very much.
--Jose.
|
|
|
Powered by
FUDForum. Page generated in 0.02679 seconds