2010-11-10 77 views

回答

3

如果这种观点是你尝试用

public void createPartControl(Composite parent){ 
    parent.getParent().addControlListener(new ControlAdapter(){ 
     public void controlMoved(ControlEvent e) {} 
    }); 
} 

如果它内置鉴于

WorkbenchPartReference ref = (WorkbenchPartReference) UIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().findViewReference("viewID"); 
    Control control = ref.getPane().getControl(); 
    control.addControlListener(new ControlAdapter(){ 
     @Override 
     public void controlMoved(ControlEvent e) { 

     } 
    });