|
RSE Release 3.0 |
|||||||||
| 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
org.eclipse.rse.files.ui.widgets.SystemRemoteFolderCombo
public class SystemRemoteFolderCombo
This re-usable widget is for selecting a new or previously specified folder path within a given connection.
Unlike SystemQualifiedRemoteFolderCombo, this widget does not combine the connection name with the folder name. That means if you want to restrict this to a particular connection, you must call setSystemConnection. If you want to restrict to any connections of a particular system type, call setSystemType.
Because this combo only deals with strings, versus IRemoteFile, it is left to the caller to interpret that string as desired.
The composite is layed as follows:
Folder: ______________v Browse...
| Field Summary |
|---|
| Fields inherited from class org.eclipse.swt.widgets.Composite |
|---|
embeddedHandle |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
|---|
handle |
| Constructor Summary | |
|---|---|
SystemRemoteFolderCombo(Composite parent,
int style,
String historyKey,
boolean readOnly)
Constructor for SystemFileFolderCombo. |
|
| Method Summary | |
|---|---|
void |
addBrowseActionCompleteListener(ISystemRemoteFolderBrowseCompleteListener listener)
Adds a listener which will be notified each time after the browse action is run. |
void |
addBrowseButtonSelectionListener(SelectionListener listener)
Register a listener interested in when the browse button is selected |
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 entered/selected contents of the combo box. |
protected static Button |
createPushButton(Composite group,
ResourceBundle bundle,
String key)
|
static Button |
createPushButton(Composite group,
String label)
|
protected SystemSelectRemoteFolderAction |
getBrowseAction(Shell shell)
Returns action to be called when Browse... pressed. |
Button |
getBrowseButton()
Return the browse button widget |
Combo |
getCombo()
Return the embedded combo box widget Same as getFolderCombo() |
Combo |
getFolderCombo()
Return the combo box widget as a System Same as getCombo() |
Label |
getFolderLabel()
Get folder label. |
static String[] |
getHistory()
Return the current history for the folder combo box |
SystemHistoryCombo |
getHistoryCombo()
Return the combo box historical widget Same as getCombo() but returns the combo reference as a SystemHistoryCombo reference |
String[] |
getItems()
Get the items in the combo field |
int |
getSelectionIndex()
Get the index number of the currently selected item. |
IHost |
getSystemConnection()
Get the system connection as specified in setSystemConnection. |
String |
getText()
Query the folder combo field's current contents |
protected void |
notifyBrowseActionCompleteListeners(IRemoteFile remoteFile)
Notifies all registered listeners. |
protected Composite |
prepareComposite(int numColumns)
Prepares this composite control and sets the default layout data. |
void |
removeBrowseActionCompleteListener(ISystemRemoteFolderBrowseCompleteListener listener)
Removes the given listener. |
void |
removeBrowseButtonSelectionListener(SelectionListener listener)
Remove a previously set browse button selection listener. |
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 |
void |
setAutoUpperCase(boolean enable)
Set auto-uppercase. |
void |
setBrowseButtonFocus()
Set the focus to the browse button |
void |
setBrowseButtonToolTipText(String tip)
Set the tooltip text for the browse button |
void |
setButtonToolTipText(String tip)
Set the tooltip text for the browse button. |
void |
setEnabled(boolean enabled)
Disable/Enable all the child controls. |
boolean |
setFocus()
Set the focus to the folder combo field |
void |
setItems(String[] items)
Set the items in the combo field |
void |
setSelectionIndex(int selIdx)
Same as select(int) |
void |
setShowNewConnectionPrompt(boolean show)
Set whether to allow users to create new connections when Browse is pressed |
void |
setSubSystem(IRemoteFileSubSystem subsystem)
Set the input remote file subsystem. |
void |
setSystemConnection(IHost connection)
Set the input system connection to restrict the browse button to this connection only. |
void |
setSystemType(IRSESystemType systemType)
Convenience method to restrict to a single system type. |
void |
setSystemTypes(IRSESystemType[] systemTypes)
Set the system types to restrict what connections the user sees, and what types of connections they can create. |
void |
setText(String text)
Set the folder combo field's current contents |
void |
setTextLimit(int limit)
Set the folder combo field's text limit |
void |
setToolTipText(String tip)
Set the tooltip text for the folder combo field |
void |
setWidthHint(int widthHint)
Set the width hint for this whole composite Default is computed from children. |
void |
updateHistory()
Update the history with current entry field setting. |
void |
updateHistory(boolean refresh)
Update the history with current entry field setting, and optionally refresh the list from the new history. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, 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 SystemRemoteFolderCombo(Composite parent,
int style,
String historyKey,
boolean readOnly)
parent - Parent compositestyle - SWT style flags for overall composite widgethistoryKey - A string identifying the key into the user preferences where this combo's history will be stored.readOnly - True if the combo box is not to allow user editing.setSystemConnection(IHost)| Method Detail |
|---|
public void setAutoUpperCase(boolean enable)
setAutoUpperCase in interface ISystemCombopublic void setSystemTypes(IRSESystemType[] systemTypes)
systemTypes - An array of system types, or
null to allow all registered valid system types.
A system type is valid if at least one subsystem configuration
is registered against it.public void setSystemType(IRSESystemType systemType)
systemType - The system type to restrict to, or
null to allow all registered valid system types.
A system type is valid if at least one subsystem configuration
is registered against it.public void setSystemConnection(IHost connection)
public IHost getSystemConnection()
public void setSubSystem(IRemoteFileSubSystem subsystem)
public void setShowNewConnectionPrompt(boolean show)
public Combo getFolderCombo()
getCombo()
public Label getFolderLabel()
public SystemHistoryCombo getHistoryCombo()
getCombo() but returns the combo reference as a SystemHistoryCombo reference
public Combo getCombo()
getFolderCombo()
getCombo in interface ISystemCombopublic void setWidthHint(int widthHint)
setWidthHint in interface ISystemCombopublic Button getBrowseButton()
public void setItems(String[] items)
public String[] getItems()
public void setText(String text)
public String getText()
getText in interface ISystemCombopublic void setEnabled(boolean enabled)
setEnabled in interface ISystemCombosetEnabled in class Controlpublic void setToolTipText(String tip)
setToolTipText in interface ISystemCombosetToolTipText in class Controlpublic void setBrowseButtonToolTipText(String tip)
public void setButtonToolTipText(String tip)
setBrowseButtonToolTipText(String)
setButtonToolTipText in interface ISystemCombopublic void setTextLimit(int limit)
public boolean setFocus()
setFocus in interface ISystemCombosetFocus in class Compositepublic void setBrowseButtonFocus()
public void select(int selIdx)
select in interface ISystemCombopublic void setSelectionIndex(int selIdx)
select(int)
setSelectionIndex in interface ISystemCombopublic int getSelectionIndex()
getSelectionIndex in interface ISystemCombopublic void clearSelection()
clearSelection in interface ISystemCombopublic void clearTextSelection()
clearTextSelection in interface ISystemCombopublic void addSelectionListener(SelectionListener listener)
addSelectionListener in interface ISystemComboremoveSelectionListener(SelectionListener)public void removeSelectionListener(SelectionListener listener)
removeSelectionListener in interface ISystemComboaddSelectionListener(SelectionListener)public void addBrowseButtonSelectionListener(SelectionListener listener)
removeBrowseButtonSelectionListener(SelectionListener)public void removeBrowseButtonSelectionListener(SelectionListener listener)
addBrowseButtonSelectionListener(SelectionListener)public void addModifyListener(ModifyListener listener)
removeModifyListener(ModifyListener)public void removeModifyListener(ModifyListener listener)
addModifyListener(ModifyListener)public void addBrowseActionCompleteListener(ISystemRemoteFolderBrowseCompleteListener listener)
listener - the listener to be notified.public void removeBrowseActionCompleteListener(ISystemRemoteFolderBrowseCompleteListener listener)
listener - the listener to be removed.protected void notifyBrowseActionCompleteListeners(IRemoteFile remoteFile)
remoteFile - the remote file to use for the notification.public static 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)
protected Composite prepareComposite(int numColumns)
numColumns - Number of columns the new group will contain.protected void addOurButtonSelectionListener()
protected SystemSelectRemoteFolderAction getBrowseAction(Shell shell)
public static Button createPushButton(Composite group,
String label)
protected static Button createPushButton(Composite group,
ResourceBundle bundle,
String key)
|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||