|
|||||||||
| 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
tabs.ColorChooserButton
public class ColorChooserButton
Instances of this class are controls that allow the user
to choose an item from a list of items.
Often, ColorChooserButtons are used in the same place
where a single selection Table widget could
be used but space is limited. A ColorChooserButton takes
less space than a Table widget and shows
similar information.
Note that although this class is a subclass of Composite,
it does not make sense to add children to it, or set a layout on it.
Table| Field Summary |
|---|
| Fields inherited from class org.eclipse.swt.widgets.Composite |
|---|
embeddedHandle |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
|---|
handle |
| Constructor Summary | |
|---|---|
ColorChooserButton(org.eclipse.swt.widgets.Composite parent,
int[] columnWidth)
Create a new instance of ColorChooserButton, given it's parent composite and the columns widths |
|
| Method Summary | |
|---|---|
void |
addMouseListener(org.eclipse.swt.events.MouseListener listener)
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in the MouseListener
interface. |
org.eclipse.swt.widgets.TableItem |
addTableItem(int style)
Constructs a new instance of TableItem class given a style value describing its behavior and appearance. |
void |
addTableSelectionListener(org.eclipse.swt.events.SelectionAdapter listener)
|
void |
deselect()
Deselects selected item in the receiver. |
int |
getSelectionIndex()
Returns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is selected. |
void |
select(int index)
Selects the item at the given zero-relative index in the receiver's table list. |
void |
setLayout(org.eclipse.swt.widgets.Layout layout)
Sets the layout which is associated with the receiver to be the argument which may be null. |
void |
setPageIncrement(int value)
Sets the amount that the receiver's value will be modified by when the page increment/decrement areas are selected to the argument, which must be at least one. |
void |
setText(java.lang.String string)
Sets the receiver's text. |
void |
setToolTipText(java.lang.String string)
Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown. |
void |
setVisibleItemCount(int count)
Sets the number of items that are visible in the drop down portion of the receiver's list. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| 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 ColorChooserButton(org.eclipse.swt.widgets.Composite parent,
int[] columnWidth)
parent - the parent compositecolumnWidth - the column widths array| Method Detail |
|---|
public void setLayout(org.eclipse.swt.widgets.Layout layout)
setLayout in class org.eclipse.swt.widgets.Compositelayout - the receiver's new layout or null
org.eclipse.swt.SWTException - public void setText(java.lang.String string)
This method sets the button label. The label may include the mnemonic character but must not contain line delimiters.
Mnemonics are indicated by an '&' that causes the next character to be the mnemonic. When the user presses a key sequence that matches the mnemonic, a selection event occurs. On most platforms, the mnemonic appears underlined but may be emphasised in a platform specific manner. The mnemonic indicator character '&' can be escaped by doubling it in the string, causing a single '&' to be displayed.
string - the new text
java.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public void setToolTipText(java.lang.String string)
setToolTipText in class org.eclipse.swt.widgets.Controlstring - the new tool tip text (or null)
org.eclipse.swt.SWTException - public void setVisibleItemCount(int count)
The default visible item count value is 5
count - the new number of items to be visiblepublic org.eclipse.swt.widgets.TableItem addTableItem(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.
style - the style of item to construct
java.lang.IllegalArgumentException - org.eclipse.swt.SWTException - SWT,
Widget.getStyle()public void setPageIncrement(int value)
The default page increment value is 5
pageIncrement - the page increment (must be greater than zero)
org.eclipse.swt.SWTException - public void select(int index)
index - the index of the item to select
org.eclipse.swt.SWTException - public void deselect()
org.eclipse.swt.SWTException - public int getSelectionIndex()
org.eclipse.swt.SWTException - public void addTableSelectionListener(org.eclipse.swt.events.SelectionAdapter listener)
public void addMouseListener(org.eclipse.swt.events.MouseListener listener)
MouseListener
interface.
addMouseListener in class org.eclipse.swt.widgets.Controllistener - the listener which should be notified
java.lang.IllegalArgumentException - org.eclipse.swt.SWTException - MouseListener,
Control.removeMouseListener(org.eclipse.swt.events.MouseListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||