Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.forms.widgets
Class SharedScrolledComposite

    java.lang.Object
      org.eclipse.swt.widgets.Widget
          org.eclipse.swt.widgets.Control
              org.eclipse.swt.widgets.Scrollable
                  org.eclipse.swt.widgets.Composite
                      org.eclipse.swt.custom.ScrolledComposite
                          org.eclipse.ui.forms.widgets.SharedScrolledComposite

All Implemented Interfaces:
  Drawable

Direct Known Subclasses:
  ScrolledForm, ScrolledFormText, ScrolledPageBook

public abstract class SharedScrolledComposite
extends ScrolledComposite

This class is used to provide common scrolling services to a number of controls in the toolkit. Classes that extend it are not required to implement any method.

Since:
  3.0

Field Summary

Fields inherited from class org.eclipse.swt.widgets.Control
`handle`

Constructor Summary
`SharedScrolledComposite(Composite parent, int style)` Creates the new instance.

Method Summary
`void` | `reflow(boolean flushCache)` Recomputes the body layout and the scroll bars.
`void` | `setBackground(Color bg)` Sets the background of the control and its content.
`void` | `setContent(Control content)` Overrides 'super' to pass the proper colors and font
`boolean` | `setFocus()` If content is set, transfers focus to the content.
`void` | `setFont(Font font)` Sets the font of the form.
`void` | `setForeground(Color fg)` Sets the foreground of the control and its content.

Methods inherited from class org.eclipse.swt.custom.ScrolledComposite
`computeSize, getAlwaysShowScrollBars, getContent, getOrigin, layout, setAlwaysShowScrollBars, setExpandHorizontal, setExpandVertical, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin`

Methods inherited from class org.eclipse.swt.widgets.Composite
`checkSubclass, getChildren, getLayout, getTabList, layout, setTabList`

Methods inherited from class org.eclipse.swt.widgets.Scrollable
`computeTrim, getClientArea, getHorizontalBar, getVerticalBar`

Methods inherited from class org.eclipse.swt.widgets.Control
`addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBounds, setBounds, setCapture, setCursor, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update`

Methods inherited from class org.eclipse.swt.widgets.Widget
`addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SharedScrolledComposite

    public SharedScrolledComposite(Composite parent,
                                   int style)

  Creates the new instance.

Parameters:
  `parent` - the parent composite
  `style` - the style to use

Method Detail

### setForeground

    public void setForeground(Color fg)

  Sets the foreground of the control and its content.

  Overrides:
    `setForeground` in class `Control`
  Parameters:
    `fg` - the new foreground color

### setBackground

    public void setBackground(Color bg)

  Sets the background of the control and its content.

  Overrides:
    `setBackground` in class `Control`
  Parameters:
    `bg` - the new background color

### setFont

    public void setFont(Font font)

  Sets the font of the form. This font will be used to render the title text. It will not affect the body.

  Overrides:
    `setFont` in class `Control`
  Parameters:
    `font` - the new font (or null)

### setContent

    public void setContent(Control content)

  Overrides 'super' to pass the proper colors and font

  Overrides:
    `setContent` in class `ScrolledComposite`
  Parameters:
    `content` - the control to be displayed in the content area

### setFocus

    public boolean setFocus()

  If content is set, transfers focus to the content.

  Overrides:
    `setFocus` in class `Composite`

### reflow

    public void reflow(boolean flushCache)

  Recomputes the body layout and the scroll bars. The method should be used when changes somewhere in the form body invalidate the current layout and/or scroll bars.

  Parameters:
    `flushCache` - if `true`, drop the cached data

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.