|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.ExpandBar
Instances of this class support the layout of selectable expand bar items.
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| Field Summary |
|---|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
ExpandBar(Composite parent,
int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
|
| Method Summary | |
|---|---|
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. |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Returns the preferred size of the receiver. |
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. |
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.. |
void |
setSpacing(int spacing)
Sets the receiver's spacing, spacing specifies the number of pixel allocated around each item. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| 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 |
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 construct
IllegalArgumentException - SWTException - Widget.checkSubclass(),
Widget.getStyle()| Method Detail |
public void addExpandListener(ExpandListener listener)
ExpandListener
interface.
listener - the listener which should be notified
IllegalArgumentException - SWTException - ExpandListener,
removeExpandListener(org.eclipse.swt.events.ExpandListener)
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 Compositepublic ExpandItem getItem(int index)
index - the index of the item to return
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 item
IllegalArgumentException - SWTException - public void removeExpandListener(ExpandListener listener)
listener - the listener which should no longer be notified
IllegalArgumentException - SWTException - ExapndListener,
addExpandListener(org.eclipse.swt.events.ExpandListener)public void setSpacing(int spacing)
SWTException -
|
Eclipse Platform Release 3.2 |
|||||||||||
| 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, 2005. All rights reserved.