Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » canExecute() method give some problems
canExecute() method give some problems [message #174461] Wed, 30 March 2005 10:01
Eclipse UserFriend
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.
Previous Topic:property change notification
Next Topic:PolygonDecoration Incorectly Painted
Goto Forum:
  


Current Time: Fri Apr 26 17:58:41 GMT 2024

Powered by FUDForum. Page generated in 0.02679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top