Skip to content

Commit

Permalink
Fixed issue #698.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Jul 3, 2018
1 parent 06ec0d7 commit 0b78b3f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/org/nschmidt/ldparteditor/helpers/WUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
package org.nschmidt.ldparteditor.helpers;

import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Widget;
import org.nschmidt.ldparteditor.composites.compositetab.CompositeTabFolder;
import org.nschmidt.ldparteditor.logger.NLogger;
import org.nschmidt.ldparteditor.widgets.NButton;

/**
Expand Down Expand Up @@ -60,6 +64,29 @@ public void widgetSelected(SelectionEvent e) {
listener.widgetSelected(e);
}
});
} else if (w instanceof CompositeTabFolder) {
((CompositeTabFolder)w).addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
listener.widgetSelected(e);
}
});
} else if (w instanceof CTabFolder) {
((CTabFolder)w).addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
listener.widgetSelected(e);
}
});
} else if (w instanceof ScrollBar) {
((ScrollBar)w).addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
listener.widgetSelected(e);
}
});
} else if (w != null){
NLogger.error(getClass(), "No mapping for type:" + w.getClass().getName()); //$NON-NLS-1$
}
}
}

0 comments on commit 0b78b3f

Please sign in to comment.