blob: f7b9509c9b1442415c97c7fda60c247b485f6fac [file] [log] [blame]
/*********************************************************************
* Copyright (c) 2008 The University of York.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.epsilon.picto;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
public class FilteredViewTree extends FilteredTree {
/**
* Create a new instance of the receiver.
*
* @param parent
* the parent <code>Composite</code>
* @param treeStyle
* the style bits for the <code>Tree</code>
* @param filter
* the filter to be used
* @param useNewLook
* <code>true</code> if the new 3.5 look should be used
*/
public FilteredViewTree(Composite parent, int treeStyle, PatternFilter filter, boolean useNewLook) {
super(parent, treeStyle, filter, useNewLook);
}
public void clearFilterText() {
if (filterText != null && !filterText.getText().equals("")) {
clearText();
}
}
/**
* Return the time delay that should be used when scheduling the
* filter refresh job. Subclasses may override.
*
* @return a time delay in milliseconds before the job should run
*
* @since 3.5
*/
@Override
protected long getRefreshJobDelay() {
return 100;
}
}