List of usage examples for java.awt.event FocusEvent FocusEvent
public FocusEvent(Component source, int id, boolean temporary, Component opposite)
From source file:com.github.fritaly.dualcommander.TabbedPane.java
@Override public void focusGained(FocusEvent e) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusGained(event); }//from w ww . j av a 2 s . c o m } }
From source file:com.github.fritaly.dualcommander.TabbedPane.java
@Override public void focusLost(FocusEvent e) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusLost(event);//from w w w. j a v a 2 s . co m } } }
From source file:com.github.fritaly.dualcommander.DirectoryBrowser.java
@Override public void focusGained(FocusEvent e) { if (e.getSource() == table) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusGained(event); }/* w ww . j a v a2 s .co m*/ } } }
From source file:com.github.fritaly.dualcommander.DirectoryBrowser.java
@Override public void focusLost(FocusEvent e) { if (e.getSource() == table) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusLost(event); }/* w w w. jav a 2 s. c o m*/ } } }