开发者

How to detect the resize of a view in Eclipse

开发者 https://www.devze.com 2023-02-07 10:54 出处:网络
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 resi

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

精彩评论

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