how to create Graphiti shapes with scroll bar

117 Views Asked by At

My Graphiti editor has shape that represents db table with it rows.. i am looking for a way to add scroll bar to my shape. any one know how to do that? enter image description here

1

There are 1 best solutions below

0
On

I've found an answer to this question.

This is the link to use: https://www.eclipse.org/forums/index.php/t/1071551/

I've created my own ScrollFigure, which extends draw2d ScrollPane and implements IGraphicsAlgorithmRenderer.

    public class ScrollFigure extends ScrollPane implements IGraphicsAlgorithmRenderer {
    @Override
    public void setLayoutManager(LayoutManager manager) {
        super.setLayoutManager(new ScrollPaneLayout());
    }
}

Next you just have to adjust sizes of your figures in your custom factory, which instantiates your ScrollFigure, and scrollbars will be shown.