import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.RowData;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
text_search.setForeground(AbstractUtility.getColor(Resources.SEARCH_VIEW_FOREGROUND));
text_search.setText(defaultText);
text_search.setEnabled(false);
+ RowData layoutData = new RowData();
+ layoutData.width = 150;
+ text_search.setLayoutData(layoutData);
addTextListeners();
}
private void createLayout(Composite composite) {
final RowLayout layout = new RowLayout();
layout.wrap = false;
- layout.pack = true;
- layout.justify = true;
+ layout.pack = false;
+ layout.justify = false;
layout.type = SWT.HORIZONTAL;
- layout.marginLeft = 0;
+ layout.marginLeft = 5;
layout.marginTop = 0;
- layout.marginRight = 0;
+ layout.marginRight = 5;
layout.marginBottom = 0;
layout.spacing = 0;
composite.setLayout(layout);
* @param searchResult
*/
private void openSearchResultsView(IFindTaxaAndNamesConfigurator configurator) {
- boolean openResultInSeparateWindows = PreferencesUtil.getPreferenceStore().getBoolean((IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS));
+ boolean openResultInSeparateWindows = PreferencesUtil.getBooleanValue((IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS));
String partId = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_NAVIGATION_SEARCH_E4_SEARCHRESULTVIEWE4;
MPart part = null;
*
* @author n.hoffmann
* @created Feb 2, 2010
- * @version 1.0
*/
class ConfigurationSelectionListener extends SelectionAdapter {
configurator.setDoNamesWithoutTaxa(configurator.isDoNamesWithoutTaxa() ? false : true);
break;
case COMMON_NAME:
- configurator.setDoTaxaByCommonNames(getConfigurator().isDoTaxaByCommonNames() ? false : true);
+ configurator.setDoTaxaByCommonNames(configurator.isDoTaxaByCommonNames() ? false : true);
break;
+ case UNPUBLISHED:
+ configurator.setIncludeUnpublished(configurator.isIncludeUnpublished() ? false : true);
+ break;
+ default:
+ break;
}
saveConfigurator();
}
private void saveConfigurator() {
- PreferencesUtil.setSearchConfigurator(getConfigurator());
- this.configurator = PreferencesUtil.getSearchConfigurator();
+ PreferencesUtil.setSearchConfigurator(configurator);
+ PreferencesUtil.firePreferencesChanged(this.getClass());
+
}
}