Remove scrolling in the compartment (nodes shall stay within compartment bounds) [message #113913] |
Fri, 23 March 2007 05:58  |
Eclipse User |
|
|
|
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 10:22  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02525 seconds