public class PShelfItem
extends org.eclipse.swt.widgets.Item
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
Instances of this class represent an individual shelf. A shelf is a container widget similar to a tab folder but with a list-like visualization.
Add controls to a shelf item by constructing them on the body (getBody
) of the item.
IMPORTANT: This class is not intended to be subclassed.
Constructor and Description |
---|
PShelfItem(PShelf parent,
int style)
Constructs a new instance of this class given its parent
(which must be a
PShelf ) and a style value
describing its behavior and appearance. |
PShelfItem(PShelf parent,
int style,
int index)
Constructs a new instance of this class given its parent
(which must be a
PShelf ), a style value
describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent. |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
org.eclipse.swt.widgets.Composite |
getBody()
Returns the client area of the shelf.
|
(package private) org.eclipse.swt.widgets.Composite |
getBodyParent() |
void |
setImage(org.eclipse.swt.graphics.Image image) |
void |
setText(java.lang.String string) |
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public PShelfItem(PShelf parent, int style, int index)
PShelf
), a style value
describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent.
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 constructindex
- the zero-relative index to store the receiver in its parentjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public PShelfItem(PShelf parent, int style)
PShelf
) and a style value
describing its behavior and appearance. The item is added
to the end of the items maintained by its parent.
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
- org.eclipse.swt.SWTException
- public org.eclipse.swt.widgets.Composite getBody()
org.eclipse.swt.SWTException
- org.eclipse.swt.widgets.Composite getBodyParent()
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
Widget.dispose()
public void setImage(org.eclipse.swt.graphics.Image image)
setImage
in class org.eclipse.swt.widgets.Item
Item.setImage(org.eclipse.swt.graphics.Image)
public void setText(java.lang.String string)
setText
in class org.eclipse.swt.widgets.Item
Item.setText(java.lang.String)