Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Query Regarding Custom Layout
Query Regarding Custom Layout [message #154323] Sat, 16 October 2004 00:52 Go to next message
Eclipse UserFriend
Originally posted by: zenilnh.infotech.stph.net

Hi ,

I am trying to implement this feautre. I got a GEF editor containing
Collapsible containers.These containers can have other containers and leaf
elments.Take for example
RootContainer
SubContainer1[Minimized state]
LeafElement1
SubContainer11
SubContainer2..[maximized state]
LeafElement2
SubContainer21

Now when i expand SubContainer1,i want SubContainer2 to move out from its
position relative to Subcontainer1,(sort of make way for
SubContainer1),and when i collapse it Subcontainer2(along with all its
children) should come back to its position relative to SubContainer1..

Right now when i expand/collapse a container,it overlaps on other elemnts
nearby(using XYLayout now)..Can XYlayout be customized to do this
behaviour??Or should i write a custom layout??If so what should i
concentrate on??

Thanks
Zenil
Re: Query Regarding Custom Layout [message #154421 is a reply to message #154323] Mon, 18 October 2004 17:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It's hard to imagine what you want these two containers to look like, but
you may be able to use existing layout managers. For example, the Palette
drawers are implemented using some of the included layouts in draw2d.
"Zenil" <zenilnh@infotech.stph.net> wrote in message
news:ckprca$j15$1@eclipse.org...
> Hi ,
>
> I am trying to implement this feautre. I got a GEF editor containing
> Collapsible containers.These containers can have other containers and leaf
> elments.Take for example
> RootContainer
> SubContainer1[Minimized state]
> LeafElement1
> SubContainer11
> SubContainer2..[maximized state]
> LeafElement2
> SubContainer21
>
> Now when i expand SubContainer1,i want SubContainer2 to move out from its
> position relative to Subcontainer1,(sort of make way for
> SubContainer1),and when i collapse it Subcontainer2(along with all its
> children) should come back to its position relative to SubContainer1..
>
> Right now when i expand/collapse a container,it overlaps on other elemnts
> nearby(using XYLayout now)..Can XYlayout be customized to do this
> behaviour??Or should i write a custom layout??If so what should i
> concentrate on??
>
> Thanks
> Zenil
>
Re: Query Regarding Custom Layout [message #154487 is a reply to message #154421] Mon, 18 October 2004 20:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zenilnh.infotech.stph.net

Hi Randy,

I need some more inputs.I have attached a screen shot explaining what i am
trying to do.
Does this specify the problem better??Now for solving this problem
should i go for a)try to customize some exisitng layouts b)creating my own
layout from scratch [if none of the existing layouts can be customized]
c)instead of using layouts,use an XYLayout,listen for expansion/collapsion
events,and try to compute the constraints and place my figures accordingly..

Thanks
Zenil

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cl0shi$vtt$1@eclipse.org...
> It's hard to imagine what you want these two containers to look like, but
> you may be able to use existing layout managers. For example, the Palette
> drawers are implemented using some of the included layouts in draw2d.
> "Zenil" <zenilnh@infotech.stph.net> wrote in message
> news:ckprca$j15$1@eclipse.org...
> > Hi ,
> >
> > I am trying to implement this feautre. I got a GEF editor containing
> > Collapsible containers.These containers can have other containers and
leaf
> > elments.Take for example
> > RootContainer
> > SubContainer1[Minimized state]
> > LeafElement1
> > SubContainer11
> > SubContainer2..[maximized state]
> > LeafElement2
> > SubContainer21
> >
> > Now when i expand SubContainer1,i want SubContainer2 to move out from
its
> > position relative to Subcontainer1,(sort of make way for
> > SubContainer1),and when i collapse it Subcontainer2(along with all its
> > children) should come back to its position relative to SubContainer1..
> >
> > Right now when i expand/collapse a container,it overlaps on other
elemnts
> > nearby(using XYLayout now)..Can XYlayout be customized to do this
> > behaviour??Or should i write a custom layout??If so what should i
> > concentrate on??
> >
> > Thanks
> > Zenil
> >
>
>


  • Attachment: problem.GIF
    (Size: 148.41KB, Downloaded 96 times)
