Java Code Examples for org.eclipse.swt.widgets.DirectoryDialog#getFilterPath()
The following examples show how to use
org.eclipse.swt.widgets.DirectoryDialog#getFilterPath() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DirectoryDialogButtonListenerFactory.java From hop with Apache License 2.0 | 6 votes |
public static final SelectionAdapter getSelectionAdapter( final Shell shell, final Text destination ) { // Listen to the Browse... button return new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( destination.getText() != null ) { String fpath = destination.getText(); // String fpath = StringUtil.environmentSubstitute(destination.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); destination.setText( str ); } } }; }
Example 2
Source File: DirectoryDialogButtonListenerFactory.java From pentaho-kettle with Apache License 2.0 | 6 votes |
public static final SelectionAdapter getSelectionAdapter( final Shell shell, final Text destination ) { // Listen to the Browse... button return new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( destination.getText() != null ) { String fpath = destination.getText(); // String fpath = StringUtil.environmentSubstitute(destination.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); destination.setText( str ); } } }; }
Example 3
Source File: DirectoryDialogButtonListenerFactory.java From pentaho-kettle with Apache License 2.0 | 6 votes |
public static final SelectionAdapter getSelectionAdapter( final Shell shell, final Text destination ) { // Listen to the Browse... button return new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( destination.getText() != null ) { String fpath = destination.getText(); // String fpath = StringUtil.environmentSubstitute(destination.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); destination.setText( str ); } } }; }
Example 4
Source File: TmxConvert2FileDialog.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
/** * (non-Javadoc) * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ @Override public void widgetSelected(SelectionEvent e) { DirectoryDialog dialog = new DirectoryDialog(getShell()); dialog.open(); String filterPath = dialog.getFilterPath(); if (null == filterPath || filterPath.isEmpty()) { return; } text.setText(filterPath); setOkState(); }