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");
}
});
}
精彩评论