Having a main figure with children figures outside of the main figure's bounds [message #205209] |
Tue, 13 December 2005 21:05 |
Eclipse User |
|
|
|
Originally posted by: cmahoney.ca.ibm.com
Hello,
I would like to support a generic "bordered" figure. That is, a main figure
that can have figures around its border, call them "border item figures".
The border item figures have a locator to determine where they are relative
to the main figure. Consider the LED figure, the main figure is the LED box
and the border item figures are the terminals. A label could also be a
border item figure, similar to the labels on a connection in GEF.
We currently have implemented this so that the bounds of the bordered figure
is actually the bounds of the main figure. The problems have to do with the
border
item figures not being included in the bordered figure's bounds.
Specifically,
- when these bordered figures are layed out within a container with a flow
layout,
their border items are not taken into account for size so the figure may not
be
given enough space for the border items.
- we have to handle making sure the border items are repainted when
appropriate
as they lie outside the bounds of their parent figure
To resolve this, I am trying to make the bounds of the bordered figure
include the bounds of the border items similar to how GEF's
PolylineConnection includes the bounds of all its labels. This easily
resolves the
issues previously mentioned; however, there are now a few other issues which
I am in
the process of resolving:
- when a new border item is added I want to make the bordered figure larger
- when the shape is resized I have to propogate the resizing to the main
figure
- aligning the bordered shapes will align based on the border item boundary
which is not what I want
I am slowly resolving these issues, but I'm wondering if I'm taking the best
approach.
Any ideas for a simpler way to do this?
Thanks,
Cherie Mahoney
|
|
|
Powered by
FUDForum. Page generated in 0.02601 seconds