[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Layout of Figures

Yes, I think this will work if you make A and B editparts children of the
EditPart C.  Why do you not want them to be children of C?  Are your A and B
model objects not children of C?  If that is the case, why are A and B
figures inside C?

I am not sure anymore if you are using GEF as was intended.  The EditPart
heirarchy should already be replicating the model heirarchy.  All you need
to do is provide the root EditPart with the right factory.  You shouldn't
have to add figures A and B to C.  That should be done for you behind the
scenes as well.  What layout you use in C is irrelevant.


"Evon" <snowice@xxxxxxxxxxxx> wrote in message
news:bu25n2$u5i$1@xxxxxxxxxxxxxx
> Hi,
>   Not exactly, what i meant is i've used a layout manager, for example, a
> ToolBarLayout to layout my figures.
>
> A rough psuedo code....
>
> Figure A, B, C;
> C.setLayoutManager(new ToolBarLayout());
> C.add(A),
> C.add(B)
>
> So on the editor, 1 figure, C will appear and it's selectable. The figures
> inside it, namely A and B are not. Is this the correct behaviour? In order
> to select B and C, are there other ways other than making the editparts of
> A and B the children of C?
>
> Thanks...
>
> Pratik Shah wrote:
>
> > Okay, let me first make sure I understand you correctly.  You have
editparts
> > A and B which are children of C.  Hence, the figures of A and B are
inside
> > the figure of C.
>
> > When you click on C, only C is supposed to be selected.  And so I assume
> > that is working as you expect it to.  What you are saying is that even
when
> > you click on A and B, they don't get selected.  Only C does.  Is that
right?
>
> > I am not sure what would cause this, but here are a couple of things to
> > check.  Are those editparts returning a SelectEditPartTracker in the
> > getDragTracker() method?  Are they returning true for isSelectable()?
>
>
>
> > "Evon" <snowice@xxxxxxxxxxxx> wrote in message
> > news:bu0uuf$d6f$1@xxxxxxxxxxxxxx
> > > Hi,
> > >   If i have used a layout manager to layout my figures. For example,
> > >
> > >   C
> > >   --------------------
> > >   | &&&&&&&  &&&&&&& |
> > >   | &  A  &  &  B  & |
> > >   | &     &  &     & |
> > >   | &&&&&&&  &&&&&&& |
> > >   --------------------
> > >
> > > Figure C is layout figure A and figure B, each with its own model and
> > > editpart.
> > >
> > > On the editor, when i click on the Figure, only Figure C is
highlighted,
> > > but A and B is not.
> > >
> > > How do i layout the figures but at the same time, let them remains
> > > selectable. Is it possible?
> > >
> > > Thanks in advance!
> > >
>
>