org.eclipse.swt.widgets
Class Scrollable

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Widget
        |
        +--org.eclipse.swt.widgets.Control
              |
              +--org.eclipse.swt.widgets.Scrollable
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
Composite, List, Text

public abstract class Scrollable
extends Control

Safe: This class is the abstract superclass of all classes which represent controls that have standard scroll bars.

Styles:
H_SCROLL, V_SCROLL
Events:
(none)

IMPORTANT: This class is intended to be subclassed only within the SWT implementation.


Field Summary
(package private)  ScrollBar horizontalBar
           
(package private)  ScrollBar verticalBar
           
 
Fields inherited from class org.eclipse.swt.widgets.Control
ACCENTS, accessible, background, drawCount, foreground, handle, hCursor, layoutData, menu, parent, toolTipText
 
Fields inherited from class org.eclipse.swt.widgets.Widget
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values
 
Constructor Summary
(package private) Scrollable()
          Prevents uninitialized instances from being created outside the package.
  Scrollable(Composite parent, int style)
          Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
(package private)  int callWindowProc(int msg, int wParam, int lParam)
           
 Rectangle computeTrim(int x, int y, int width, int height)
          Enabled: Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.
(package private)  ScrollBar createScrollBar(int type)
           
(package private)  void createWidget()
           
 Rectangle getClientArea()
          Enabled: Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").
 ScrollBar getHorizontalBar()
          Enabled: Returns the receiver's horizontal scroll bar if it has one, and null if it does not.
 ScrollBar getVerticalBar()
          Enabled: Returns the receiver's vertical scroll bar if it has one, and null if it does not.
(package private)  void releaseWidget()
           
(package private)  int widgetExtStyle()
           
(package private)  int widgetStyle()
           
(package private)  org.eclipse.swt.internal.win32.TCHAR windowClass()
           
