|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectComposite
com.ibm.etools.systems.core.ui.widgets.SystemHistoryCombo
This re-usable widget is for a combox box that persists its history and allows the user to manipulate that history.
The composite is layed as follows:
______________v...
updateHistory()
,
Serialized FormField Summary | |
---|---|
static String |
copyright
|
Fields inherited from interface com.ibm.etools.systems.core.ui.widgets.ISystemCombo |
---|
Copyright |
Constructor Summary | |
---|---|
SystemHistoryCombo(Composite parent,
int style,
String key,
boolean readonly)
Constructor for SystemHistoryCombo |
|
SystemHistoryCombo(Composite parent,
int style,
String key,
int maxComboEntries,
boolean readonly)
Constructor for SystemHistoryCombo |
Method Summary | |
---|---|
void |
addModifyListener(ModifyListener listener)
Register a listener interested in entry field modify events |
protected void |
addOurButtonSelectionListener()
|
void |
addSelectionListener(SelectionListener listener)
Register a listener interested in an item is selected in the combo box |
void |
clearSelection()
Clear the selection of the text in the entry field part of the combo. |
void |
clearTextSelection()
Clear the selection of the text in the entry field part of the combo. |
static Combo |
createCombo(Composite parent,
boolean readonly)
Creates a new combobox instance and sets the default layout data. |
protected Button |
createHistoryButton()
|
Combo |
getCombo()
Return the combo box widget |
String[] |
getHistory()
Return the current history for the directory combo box |
Button |
getHistoryButton()
Return the history button widget |
String[] |
getItems()
Get the items in the combo field |
int |
getSelectionIndex()
Get the index number of the currently selected item. |
String |
getText()
Query the history combo field's current contents |
protected void |
historyButtonPressed()
|
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTraversed(TraverseEvent e)
|
protected Composite |
prepareComposite(int numColumns)
Prepares this composite control and sets the default layout data. |
void |
removeModifyListener(ModifyListener listener)
Remove a previously set entry field listener. |
void |
removeSelectionListener(SelectionListener listener)
Remove a previously set combo box selection listener. |
void |
select(int selIdx)
Select the combo dropdown list entry at the given index |
int |
select(String itemText)
Select the given text. |
void |
setAutoUpperCase(boolean enable)
Set auto-uppercase. |
void |
setButtonToolTipText(String tip)
Same as #setHistoryButtonToolTipText(String) |
void |
setDefaultHistory(String[] items)
Set the items to default the history to, IF the history is currently empty. |
void |
setEnabled(boolean enabled)
Disable/Enable all the child controls. |
boolean |
setFocus()
Set the focus to the combo field |
void |
setHistory(String[] newHistory)
Set the history to the given array of strings. |
void |
setHistoryButtonHeight(int height)
|
void |
setHistoryButtonToolTipText(String tip)
Set the tooltip text for the history button |
void |
setHistoryKey(String key)
Reset the history key. |
void |
setItems(String[] items)
Set the items in the combo field |
void |
setSelectionIndex(int selIdx)
Same as select(int) |
void |
setText(String text)
Set the combo field's current contents |
void |
setTextLimit(int limit)
Set the combo field's text limit |
void |
setToolTipText(String tip)
Set the tooltip text for the combo field |
void |
setWidthHint(int widthHint)
Set the width hint for the combo box widget (in pixels). |
void |
updateHistory()
Update the history with current entry field setting, but don't refresh contents. |
void |
updateHistory(boolean refresh)
Update the history with current entry field setting, and optionally refresh the list from the new history This is called automatically for you when setText is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String copyright
Constructor Detail |
public SystemHistoryCombo(Composite parent, int style, String key, boolean readonly)
parent
- The owning compositestyle
- The swt style to apply to the overall composite. Typically it is just SWT.NULLkey
- The unique string used as a preferences key to persist the history for this widgetreadonly
- Set to true for a readonly combo vs user-editable combo boxpublic SystemHistoryCombo(Composite parent, int style, String key, int maxComboEntries, boolean readonly)
parent
- The owning compositestyle
- The swt style to apply to the overall composite. Typically it is just SWT.NULLkey
- The unique string used as a preferences key to persist the history for this widgetmaxComboEntries
- The number of history entries to show in the combo box. This only restricts the
combo box not the full history listreadonly
- Set to true for a readonly combo vs user-editable combo boxMethod Detail |
public Combo getCombo()
getCombo
in interface ISystemCombo
public void setWidthHint(int widthHint)
setWidthHint
in interface ISystemCombo
public void setAutoUpperCase(boolean enable)
setAutoUpperCase
in interface ISystemCombo
public Button getHistoryButton()
public void setText(String text)
public String getText()
getText
in interface ISystemCombo
public void setEnabled(boolean enabled)
setEnabled
in interface ISystemCombo
public void setToolTipText(String tip)
setToolTipText
in interface ISystemCombo
public void setHistoryButtonToolTipText(String tip)
public void setButtonToolTipText(String tip)
setButtonToolTipText
in interface ISystemCombo
public void setTextLimit(int limit)
public boolean setFocus()
setFocus
in interface ISystemCombo
public void setItems(String[] items)
public void setDefaultHistory(String[] items)
public void setHistoryKey(String key)
public String[] getItems()
public void select(int selIdx)
select
in interface ISystemCombo
public int select(String itemText)
public void setSelectionIndex(int selIdx)
select(int)
setSelectionIndex
in interface ISystemCombo
public void clearSelection()
clearSelection
in interface ISystemCombo
public void clearTextSelection()
clearTextSelection
in interface ISystemCombo
public int getSelectionIndex()
getSelectionIndex
in interface ISystemCombo
public void addSelectionListener(SelectionListener listener)
addSelectionListener
in interface ISystemCombo
removeSelectionListener(SelectionListener)
public void removeSelectionListener(SelectionListener listener)
removeSelectionListener
in interface ISystemCombo
addSelectionListener(SelectionListener)
public void addModifyListener(ModifyListener listener)
removeModifyListener(ModifyListener)
public void removeModifyListener(ModifyListener listener)
addModifyListener(ModifyListener)
public String[] getHistory()
public void updateHistory()
This is called automatically for you when setText is called. However, for non-readonly versions, you should still call this yourself when OK is successfully pressed on the dialog box.
public void updateHistory(boolean refresh)
This is called automatically for you when setText is called. However, for non-readonly versions, you should still call this yourself when OK is successfully pressed on the dialog box.
public void setHistory(String[] newHistory)
protected Composite prepareComposite(int numColumns)
public static Combo createCombo(Composite parent, boolean readonly)
Does NOT set the widthHint as that causes problems. Instead the combo will consume what space is available within this composite.
parent
- composite to put the button into.protected void addOurButtonSelectionListener()
protected void historyButtonPressed()
protected Button createHistoryButton()
public void setHistoryButtonHeight(int height)
public void keyTraversed(TraverseEvent e)
public void keyPressed(KeyEvent e)
public void keyReleased(KeyEvent e)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |