jamesoliverband / umlet

Automatically exported from code.google.com/p/umlet
0 stars 0 forks source link

changing relation attributes from code #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. access a stored reference to one of the relation elements in the currently 
open diagram
2. call setAdditionalAttributes(with the new line points)
3. relation now has more points added instead of a reset to new points

What is the expected output? What do you see instead?
Expected:line adjusts to new parameters
Instead:adds more points to the line

What version of the product are you using? On what operating system?
Umlete 12.0 Mac Os X 10.8.3

Please provide any additional information below.
using to build a user interface for editing multi-agent elements during runtime 
in AI research.

I grab the components of the UMLET GUI's mainFrame() and stick them in my own 
panel. I then create a uxf representation of my data and call open(filename). 
Next I grab all the GridElements that match my objects and collect a reference 
for the objects.

Using customElementImpl I am trying to create min/maximize functionality but am 
stuck trying to move the relations properly (setting JComponent size doesn't 
seem to help either as the graphics seem to just draw outside the bounds) 
however both of set/changeLocation() work fine.

I would suggest including a boolean parameter in setAdditionalAttributes(bool 
b) to indicate whether we want to add points or reset them but maybe I'm wrong. 
Any other suggestion for how to approach this would be appreciated (I also 
tried removing the relation element and adding my own but was met with 
threading exceptions).

Thanks!

Original issue reported on code.google.com by TJAur...@gmail.com on 8 Jul 2013 at 9:20

GoogleCodeExporter commented 9 years ago
Hi

The Relation code is one of the oldest code parts of the program and we don't 
want to touch it as long as it works.
Perhaps you should try to remove the points before setting the additional 
attributes with "relation.getLinePoints().clear()"

Original comment by AFDiaX on 10 Jul 2013 at 7:18

GoogleCodeExporter commented 9 years ago
Hey,

Thanks so much that worked brilliantly, I did manage to get removing/adding 
elements to work but the whole process was way too slow.

Not sure how to close this sorry :(

- Tristan

Original comment by TJAur...@gmail.com on 11 Jul 2013 at 3:58

GoogleCodeExporter commented 9 years ago
-the whole process was way too slow.
Sorry to hear that

-Not sure how to close this
I will close it for you (and mark it as invalid because it's not really a bug 
which has been fixed)

Original comment by AFDiaX on 11 Jul 2013 at 5:57

GoogleCodeExporter commented 9 years ago
Sorry, think i should clarify (wrote that on the bus today), the 
adding/removing elements is plenty quick if you have an element hanging around 
like i do now in my tree, it was the waiting for the new Relation() constructor 
that was too slow for my purposes but the whole thing works great now! Really 
nice tool you guys have here!

- Tristan

Original comment by TJAur...@gmail.com on 11 Jul 2013 at 6:17

GoogleCodeExporter commented 9 years ago
sounds better now :D
good to hear, thanks!

Original comment by AFDiaX on 11 Jul 2013 at 6:33