The item children that may be added to instances of this class
must be of type CoolItem.
Note that although this class is a subclass of Composite,
it does not make sense to add Control children to it,
or set a layout on it.
Note
Only one of the styles HORIZONTAL and VERTICAL may be specified.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv Cursor | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv Cursor | |
| pack-priv CoolItem | |
| pack-priv Cursor | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv CoolItem[][] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv CoolItem[] | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv static int | |
| protected void | checkSubclass()
Checks that this class can be subclassed.
|
| public Point | computeSize(int
the width hint (can be wHint, int SWT.DEFAULT)the height hint (can be hHint, boolean SWT.DEFAULT)true if the control's contents have changed, and false otherwiseOverrides org. |
| pack-priv void | |
| pack-priv void | |
| pack-priv Point | |
| pack-priv void | |
| pack-priv Point | |
| pack-priv Rectangle | |
| pack-priv CoolItem | |
| public CoolItem | Returns: the item at the given visual indexthe visual index of the item to return index)Returns the item that is currently displayed at the given, zero-relative index. |
| public int | |
| public int[] | Returns: the current visual order of the receiver's itemsReturns an array of zero-relative ints that map the creation order of the receiver's items to the order in which they are currently being displayed. |
| public CoolItem[] | Returns: the receiver's items in their current visual orderReturns an array of |
| public Point[] | Returns: the receiver's item sizes in their current visual orderReturns an array of points whose x and y coordinates describe the widths and heights (respectively) of the items in the receiver in the order in which they are currently being displayed. |
| public boolean | Returns: true if the coolbar is locked, false otherwiseReturns whether or not the receiver is 'locked'. |
| pack-priv int | |
| public int[] | Returns: an array containing the receiver's wrap indices, or an empty array if all items are in one rowReturns an array of ints that describe the zero-relative indices of any item(s) in the receiver that will begin on a new row. |
| public int | Returns: the visual order index of the search item, or -1 if the item is not foundthe search item item)Searches the receiver's items in the order they are currently being displayed, 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. |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv int | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv boolean | |
| pack-priv void | |
| public void | setBackground(Color
the new color (or null) color)
Sets the receiver's background color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
| public void | setCursor(Cursor
the new cursor (or null) cursor)Overrides org. |
| public void | setItemLayout(int[]
an array of indices that describe the new order to display the items in itemOrder, int[] an array of wrap indices, or null wrapIndices, Point[] an array containing the new sizes for each of the receiver's items in visual order sizes)Sets the receiver's item order, wrap indices, and item sizes all at once. |
| pack-priv void | |
| pack-priv void | |
| public void | setLocked(boolean
lock the coolbar if true, otherwise unlock the coolbar locked)Sets whether or not the receiver is 'locked'. |
| public void | setOrientation(int
new orientation style orientation)Overrides org. SWT.LEFT_TO_RIGHT or SWT.RIGHT_TO_LEFT.
|
| public void | setWrapIndices(int[]
an array of wrap indices, or null indices)Sets the indices of all item(s) in the receiver that will begin on a new row. |
| pack-priv void |
| CLICK_DISTANCE | back to summary |
|---|---|
| pack-priv static final int CLICK_DISTANCE | |
| cursor | back to summary |
|---|---|
| pack-priv Cursor cursor | |
| DEFAULT_COOLBAR_HEIGHT | back to summary |
|---|---|
| pack-priv static final int DEFAULT_COOLBAR_HEIGHT | |
| DEFAULT_COOLBAR_WIDTH | back to summary |
|---|---|
| pack-priv static final int DEFAULT_COOLBAR_WIDTH | |
| dragCursor | back to summary |
|---|---|
| pack-priv Cursor dragCursor | |
| dragging | back to summary |
|---|---|
| pack-priv CoolItem dragging | |
| hoverCursor | back to summary |
|---|---|
| pack-priv Cursor hoverCursor | |
| inDispose | back to summary |
|---|---|
| pack-priv boolean inDispose | |
| isLocked | back to summary |
|---|---|
| pack-priv boolean isLocked | |
| items | back to summary |
|---|---|
| pack-priv CoolItem[][] items | |
| itemXOffset | back to summary |
|---|---|
| pack-priv int itemXOffset | |
| mouseXOffset | back to summary |
|---|---|
| pack-priv int mouseXOffset | |
| originalItems | back to summary |
|---|---|
| pack-priv CoolItem[] originalItems | |
| ROW_SPACING | back to summary |
|---|---|
| pack-priv static final int ROW_SPACING | |
| CoolBar | back to summary |
|---|---|
| public CoolBar(Composite parent, int style) Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in
class
| |
| _setCursor | back to summary |
|---|---|
| pack-priv void _setCursor(Cursor cursor) | |
| checkStyle | back to summary |
|---|---|
| pack-priv static int checkStyle(int style) | |
| checkSubclass | back to summary |
|---|---|
| protected void checkSubclass() Overrides org. Doc from org. Checks that this class can be subclassed.
The SWT class library is intended to be subclassed
only at specific, controlled points (most notably,
Important Note 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.
| |
| computeSize | back to summary |
|---|---|
| public Point computeSize(int wHint, int hHint, boolean changed) Overrides org. Doc from org. Returns the preferred size (in points) of the receiver.
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
If the changed flag is | |
| createItem | back to summary |
|---|---|
| pack-priv void createItem(CoolItem item, int index) | |
| destroyItem | back to summary |
|---|---|
| pack-priv void destroyItem(CoolItem item) | |
| findItem | back to summary |
|---|---|
| pack-priv Point findItem(CoolItem item) | |
| fixEvent | back to summary |
|---|---|
| pack-priv void fixEvent(Event event) | |
| fixPoint | back to summary |
|---|---|
| pack-priv Point fixPoint(int x, int y) | |
| fixRectangle | back to summary |
|---|---|
| pack-priv Rectangle fixRectangle(int x, int y, int width, int height) | |
| getGrabbedItem | back to summary |
|---|---|
| pack-priv CoolItem getGrabbedItem(int x, int y) | |
| getItem | back to summary |
|---|---|
| public CoolItem getItem(int index) Returns the item that is currently displayed at the given, zero-relative index. Throws an exception if the index is out of range.
| |
| getItemCount | back to summary |
|---|---|
| public int getItemCount() Returns the number of items contained in the receiver.
| |
| getItemOrder | back to summary |
|---|---|
| public int[] getItemOrder() Returns an array of zero-relative ints that map the creation order of the receiver's items to the order in which they are currently being displayed. Specifically, the indices of the returned array represent the current visual order of the items, and the contents of the array represent the creation order of the items. 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.
| |
| getItems | back to summary |
|---|---|
| public CoolItem[] getItems() Returns an array of 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.
| |
| getItemSizes | back to summary |
|---|---|
| public Point[] getItemSizes() Returns an array of points whose x and y coordinates describe the widths and heights (respectively) of the items in the receiver in the order in which they are currently being displayed.
| |
| getLocked | back to summary |
|---|---|
| public boolean getLocked() Returns whether or not the receiver is 'locked'. When a coolbar is locked, its items cannot be repositioned.
| |
| getWidth | back to summary |
|---|---|
| pack-priv int getWidth() | |
| getWrapIndices | back to summary |
|---|---|
| public int[] getWrapIndices() Returns an array of ints that describe the zero-relative indices of any item(s) in the receiver that will begin on a new row. The 0th visible item always begins the first row, therefore it does not count as a wrap index.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(CoolItem item) Searches the receiver's items in the order they are currently being displayed, 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. If no item is found, returns -1.
| |
| insertItemIntoRow | back to summary |
|---|---|
| pack-priv boolean insertItemIntoRow(CoolItem item, int rowIndex, int x_root) Insert the item into the row. Adjust the x and width values appropriately. | |
| internalRedraw | back to summary |
|---|---|
| pack-priv void internalRedraw(int x, int y, int width, int height) | |
| layoutItems | back to summary |
|---|---|
| pack-priv int layoutItems() Return the height of the bar after it has been properly laid out for the given width. | |
| moveDown | back to summary |
|---|---|
| pack-priv void moveDown(CoolItem item, int x_root) | |
| moveLeft | back to summary |
|---|---|
| pack-priv void moveLeft(CoolItem item, int pixels) | |
| moveRight | back to summary |
|---|---|
| pack-priv void moveRight(CoolItem item, int pixels) | |
| moveUp | back to summary |
|---|---|
| pack-priv void moveUp(CoolItem item, int x_root) | |
| onDispose | back to summary |
|---|---|
| pack-priv void onDispose(Event event) | |
| onMouseDoubleClick | back to summary |
|---|---|
| pack-priv void onMouseDoubleClick(Event event) | |
| onMouseDown | back to summary |
|---|---|
| pack-priv void onMouseDown(Event event) | |
| onMouseExit | back to summary |
|---|---|
| pack-priv void onMouseExit() | |
| onMouseMove | back to summary |
|---|---|
| pack-priv void onMouseMove(Event event) | |
| onMouseUp | back to summary |
|---|---|
| pack-priv void onMouseUp(Event event) | |
| onPaint | back to summary |
|---|---|
| pack-priv void onPaint(Event event) | |
| onResize | back to summary |
|---|---|
| pack-priv void onResize() | |
| relayout | back to summary |
|---|---|
| pack-priv void relayout() | |
| removeControl | back to summary |
|---|---|
| pack-priv void removeControl(Control control) Overrides org.
| |
| removeItemFromRow | back to summary |
|---|---|
| pack-priv boolean removeItemFromRow(CoolItem item, int rowIndex, boolean disposed) Remove the item from the row. Adjust the x and width values appropriately. | |
| reskinChildren | back to summary |
|---|---|
| pack-priv void reskinChildren(int flags) Overrides org.
| |
| setBackground | back to summary |
|---|---|
| public void setBackground(Color color) Overrides org. Doc from org. Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null. Note This operation is a hint and may be overridden by the platform. | |
| setCursor | back to summary |
|---|---|
| public void setCursor(Cursor cursor) Overrides org. Doc from org. Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null. When the mouse pointer passes over a control its appearance is changed to match the control's cursor. | |
| setItemLayout | back to summary |
|---|---|
| public void setItemLayout(int[] itemOrder, int[] wrapIndices, Point[] sizes) Sets the receiver's item order, wrap indices, and item sizes all at once. This method is typically used to restore the displayed state of the receiver to a previously stored state. The item order is the order in which the items in the receiver should be displayed, given in terms of the zero-relative ordering of when the items were added. The wrap indices are the indices of all item(s) in the receiver that will begin on a new row. The indices are given in the order specified by the item order. The 0th item always begins the first row, therefore it does not count as a wrap index. If wrap indices is null or empty, the items will be placed on one line. The sizes are specified in an array of points whose x and y coordinates describe the new widths and heights (respectively) of the receiver's items in the order specified by the item order.
| |
| setItemOrder | back to summary |
|---|---|
| pack-priv void setItemOrder(int[] itemOrder) | |
| setItemSizes | back to summary |
|---|---|
| pack-priv void setItemSizes(Point[] sizes) | |
| setLocked | back to summary |
|---|---|
| public void setLocked(boolean locked) Sets whether or not the receiver is 'locked'. When a coolbar is locked, its items cannot be repositioned.
| |
| setOrientation | back to summary |
|---|---|
| public void setOrientation(int orientation) Overrides org. Doc from org. Sets the orientation of the receiver, which must be one
of the constants
| |
| setWrapIndices | back to summary |
|---|---|
| public void setWrapIndices(int[] indices) Sets the indices of all item(s) in the receiver that will begin on a new row. The indices are given in the order in which they are currently being displayed. The 0th item always begins the first row, therefore it does not count as a wrap index. If indices is null or empty, the items will be placed on one line.
| |
| wrapItems | back to summary |
|---|---|
| pack-priv void wrapItems(int maxWidth) | |