(package private)  int windowProc()
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_HSCROLL(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_MOUSEWHEEL(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_SIZE(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_VSCROLL(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT wmScroll(ScrollBar bar, int msg, int wParam, int lParam)
           
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, checkOrientation, computeSize, computeSize, computeTabGroup, computeTabList, computeTabRoot, createHandle, defaultBackground, defaultFont, defaultForeground, deregister, destroyWidget, drawBackground, drawBackground, findBrush, findCursor, findMnemonic, fixFocus, forceFocus, forceResize, getAccessible, getBackground, getBackgroundPixel, getBorderWidth, getBounds, getCodePage, getDisplay, getEnabled, getFont, getForeground, getForegroundPixel, getLayoutData, getLocation, getMenu, getParent, getPath, getShell, getSize, getToolTipText, getVisible, hasCursor, hasFocus, internal_dispose_GC, internal_new_GC, isActive, isDisposed, isEnabled, isFocusAncestor, isFocusControl, isReparentable, isShowing, isTabGroup, isTabItem, isVisible, menuShell, mnemonicHit, mnemonicMatch, moveAbove, moveBelow, new_Accessible, pack, pack, redraw, redraw, register, releaseHandle, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, sendKeyEvent, sendKeyEvent, sendMouseEvent, sendMouseEvent, setBackground, setBackgroundPixel, setBounds, setBounds, setBounds, setCapture, setCursor, setDefaultFont, setEnabled, setFocus, setFont, setForeground, setForegroundPixel, setLayoutData, setLocation, setLocation, setMenu, setParent, setRadioFocus, setRadioSelection, setRedraw, setSavedFocus, setSize, setSize, setTabGroupFocus, setTabItemFocus, setToolTipText, setVisible, sort, subclass, toControl, toControl, toDisplay, toDisplay, transferActive, transferFocus, translateAccelerator, translateMnemonic, translateMnemonic, translateTraversal, traverse, traverse, traverseEscape, traverseGroup, traverseItem, traverseMnemonic, traversePage, traverseReturn, unsubclass, update, update, updateFont, windowProc, WM_ACTIVATE, WM_CHAR, WM_CLEAR, WM_CLOSE, WM_COMMAND, WM_CONTEXTMENU, WM_CTLCOLOR, WM_CUT, WM_DESTROY, WM_DRAWITEM, WM_ENDSESSION, WM_ERASEBKGND, WM_GETDLGCODE, WM_GETFONT, WM_GETOBJECT, WM_HELP, WM_HOTKEY, WM_IME_CHAR, WM_IME_COMPOSITION, WM_INITMENUPOPUP, WM_KEYDOWN, WM_KEYUP, WM_KILLFOCUS, WM_LBUTTONDBLCLK, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MBUTTONDBLCLK, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MEASUREITEM, WM_MENUCHAR, WM_MENUSELECT, WM_MOUSEACTIVATE, WM_MOUSEHOVER, WM_MOUSELEAVE, WM_MOUSEMOVE, WM_MOVE, WM_NCACTIVATE, WM_NCCALCSIZE, WM_NCHITTEST, WM_NOTIFY, WM_PAINT, WM_PALETTECHANGED, WM_PASTE, WM_PRINTCLIENT, WM_QUERYENDSESSION, WM_QUERYNEWPALETTE, WM_QUERYOPEN, WM_RBUTTONDBLCLK, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SETCURSOR, WM_SETFOCUS, WM_SETFONT, WM_SETREDRAW, WM_SETTINGCHANGE, WM_SHOWWINDOW, WM_SYSCHAR, WM_SYSCOLORCHANGE, WM_SYSCOMMAND, WM_SYSKEYDOWN, WM_SYSKEYUP, WM_TIMER, WM_UNDO, WM_WINDOWPOSCHANGING, wmColorChild, wmCommandChild, wmDrawChild, wmMeasureChild, wmNotifyChild, wmScrollChild
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkParent, checkSubclass, checkWidget, dispose, error, filters, getData, getData, getName, getNameText, getStyle, hooks, isListening, isValidSubclass, isValidThread, mbcsToWcs, mbcsToWcs, notifyListeners, postEvent, postEvent, releaseChild, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, toString, wcsToMbcs, wcsToMbcs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

horizontalBar

ScrollBar horizontalBar

verticalBar

ScrollBar verticalBar
Constructor Detail

Scrollable

Scrollable()
Prevents uninitialized instances from being created outside the package.


Scrollable

public Scrollable(Composite parent,
                  int style)
Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

Parameters:
parent - a composite control which will be the parent of the new instance (cannot be null)
style - the style of control to construct
See Also:
SWT.H_SCROLL, SWT.V_SCROLL, Widget.checkSubclass(), Widget.getStyle()
Method Detail

callWindowProc

int callWindowProc(int msg,
                   int wParam,
                   int lParam)
Specified by:
callWindowProc in class Control

computeTrim

public Rectangle computeTrim(int x,
                             int y,
                             int width,
                             int height)
Enabled: Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.

In other words, it returns a rectangle such that, if the receiver's bounds were set to that rectangle, the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings") would be the rectangle described by the arguments (relative to the receiver's parent).

Returns:
the required bounds to produce the given client area
See Also:
getClientArea()

createScrollBar

ScrollBar createScrollBar(int type)

createWidget

void createWidget()
Overrides:
createWidget in class Control

getClientArea

public Rectangle getClientArea()
Enabled: Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").

Returns:
the client area
See Also:
computeTrim(int, int, int, int)

getHorizontalBar

public ScrollBar getHorizontalBar()
Enabled: Returns the receiver's horizontal scroll bar if it has one, and null if it does not.

Returns:
the horizontal scroll bar (or null)

getVerticalBar

public ScrollBar getVerticalBar()
Enabled: Returns the receiver's vertical scroll bar if it has one, and null if it does not.

Returns:
the vertical scroll bar (or null)

releaseWidget

void releaseWidget()
Overrides:
releaseWidget in class Control

widgetExtStyle

int widgetExtStyle()
Overrides:
widgetExtStyle in class Control

widgetStyle

int widgetStyle()
Overrides:
widgetStyle in class Control

windowClass

org.eclipse.swt.internal.win32.TCHAR windowClass()
Specified by:
windowClass in class Control

windowProc

int windowProc()
Specified by:
windowProc in class Control

WM_HSCROLL

org.eclipse.swt.internal.win32.LRESULT WM_HSCROLL(int wParam,
                                                  int lParam)
Overrides:
WM_HSCROLL in class Control

WM_MOUSEWHEEL

org.eclipse.swt.internal.win32.LRESULT WM_MOUSEWHEEL(int wParam,
                                                     int lParam)
Overrides:
WM_MOUSEWHEEL in class Control

WM_SIZE

org.eclipse.swt.internal.win32.LRESULT WM_SIZE(int wParam,
                                               int lParam)
Overrides:
WM_SIZE in class Control

WM_VSCROLL

org.eclipse.swt.internal.win32.LRESULT WM_VSCROLL(int wParam,
                                                  int lParam)
Overrides:
WM_VSCROLL in class Control

wmScroll

org.eclipse.swt.internal.win32.LRESULT wmScroll(ScrollBar bar,
                                                int msg,
                                                int wParam,
                                                int lParam)


comments?