Constructs a new instance of this class given its parent (which must be a <code>CoolBar</code>) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p>
Constructs a new instance of this class given its parent (which must be a <code>CoolBar</code>), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p>
Adds the listener to the collection of listeners that will be notified when the control is selected by the user, by sending it one of the messages defined in the <code>SelectionListener</code> interface. <p> If <code>widgetSelected</code> is called when the mouse is over the drop-down arrow (or 'chevron') portion of the cool item, the event object detail field contains the value <code>SWT.ARROW</code>, and the x and y fields in the event object represent the point at the bottom left of the chevron, where the menu should be popped up. <code>widgetDefaultSelected</code> is not called. </p>
Returns the preferred size of the receiver. <p> The <em>preferred size</em> of a <code>CoolItem</code> is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask the instance questions such as "Given a particular width, how high does it need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant <code>SWT.DEFAULT</code> is passed for the hint. </p>
Returns a rectangle describing the receiver's size and location relative to its parent.
Returns the control that is associated with the receiver.
Returns the minimum size that the cool item can be resized to using the cool item's gripper.
Returns the receiver's parent, which must be a <code>CoolBar</code>.
Returns a point describing the receiver's ideal size. The x coordinate of the result is the ideal width of the receiver. The y coordinate of the result is the ideal height of the receiver.
Returns a point describing the receiver's size. The x coordinate of the result is the width of the receiver. The y coordinate of the result is the height of the receiver.
Removes the listener from the collection of listeners that will be notified when the control is selected by the user.
Sets the control that is associated with the receiver to the argument.
Sets the minimum size that the cool item can be resized to using the cool item's gripper, to the point specified by the arguments.
Sets the minimum size that the cool item can be resized to using the cool item's gripper, to the point specified by the argument.
Sets the receiver's ideal size to the point specified by the arguments.
Sets the receiver's ideal size to the point specified by the argument.
Sets the receiver's size to the point specified by the arguments. <p> Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead. </p>
Sets the receiver's size to the point specified by the argument. <p> Note: Attempting to set the width or height of the receiver to a negative number will cause them to be set to zero instead. </p>
Returns the receiver's image if it has one, or null if it does not.
Returns the receiver's text, which will be an empty string if it has never been set.
Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.
Sets the receiver's text.
Instances of this class are selectable user interface objects that represent the dynamically positionable areas of a <code>CoolBar</code>. <dl> <dt><b>Styles:</b></dt> <dd>DROP_DOWN</dd> <dt><b>Events:</b></dt> <dd>Selection</dd> </dl> <p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>
@see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>