public class ExpandBar extends Composite
The item children that may be added to instances of this class
must be of type ExpandItem.
IMPORTANT: This class is not intended to be subclassed.
ExpandItem,
ExpandEvent,
ExpandListener,
ExpandAdapter,
ExpandBar snippets,
SWT Example: ControlExample,
Sample code and further information| Modifier and Type | Field and Description |
|---|---|
(package private) ExpandItem |
focusItem |
(package private) int |
hFont |
(package private) int |
itemCount |
(package private) ExpandItem[] |
items |
(package private) int |
spacing |
(package private) int |
yCurrentScroll |
backgroundMode, layout, layoutCount, lpwp, tabListhorizontalBar, verticalBaraccessible, background, backgroundImage, cursor, drawCount, font, foreground, handle, layoutData, menu, parent, region, toolTipTextCANVAS, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, display, DISPOSE_SENT, DISPOSED, DRAG_DETECT, DRAW_BACKGROUND, eventTable, FOREIGN_HANDLE, HIDDEN, IGNORE_WM_CHANGEUISTATE, KEYED_DATA, LAYOUT_CHANGED, LAYOUT_CHILD, LAYOUT_NEEDED, MAJOR, MINOR, MOVE_DEFERRED, MOVE_OCCURRED, PARENT_BACKGROUND, RELEASED, RESIZE_DEFERRED, RESIZE_OCCURRED, SKIN_NEEDED, state, style, THEME_BACKGROUND, TRACK_MOUSE| Constructor and Description |
|---|
ExpandBar(Composite parent,
int style)
Constructs a new instance of this class given its parent
and a style value describing its behavior and appearance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExpandListener(ExpandListener listener)
Adds the listener to the collection of listeners who will
be notified when an item in the receiver is expanded or collapsed
by sending it one of the messages defined in the
ExpandListener
interface. |
(package private) int |
callWindowProc(int hwnd,
int msg,
int wParam,
int lParam) |
(package private) static int |
checkStyle(int style) |
protected void |
checkSubclass()
Checks that this class can be subclassed.
|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Returns the preferred size of the receiver.
|
(package private) void |
createHandle() |
(package private) void |
createItem(ExpandItem item,
int style,
int index) |
(package private) void |
createWidget() |
(package private) int |
defaultBackground() |
(package private) void |
destroyItem(ExpandItem item) |
(package private) void |
drawThemeBackground(int hDC,
int hwnd,
RECT rect) |
(package private) void |
drawWidget(GC gc,
RECT clipRect) |
(package private) Control |
findBackgroundControl() |
(package private) Control |
findThemeControl() |
(package private) int |
getBandHeight() |
ExpandItem |
getItem(int index)
Returns the item at the given, zero-relative index in the
receiver.
|
int |
getItemCount()
Returns the number of items contained in the receiver.
|
ExpandItem[] |
getItems()
Returns an array of
ExpandItems which are the items
in the receiver. |
int |
getSpacing()
Returns the receiver's spacing.
|
int |
indexOf(ExpandItem item)
Searches the receiver's list starting at the first item
(index 0) until an item is found that is equal to the
argument, and returns the index of that item.
|
(package private) boolean |
isAppThemed() |
(package private) void |
layoutItems(int index,
boolean setScrollbar) |
(package private) void |
releaseChildren(boolean destroy) |
void |
removeExpandListener(ExpandListener listener)
Removes the listener from the collection of listeners who will
be notified when items in the receiver are expanded or collapsed.
|
(package private) void |
reskinChildren(int flags) |
(package private) void |
setBackgroundPixel(int pixel) |
void |
setFont(Font font)
Sets the font that the receiver will use to paint textual information
to the font specified by the argument, or to the default font for that
kind of control if the argument is null.
|
(package private) void |
setForegroundPixel(int pixel) |
(package private) void |
setScrollbar() |
void |
setSpacing(int spacing)
Sets the receiver's spacing.
|
(package private) void |
showFocus(boolean up) |
(package private) void |
showItem(ExpandItem item) |
(package private) TCHAR |
windowClass() |
(package private) int |
windowProc() |
(package private) LRESULT |
WM_KEYDOWN(int wParam,
int lParam) |
(package private) LRESULT |
WM_KILLFOCUS(int wParam,
int lParam) |
(package private) LRESULT |
WM_LBUTTONDOWN(int wParam,
int lParam) |
(package private) LRESULT |
WM_LBUTTONUP(int wParam,
int lParam) |
(package private) LRESULT |
WM_MOUSELEAVE(int wParam,
int lParam) |
(package private) LRESULT |
WM_MOUSEMOVE(int wParam,
int lParam) |
(package private) LRESULT |
WM_MOUSEWHEEL(int wParam,
int lParam) |
(package private) LRESULT |
WM_PAINT(int wParam,
int lParam) |
(package private) LRESULT |
WM_PRINTCLIENT(int wParam,
int lParam) |
(package private) LRESULT |
WM_SETCURSOR(int wParam,
int lParam) |
(package private) LRESULT |
WM_SETFOCUS(int wParam,
int lParam) |
(package private) LRESULT |
WM_SIZE(int wParam,
int lParam) |
(package private) LRESULT |
wmScroll(ScrollBar bar,
boolean update,
int hwnd,
int msg,
int wParam,
int lParam) |
_getChildren, _getTabList, changed, checkBuffered, checkComposited, computeTabList, copyArea, drawBackground, findDeferredControl, findMenus, fixChildren, fixTabList, getBackgroundMode, getChildren, getChildrenCount, getLayout, getLayoutDeferred, getTabList, hooksKeys, isLayoutDeferred, layout, layout, layout, layout, layout, markLayout, minimumSize, redrawChildren, releaseParent, releaseWidget, removeControl, resizeChildren, resizeChildren, resizeEmbeddedHandle, sendResize, setBackgroundMode, setBounds, setFocus, setLayout, setLayoutDeferred, setResizeChildren, setTabGroupFocus, setTabList, toolTipText, translateMnemonic, translateTraversal, updateBackgroundColor, updateBackgroundImage, updateBackgroundMode, updateFont, updateLayout, updateLayout, updateOrientation, updateUIState, widgetStyle, WM_ERASEBKGND, WM_GETDLGCODE, WM_GETFONT, WM_NCHITTEST, WM_PARENTNOTIFY, WM_SETFONT, WM_SYSCOLORCHANGE, WM_SYSCOMMAND, WM_UPDATEUISTATE, wmNCPaint, wmNotifycomputeTrim, createScrollBar, destroyScrollBar, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, scrolledHandle, widgetExtStyle, WM_HSCROLL, WM_VSCROLL, wmScrollWheeladdControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, binarySearch, borderHandle, checkBackground, checkBorder, checkGesture, checkHandle, checkMirrored, computeSize, computeTabGroup, computeTabRoot, defaultFont, defaultForeground, deregister, destroyWidget, dragDetect, dragDetect, dragDetect, drawBackground, drawBackground, drawBackground, drawImageBackground, enableDrag, enableWidget, fillBackground, fillImageBackground, fillThemeBackground, findBrush, findCursor, findImageControl, findMnemonic, fixFocus, forceFocus, forceResize, getAccessible, getBackground, getBackgroundImage, getBackgroundPixel, getBorderWidth, getBounds, getClipboardText, getCodePage, getCursor, getDragDetect, getDrawing, getEnabled, getFont, getForeground, getForegroundPixel, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getPath, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, hasCursor, hasFocus, internal_dispose_GC, internal_new_GC, isActive, isEnabled, isFocusAncestor, isFocusControl, isReparentable, isShowing, isTabGroup, isTabItem, isVisible, mapEvent, menuShell, mnemonicHit, mnemonicMatch, moveAbove, moveBelow, new_Accessible, new_GC, pack, pack, print, printWidget, redraw, redraw, redraw, register, releaseHandle, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, sendFocusEvent, sendGestureEvent, sendMove, sendTouchEvent, setBackground, setBackground, setBackgroundImage, setBackgroundImage, setBounds, setBounds, setBounds, setCapture, setCursor, setCursor, setDefaultFont, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRadioFocus, setRadioSelection, setRedraw, setRegion, setSavedFocus, setSize, setSize, setTabItemFocus, setToolTipText, setToolTipText, setTouchEnabled, setVisible, showWidget, sort, subclass, toControl, toControl, toDisplay, toDisplay, topHandle, translateAccelerator, translateMnemonic, traverse, traverse, traverse, traverse, traverse, traverseEscape, traverseGroup, traverseItem, traverseMnemonic, traversePage, traverseReturn, unsubclass, update, update, updateImages, widgetCreateStruct, widgetParent, windowProc, WM_ACTIVATE, WM_CAPTURECHANGED, WM_CHANGEUISTATE, WM_CHAR, WM_CLEAR, WM_CLOSE, WM_COMMAND, WM_CONTEXTMENU, WM_CTLCOLOR, WM_CUT, WM_DESTROY, WM_DRAWITEM, WM_ENDSESSION, WM_ENTERIDLE, WM_GESTURE, WM_GETMINMAXINFO, WM_GETOBJECT, WM_HELP, WM_HOTKEY, WM_IME_CHAR, WM_IME_COMPOSITION_START, WM_IME_COMPOSITION, WM_IME_ENDCOMPOSITION, WM_INITMENUPOPUP, WM_INPUTLANGCHANGE, WM_KEYUP, WM_LBUTTONDBLCLK, WM_MBUTTONDBLCLK, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MEASUREITEM, WM_MENUCHAR, WM_MENUSELECT, WM_MOUSEACTIVATE, WM_MOUSEHOVER, WM_MOUSEHWHEEL, WM_MOVE, WM_NCACTIVATE, WM_NCCALCSIZE, WM_NCLBUTTONDOWN, WM_NCPAINT, WM_NOTIFY, WM_PALETTECHANGED, WM_PASTE, WM_PRINT, WM_QUERYENDSESSION, WM_QUERYNEWPALETTE, WM_QUERYOPEN, WM_RBUTTONDBLCLK, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SETREDRAW, WM_SETTINGCHANGE, WM_SHOWWINDOW, WM_SYSCHAR, WM_SYSKEYDOWN, WM_SYSKEYUP, WM_TABLET_FLICK, WM_TIMER, WM_TOUCH, WM_UNDO, WM_UNINITMENUPOPUP, WM_WINDOWPOSCHANGED, WM_WINDOWPOSCHANGING, WM_XBUTTONDBLCLK, WM_XBUTTONDOWN, WM_XBUTTONUP, wmColorChild, wmCommandChild, wmDrawChild, wmMeasureChild, wmNotifyChild, wmScrollChild_addListener, addDisposeListener, addListener, checkBits, checkOpened, checkOrientation, checkParent, checkWidget, DeferWindowPos, dispose, dragDetect, error, filters, findItem, fixMnemonic, fixMnemonic, getData, getData, getDisplay, getListeners, getName, getNameText, getStyle, hooks, isDisposed, isListening, isValidSubclass, isValidThread, notifyListeners, postEvent, postEvent, release, removeDisposeListener, removeListener, removeListener, reskin, reskinWidget, sendDragEvent, sendDragEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendKeyEvent, sendKeyEvent, sendMouseEvent, sendMouseEvent, sendMouseWheelEvent, sendSelectionEvent, sendSelectionEvent, setData, setData, setInputState, setKeyState, setLocationMask, SetWindowPos, showMenu, showMenu, toString, updateMenuLocation, wmCaptureChanged, wmChar, wmContextMenu, wmIMEChar, wmKeyDown, wmKeyUp, wmKillFocus, wmLButtonDblClk, wmLButtonDown, wmLButtonUp, wmMButtonDblClk, wmMButtonDown, wmMButtonUp, wmMouseHover, wmMouseHWheel, wmMouseLeave, wmMouseMove, wmMouseWheel, wmPaint, wmPrint, wmRButtonDblClk, wmRButtonDown, wmRButtonUp, wmSetFocus, wmSysChar, wmSysKeyDown, wmSysKeyUp, wmXButtonDblClk, wmXButtonDown, wmXButtonUpExpandItem[] items
int itemCount
ExpandItem focusItem
int spacing
int yCurrentScroll
int hFont
public ExpandBar(Composite parent, int style)
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.
parent - a composite control which will be the parent of the new instance (cannot be null)style - the style of control to constructjava.lang.IllegalArgumentException - SWTException - SWT.V_SCROLL,
Widget.checkSubclass(),
Widget.getStyle()public void addExpandListener(ExpandListener listener)
ExpandListener
interface.listener - the listener which should be notifiedjava.lang.IllegalArgumentException - SWTException - ExpandListener,
removeExpandListener(org.eclipse.swt.events.ExpandListener)int callWindowProc(int hwnd,
int msg,
int wParam,
int lParam)
callWindowProc in class Scrollableprotected void checkSubclass()
Widget
The SWT class library is intended to be subclassed
only at specific, controlled points (most notably,
Composite and Canvas when
implementing new widgets). This method enforces this
rule unless it is overridden.
IMPORTANT: By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.
The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.
checkSubclass in class Compositestatic int checkStyle(int style)
public Point computeSize(int wHint, int hHint, boolean changed)
Control
The preferred size of a control is the size that it would
best be displayed at. The width hint and height hint arguments
allow the caller to ask a control questions such as "Given a particular
width, how high does the control need to be to show all of the contents?"
To indicate that the caller does not wish to constrain a particular
dimension, the constant SWT.DEFAULT is passed for the hint.
If the changed flag is true, it indicates that the receiver's
contents have changed, therefore any caches that a layout manager
containing the control may have been keeping need to be flushed. When the
control is resized, the changed flag will be false, so layout
manager caches can be retained.
computeSize in class CompositewHint - the width hint (can be SWT.DEFAULT)hHint - the height hint (can be SWT.DEFAULT)changed - true if the control's contents have changed, and false otherwiseLayout,
Control.getBorderWidth(),
Control.getBounds(),
Control.getSize(),
Control.pack(boolean),
"computeTrim, getClientArea for controls that implement them"void createHandle()
createHandle in class Compositevoid createItem(ExpandItem item, int style, int index)
void createWidget()
createWidget in class Scrollableint defaultBackground()
defaultBackground in class Controlvoid destroyItem(ExpandItem item)
void drawThemeBackground(int hDC,
int hwnd,
RECT rect)
drawThemeBackground in class ControlControl findBackgroundControl()
findBackgroundControl in class ControlControl findThemeControl()
findThemeControl in class Controlint getBandHeight()
public ExpandItem getItem(int index)
index - the index of the item to returnjava.lang.IllegalArgumentException - SWTException - public int getItemCount()
SWTException - public ExpandItem[] getItems()
ExpandItems which are the items
in the receiver.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
SWTException - public int getSpacing()
SWTException - public int indexOf(ExpandItem item)
item - the search itemjava.lang.IllegalArgumentException - SWTException - boolean isAppThemed()
void layoutItems(int index,
boolean setScrollbar)
void releaseChildren(boolean destroy)
releaseChildren in class Compositepublic void removeExpandListener(ExpandListener listener)
listener - the listener which should no longer be notifiedjava.lang.IllegalArgumentException - SWTException - ExpandListener,
addExpandListener(org.eclipse.swt.events.ExpandListener)void reskinChildren(int flags)
reskinChildren in class Compositevoid setBackgroundPixel(int pixel)
setBackgroundPixel in class Controlpublic void setFont(Font font)
Controlvoid setForegroundPixel(int pixel)
setForegroundPixel in class Controlvoid setScrollbar()
public void setSpacing(int spacing)
spacing - the spacing around each itemSWTException - void showItem(ExpandItem item)
void showFocus(boolean up)
TCHAR windowClass()
windowClass in class Scrollableint windowProc()
windowProc in class ScrollableLRESULT WM_KEYDOWN(int wParam, int lParam)
WM_KEYDOWN in class ControlLRESULT WM_KILLFOCUS(int wParam, int lParam)
WM_KILLFOCUS in class ControlLRESULT WM_LBUTTONDOWN(int wParam, int lParam)
WM_LBUTTONDOWN in class CompositeLRESULT WM_LBUTTONUP(int wParam, int lParam)
WM_LBUTTONUP in class ControlLRESULT WM_MOUSELEAVE(int wParam, int lParam)
WM_MOUSELEAVE in class ControlLRESULT WM_MOUSEMOVE(int wParam, int lParam)
WM_MOUSEMOVE in class ControlLRESULT WM_MOUSEWHEEL(int wParam, int lParam)
WM_MOUSEWHEEL in class ScrollableLRESULT WM_PRINTCLIENT(int wParam, int lParam)
WM_PRINTCLIENT in class CompositeLRESULT WM_SETCURSOR(int wParam, int lParam)
WM_SETCURSOR in class ControlLRESULT WM_SETFOCUS(int wParam, int lParam)
WM_SETFOCUS in class ControlLRESULT wmScroll(ScrollBar bar, boolean update, int hwnd, int msg, int wParam, int lParam)
wmScroll in class Scrollable