|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.custom.PopupList
Safe: A PopupList is a list of selectable items that appears in its own shell positioned above its parent shell. It it used for selecting items when editing a Table cell (similar to the list that appears when you open a Combo box). The list will be positioned so that does not run off the screen and the largest number of items are visible. It may appear above the current cursor location or below it depending how close you are to the edge of the screen.
Field Summary | |
private List |
list
|
private int |
minimumWidth
|
private Shell |
shell
|
Constructor Summary | |
PopupList(Shell parent)
Enabled: Creates a PopupList above the specified shell. |
Method Summary | |
Font |
getFont()
Enabled: Gets the widget font. |
String[] |
getItems()
Enabled: Gets the items. |
int |
getMinimumWidth()
Enabled: Gets the minimum width of the list. |
String |
open(Rectangle rect)
Enabled: Launches the Popup List, waits for an item to be selected and then closes PopupList. |
void |
select(String string)
Enabled: Selects an item with text that starts with specified String. |
void |
setFont(Font font)
Enabled: Sets the widget font. |
void |
setItems(String[] strings)
Enabled: Sets all items. |
void |
setMinimumWidth(int width)
Enabled: Sets the minimum width of the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Shell shell
private List list
private int minimumWidth
Constructor Detail |
public PopupList(Shell parent)
Method Detail |
public Font getFont()
public String[] getItems()
This operation will fail if the items cannot be queried from the OS.
public int getMinimumWidth()
public String open(Rectangle rect)
rect
- the initial size and location of the PopupList; the dialog will be
positioned so that it does not run off the screen and the largest number of items are visible
public void select(String string)
If the item is not currently selected, it is selected. If the item at an index is selected, it remains selected. If the string is not matched, it is ignored.
string
- the text of the itempublic void setFont(Font font)
When new font is null, the font reverts to the default system font for the widget.
font
- the new font (or null)public void setItems(String[] strings)
The previous selection is cleared. The previous items are deleted. The new items are added. The top index is set to 0.
public void setMinimumWidth(int width)
width
- the minimum width of the list
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |