Skip to content

Commit

Permalink
Java 1.5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
zapletnev committed Feb 16, 2012
1 parent 860d722 commit 561743e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Expand Up @@ -17,6 +17,8 @@
import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.graphics.Image;
Expand Down Expand Up @@ -46,7 +48,6 @@ public class SearchStatusLine extends SearchPanel {
protected Control createText(Composite parent, int style) {
Control textControl = super.createText(parent, style);
textControl.addFocusListener(new FocusListener() {

@Override
public void focusLost(FocusEvent e) {
setKeyFilter(true);
Expand All @@ -57,6 +58,12 @@ public void focusGained(FocusEvent e) {
setKeyFilter(false);
}
});
textControl.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
setKeyFilter(true);
}
});
return textControl;
}

Expand Down
Expand Up @@ -264,7 +264,7 @@ protected Control createText(final Composite parent, final int style) {
setBackground(false);
title.addModifyListener(modifyListener);
title.addListener(SWT.KeyDown, new Listener() {
@Override
@Override
public void handleEvent(Event event) {
GlanceEventDispatcher.INSTANCE.dispatchKeyPressed(event);
}
Expand Down

0 comments on commit 561743e

Please sign in to comment.