Scrollable figures [message #1712619] |
Mon, 26 October 2015 15:16  |
Eclipse User |
|
|
|
Hi,
So I've been doing some research into my 'canvas within canvas' problem and one possible solution for me would be to have a shape with scrollbars.
From a previous post from a few years ago, it seems like there is no support for scrollable components out of the box.
I did some more digging and here I found that Graphiti supports the display of GEF/Draw2d figures in Graphiti diagrams. Draw2d has ScrollPane/ScrollBar/ViewPort Figures. Does that mean that there should be a way for me to display a scrollpane?
Is my idea at all possible? If so, can someone (Michael?) point me in the right direction for an implementation?
Thanks again!
Raf
|
|
|
|
|
|
|
|
|
|
|
|
Re: Scrollable figures [message #1732010 is a reply to message #1726236] |
Wed, 11 May 2016 12:22  |
Eclipse User |
|
|
|
I am sorry to bother you, but can you provide more detailed explanation on how to implement scroll bar in a shape, please. I still have some difficulties with understanding these Layout isssues, and I still get brown rectangular area instead of scrollable area.
Thanks in advance.
UPD: I've already understood the problem, and fixed it.
That's an answer:
public class ScrollFigure extends ScrollPane implements IGraphicsAlgorithmRenderer {
@Override
public void setLayoutManager(LayoutManager manager) {
super.setLayoutManager(new ScrollPaneLayout());
}
}
[Updated on: Fri, 13 May 2016 07:53] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05062 seconds