[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: problem with flowLayoutEditPolicy

Hello Randy:
I want to use FlowLayoutEditPolicy with ToolbarLayout, but it throws a
ClassCastException. I have to override isHorizontal() to avoid this, now it
works fine. I wonder if it it the proper way.

Regards
Hao


"Randy Hudson" <none@xxxxxxxxxx> дÈëÓʼþ news:bgbptt$jnu$1@xxxxxxxxxxxxxx
> FlowLayoutEditPolicy should be used with either FlowLayout or
ToolbarLayout.
> In both cases, you never call setBounds() on a figure, only the layout
does
> this.
>
> "Brian Fernandes" <brian.fernandes@xxxxxxxxxx> wrote in message
> news:bgbep2$6ji$1@xxxxxxxxxxxxxx
> > For one of my objects, I'm using a flowLayoutEditPolicy.
> >
> > So far I've overridden the getCreateCommand similar to that in
> > LogicFlowEditPolicy.
> >
> > What I need is to position my children objects such that they are within
> the
> > parent. (obviously) So am I supposed to get the location of the parent
and
> > then position the child ? Should I do this in the createFigure of the
> > childrens edit parts ? What about the repositioning of the other edit
> parts
> > ? or is it that everytime an element gets added, we go call
refreshVisuals
> > which goes through all the children and repositions them according to
> their
> > indices ? (would there be a problem accomodating objects of different
> sizes
> > here ? )
> >
> >
> > Flow layout is supposed to detect the index automatically, so how does
it
> > manage this ? If I manage to position the child object properly, just
> using
> > createFigure, is that enough for the edit policy ? Also,  the marker
that
> > needs to be drawn is being drawn at the top left corner of the screen (a
> > short thick diagonal line), irrespective of where the object (which has
> the
> > flowLayoutEditPolicy) is being drawn.
> > This seems to indicate that I'm doing something wrong with this
object...
> or
> > with the children perhaps ?
> >
> > Thanks,
> > Brian.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>