开发者

How to detect the resize of a view in Eclipse

When we double click on any view in eclipse or we resize it,how to detect the scenario in code. Currently my piece o开发者_StackOverflow中文版f code is extending ViewPart,now how can I detect the resizing in view.


Try this:

@Override
public void createPartControl(final Composite parent) {

    parent.addControlListener(new ControlAdapter() {
        @Override
        public void controlResized(final ControlEvent e) {
            System.out.println("RESIZE");
        }
    });
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