Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Remove scrolling in the compartment (nodes shall stay within compartment bounds)
Remove scrolling in the compartment (nodes shall stay within compartment bounds) [message #113913] Fri, 23 March 2007 09:58 Go to next message
Eclipse UserFriend
Originally posted by: Andrey_Medvedev.epam.com

I want remove gap and scrolling in the compartment.

I removed scrolling handles by this code in the CompartmentFigure:

ScrollPane sp = compartmentFigure.getScrollPane();
sp.getContents().setBorder(new MarginBorder(0, 0, 0, 0));
sp.setEnabled(false);
sp.setScrollBarVisibility(ScrollPane.NEVER);
sp.setVerticalScrollBarVisibility(ScrollPane.NEVER);
sp.getViewport().setContentsTracksHeight(true);

But, I still have possibility to move nodes out of bounds of compartment
figure like this:

--------------
|Compartment |
| |
| ------|--
| | | |
| |node | |
-------------- |
---------

Can I restrict moving nodes out of bounds of compartment figure? Ex. When
I move figure out - it sticks on edges, like this:

--------------
|Compartment |
| --------|
| | |
| | node |
| | |
--------------

Help, pls.
Re: Remove scrolling in the compartment (nodes shall stay within compartment bou [message #114403 is a reply to message #113913] Mon, 26 March 2007 14:22 Go to previous message
Eclipse UserFriend
Originally posted by: Andrey_Medvedev.epam.com

Anybody help me with it? I still need your advice.
It is possible to remove Scrolling in the compartment?

> I want remove gap and scrolling in the compartment.

> I removed scrolling handles by this code in the CompartmentFigure:

> ScrollPane sp = compartmentFigure.getScrollPane();
> sp.getContents().setBorder(new MarginBorder(0, 0, 0, 0));
> sp.setEnabled(false);
> sp.setScrollBarVisibility(ScrollPane.NEVER);
> sp.setVerticalScrollBarVisibility(ScrollPane.NEVER);
> sp.getViewport().setContentsTracksHeight(true);

> But, I still have possibility to move nodes out of bounds of compartment
> figure like this:

> --------------
> |Compartment |
> | |
> | ------|--
> | | | |
> | |node | |
> -------------- |
> ---------

> Can I restrict moving nodes out of bounds of compartment figure? Ex. When
> I move figure out - it sticks on edges, like this:

> --------------
> |Compartment |
> | --------|
> | | |
> | | node |
> | | |
> --------------

> Help, pls.Anyone
Previous Topic:how to update connection figure on property change?
Next Topic:Debugging the GMF generator
Goto Forum:
  


Current Time: Tue Jul 16 20:37:43 GMT 2024

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

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

Back to the top