if (adjustForScrollBar && c.getVerticalBar() != null) width -= c.getVerticalBar().getThumbTrackBounds().width;
if (adjustForScrollBar && c.getVerticalBar() != null) width -= c.getVerticalBar().getThumbTrackBounds().width;
/** * Creates a ControlEditor for the specified Composite. * * @param parent the Composite above which this editor will be displayed * */ public ControlEditor (Composite parent) { this.parent = parent; controlListener = new Listener() { public void handleEvent(Event e) { layout (); } }; for (int i=0; i<EVENTS.length; i++) { parent.addListener (EVENTS [i], controlListener); } scrollbarListener = new Listener() { public void handleEvent(Event e) { scroll (e); } }; ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.addListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.addListener (SWT.Selection, scrollbarListener); } Rectangle computeBounds () {
/** * Creates a ControlEditor for the specified Composite. * * @param parent the Composite above which this editor will be displayed */ public ControlEditor( Composite parent ) { this.parent = parent; controlListener = new Listener() { public void handleEvent( Event e ) { layout(); } }; for( int i = 0; i < EVENTS.length; i++ ) { parent.addListener( EVENTS[ i ], controlListener ); } scrollbarListener = new Listener() { public void handleEvent( Event e ) { scroll( e ); } }; ScrollBar hBar = parent.getHorizontalBar(); ScrollBar vBar = parent.getVerticalBar(); if( hBar != null ) { hBar.addListener( SWT.Selection, scrollbarListener ); } if( vBar != null ) { vBar.addListener( SWT.Selection, scrollbarListener ); } }
ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.addListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.addListener (SWT.Selection, scrollbarListener);
ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.addListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.addListener (SWT.Selection, scrollbarListener);
ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.addListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.addListener (SWT.Selection, scrollbarListener);
ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.addListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.addListener (SWT.Selection, scrollbarListener);
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. The * composite and the editor Control are <b>not</b> disposed. */ public void dispose () { if (parent != null && !parent.isDisposed()) { for (int i=0; i<EVENTS.length; i++) { parent.removeListener (EVENTS [i], controlListener); } ScrollBar hBar = parent.getHorizontalBar (); if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener); ScrollBar vBar = parent.getVerticalBar (); if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener); } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; } /**
/** * Removes all associations between the Editor and the underlying composite. * The composite and the editor Control are <b>not</b> disposed. */ public void dispose() { if( parent != null && !parent.isDisposed() ) { for( int i = 0; i < EVENTS.length; i++ ) { parent.removeListener( EVENTS[ i ], controlListener ); } ScrollBar hBar = parent.getHorizontalBar(); ScrollBar vBar = parent.getVerticalBar(); if( hBar != null ) { hBar.removeListener( SWT.Selection, scrollbarListener ); } if( vBar != null ) { vBar.removeListener( SWT.Selection, scrollbarListener ); } } parent = null; editor = null; hadFocus = false; controlListener = null; scrollbarListener = null; }
}); final ScrollBar vBar = tablecontainer.getVerticalBar(); final ScrollBar hBar = tablecontainer.getHorizontalBar(); vBar.addListener(SWT.Selection, new Listener() {
vBar = cTable.getVerticalBar(); if (vBar != null) { vBar.setValues(0, 0, 0, 50, getRowDefaultHeight(), 50);