Skip to content

Commit

Permalink
Use DelayedSelectionListener
Browse files Browse the repository at this point in the history
  • Loading branch information
prasser committed Dec 9, 2015
1 parent df57d15 commit f7014cc
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
import org.deidentifier.arx.gui.resources.Resources;
import org.deidentifier.arx.gui.view.SWTUtil;
import org.deidentifier.arx.gui.view.def.IView;
import org.deidentifier.arx.gui.view.impl.common.DelayedSelectionListener;
import org.deidentifier.arx.gui.view.impl.utility.LayoutUtility.ViewUtilityType;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
Expand Down Expand Up @@ -89,17 +89,18 @@ public ViewClassificationAttributes(final Composite parent,
// Create table
features = SWTUtil.createTable(parent, SWT.CHECK | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
features.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(1, 1).create());
features.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent arg0) {
features.addSelectionListener(new DelayedSelectionListener(1000) {
@Override
public void widgetDelayedSelected(SelectionEvent arg0) {
fireEvent();
}
}
});

// Create button
classes = SWTUtil.createTable(parent, SWT.CHECK | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
classes.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(1, 1).create());
classes.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent arg0) {
classes.addSelectionListener(new DelayedSelectionListener(1000) {
public void widgetDelayedSelected(SelectionEvent arg0) {
fireEvent();
}
});
Expand Down

0 comments on commit f7014cc

Please sign in to comment.