Class PShelfItem

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.nebula.widgets.pshelf.PShelfItem

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.

Styles:
(none)
Events:
(none)

IMPORTANT: This class is not intended to be subclassed.

  • Constructor Summary

    Constructors 
    Constructor 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.
  • Method Summary

    Modifier and Type Method 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)  

    Methods inherited from class org.eclipse.swt.widgets.Item

    checkSubclass, getImage, getText

    Methods inherited from class org.eclipse.swt.widgets.Widget

    addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PShelfItem

      public 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.

      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
      index - the zero-relative index to store the receiver in its parent
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the parent is null
      • ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the parent (inclusive)
      org.eclipse.swt.SWTException -
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
      • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
    • PShelfItem

      public 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. 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.

      Parameters:
      parent - a composite control which will be the parent of the new instance (cannot be null)
      style - the style of control to construct
      Throws:
      java.lang.IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the parent is null
      org.eclipse.swt.SWTException -
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
      • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
  • Method Details

    • getBody

      public org.eclipse.swt.widgets.Composite getBody()
      Returns the client area of the shelf. Users should add controls and a layout to the body.

      Returns:
      the body composite
      Throws:
      org.eclipse.swt.SWTException -
      • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    • getBodyParent

      org.eclipse.swt.widgets.Composite getBodyParent()
    • dispose

      public void dispose()
      Overrides:
      dispose in class org.eclipse.swt.widgets.Widget
      See Also:
      Widget.dispose()
    • setImage

      public void setImage​(org.eclipse.swt.graphics.Image image)
      Overrides:
      setImage in class org.eclipse.swt.widgets.Item
      See Also:
      Item.setImage(org.eclipse.swt.graphics.Image)
    • setText

      public void setText​(java.lang.String string)
      Overrides:
      setText in class org.eclipse.swt.widgets.Item
      See Also:
      Item.setText(java.lang.String)