Re: Query Regarding Custom Layout [message #154502 is a reply to message #154487] Mon, 18 October 2004 20:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

That looks like a tough problem and one that I haven't seen solved. Perhaps
you could use something like SWT's FormLayout. So instead of generating XY
constriants, you are generating attachements and offsets to nearby objects.
When the attachment moves, it pushes the other objects away.
Re: Query Regarding Custom Layout [message #154534 is a reply to message #154502] Mon, 18 October 2004 22:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zenilnh.infotech.stph.net

Thanks Randy,
Something for me to move forward with..

Randy Hudson wrote:

> That looks like a tough problem and one that I haven't seen solved. Perhaps
> you could use something like SWT's FormLayout. So instead of generating XY
> constriants, you are generating attachements and offsets to nearby objects.
> When the attachment moves, it pushes the other objects away.
Re: Query Regarding Custom Layout [message #155532 is a reply to message #154534] Tue, 26 October 2004 05:21 Go to previous messageGo to next message
Dhiraj  is currently offline Dhiraj Friend
Messages: 18
Registered: July 2009
Junior Member
Hi Zenil,
Maybe it's a long time since you posted it. But hope it helps.
We had a similar requirement and we did solve it using the basic
ToolbarLayout provided by Draw2D. For this we extended the basic
Figure class (I'll call this MinimizableFigure) and overrode the
computeSize() method to return the size depending on it's state
(maximized or minimized). So the new Figure would return (0,0)
if it is collapsed size else the normal size.
So each of the figures would be instances of this
MinimizableFigure and when you want to collapse you would set
the state of the MinizimizableFigure to "Collapsed" and would
hide it. All the siblings at one level would be arranged using
ToolbarLayout vertically.


Zenil wrote:

> Thanks Randy,
> Something for me to move forward with..

> Randy Hudson wrote:

> > That looks like a tough problem and one that I haven't seen solved.
Perhaps
> > you could use something like SWT's FormLayout. So instead of generating XY
> > constriants, you are generating attachements and offsets to nearby objects.
> > When the attachment moves, it pushes the other objects away.
Re: Query Regarding Custom Layout [message #155718 is a reply to message #155532] Tue, 26 October 2004 15:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

He needs the figures to push things away in multiple directions on a plane,
not just in one direction such as the palette drawers.

One solution might be to use a CompoundDirectedGraphLayout. But this
wouldn't give users as much freedom to position nodes.

"Dhiraj" <dhiraj@gmail.com> wrote in message
news:clkmse$459$1@eclipse.org...
> Hi Zenil,
> Maybe it's a long time since you posted it. But hope it helps.
> We had a similar requirement and we did solve it using the basic
> ToolbarLayout provided by Draw2D. For this we extended the basic
> Figure class (I'll call this MinimizableFigure) and overrode the
> computeSize() method to return the size depending on it's state
> (maximized or minimized). So the new Figure would return (0,0)
> if it is collapsed size else the normal size.
> So each of the figures would be instances of this
> MinimizableFigure and when you want to collapse you would set
> the state of the MinizimizableFigure to "Collapsed" and would
> hide it. All the siblings at one level would be arranged using
> ToolbarLayout vertically.
>
>
> Zenil wrote:
>
> > Thanks Randy,
> > Something for me to move forward with..
>
> > Randy Hudson wrote:
>
> > > That looks like a tough problem and one that I haven't seen solved.
> Perhaps
> > > you could use something like SWT's FormLayout. So instead of
generating XY
> > > constriants, you are generating attachements and offsets to nearby
objects.
> > > When the attachment moves, it pushes the other objects away.
>
>
Re: Query Regarding Custom Layout [message #156150 is a reply to message #155718] Fri, 29 October 2004 23:11 Go to previous message
Eclipse UserFriend
Originally posted by: zenilnh.infotech.stph.net

Hi Dhiraj and Randy,

Thanks for the inputs..Dhiraj,the ToolbarLayout solution is okey,but again
its in one direction..vertical/horizontal...
And I dont want to use CompoundedDirectedGraphLayout as i dont want to
layout things fully..And i dont want to write heavy-duty layout schemes like
FormLayout..

So here's what I am doing..As soon as user minimizes/maximizes a figure,i
based on a set of rules,recompute the positions of other figures in the
same parent.and lays it out.My goal is when u minimize,i want other figures
which are to the right/bottom of the minimized figure to "close in" near to
the mnimized figure.And when u maximize,i want figures to right/bottom to
"move out" in their respective directions if their current location
intersects with the bounds of the maximised figure..
Basically I think its just a set of computations that i should get
right,calculate each figure's initial state,each figure's final state,
pass it to the GraphAnimation routine in Flow example,and there..I get a
fantastic animated layout ..:)-[Infact i have almost achieved my goals..]

Cheers to GEF...

Rgds,
Zenil

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cllph0$fgt$1@eclipse.org...
> He needs the figures to push things away in multiple directions on a
plane,
> not just in one direction such as the palette drawers.
>
> One solution might be to use a CompoundDirectedGraphLayout. But this
> wouldn't give users as much freedom to position nodes.
>
> "Dhiraj" <dhiraj@gmail.com> wrote in message
> news:clkmse$459$1@eclipse.org...
> > Hi Zenil,
> > Maybe it's a long time since you posted it. But hope it helps.
> > We had a similar requirement and we did solve it using the basic
> > ToolbarLayout provided by Draw2D. For this we extended the basic
> > Figure class (I'll call this MinimizableFigure) and overrode the
> > computeSize() method to return the size depending on it's state
> > (maximized or minimized). So the new Figure would return (0,0)
> > if it is collapsed size else the normal size.
> > So each of the figures would be instances of this
> > MinimizableFigure and when you want to collapse you would set
> > the state of the MinizimizableFigure to "Collapsed" and would
> > hide it. All the siblings at one level would be arranged using
> > ToolbarLayout vertically.
> >
> >
> > Zenil wrote:
> >
> > > Thanks Randy,
> > > Something for me to move forward with..
> >
> > > Randy Hudson wrote:
> >
> > > > That looks like a tough problem and one that I haven't seen solved.
> > Perhaps
> > > > you could use something like SWT's FormLayout. So instead of
> generating XY
> > > > constriants, you are generating attachements and offsets to nearby
> objects.
> > > > When the attachment moves, it pushes the other objects away.
> >
> >
>
>
Previous Topic:Popup feedback for disallowed connections
Next Topic:[JOB] Experienced Eclipse Programmers needed (Redwood City CA)
Goto Forum:
  


Current Time: Fri Apr 26 02:56:00 GMT 2024

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

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

Back to the top