[英]how to create Graphiti shapes with scroll bar
我已經找到了這個問題的答案。
這是要使用的鏈接: https : //www.eclipse.org/forums/index.php/t/1071551/
我創建了自己的ScrollFigure,它擴展了draw2d ScrollPane並實現了IGraphicsAlgorithmRenderer。
public class ScrollFigure extends ScrollPane implements IGraphicsAlgorithmRenderer {
@Override
public void setLayoutManager(LayoutManager manager) {
super.setLayoutManager(new ScrollPaneLayout());
}
}
接下來,您只需要在自定義工廠中調整圖形的大小,即可實例化ScrollFigure,然后將顯示滾動條。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.