Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 346914 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/swt/widgets/Scrollable.java (-6 / +20 lines)
Lines 11-16 Link Here
11
 ******************************************************************************/
11
 ******************************************************************************/
12
package org.eclipse.swt.widgets;
12
package org.eclipse.swt.widgets;
13
13
14
import org.eclipse.swt.SWT;
15
import org.eclipse.swt.SWTException;
14
import org.eclipse.swt.graphics.Rectangle;
16
import org.eclipse.swt.graphics.Rectangle;
15
17
16
/**
18
/**
Lines 66-71 Link Here
66
   */
68
   */
67
  public Scrollable( final Composite parent, final int style ) {
69
  public Scrollable( final Composite parent, final int style ) {
68
    super( parent, style );
70
    super( parent, style );
71
    createScrollBars( style );
69
  }
72
  }
70
73
71
  /**
74
  /**
Lines 158-166 Link Here
158
   */
161
   */
159
  public ScrollBar getHorizontalBar() {
162
  public ScrollBar getHorizontalBar() {
160
    checkWidget();
163
    checkWidget();
161
    /* [austin] - Subclasses should override.  Default implementation returns null, 
164
    return horizontalBar;
162
        but this should eventually provide the scrollbars for subtypes as in SWT. */
163
    return null;
164
  }
165
  }
165
166
166
  /**
167
  /**
Lines 178-186 Link Here
178
   */
179
   */
179
  public ScrollBar getVerticalBar() {
180
  public ScrollBar getVerticalBar() {
180
    checkWidget();
181
    checkWidget();
181
    /* [austin] - Subclasses should override.  Default implementation returns null, 
182
    return verticalBar;
182
        but this should eventually provide the scrollbars for subtypes as in SWT. */
183
    return null;
184
  }
183
  }
185
184
186
  int getVScrollBarWidth() {
185
  int getVScrollBarWidth() {
Lines 192-195 Link Here
192
    //subclasses may override
191
    //subclasses may override
193
    return 0;
192
    return 0;
194
  }
193
  }
194
195
196
private ScrollBar horizontalBar;
197
private ScrollBar verticalBar;
198
199
  private void createScrollBars( final int style ) {
200
    if( ( style & SWT.H_SCROLL ) != 0 ) {
201
      horizontalBar = new ScrollBar( this, SWT.H_SCROLL );
202
      horizontalBar.setVisible( false );
203
    }
204
    if( ( style & SWT.V_SCROLL ) != 0 ) {
205
      verticalBar = new ScrollBar( this, SWT.V_SCROLL );
206
      verticalBar.setVisible( false );
207
    }
208
  }
195
}
209
}

Return to bug 346914