本文整理汇总了Java中java.awt.event.FocusListener.focusLost方法的典型用法代码示例。如果您正苦于以下问题:Java FocusListener.focusLost方法的具体用法?Java FocusListener.focusLost怎么用?Java FocusListener.focusLost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.event.FocusListener
的用法示例。
在下文中一共展示了FocusListener.focusLost方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: focusLost
import java.awt.event.FocusListener; //导入方法依赖的package包/类
/** Delegates to the original listener.
*/
@Override public void focusLost(FocusEvent ev) {
FocusListener l = (FocusListener) super.get(ev);
if (l != null) {
l.focusLost(ev);
}
}
示例2: focusLost
import java.awt.event.FocusListener; //导入方法依赖的package包/类
/** Delegates to the original listener.
*/
public void focusLost(FocusEvent ev) {
FocusListener l = (FocusListener) super.get(ev);
if (l != null) {
l.focusLost(ev);
}
}
示例3: testModifyAndAltTabAway
import java.awt.event.FocusListener; //导入方法依赖的package包/类
public void testModifyAndAltTabAway() throws IOException {
configureFromFileText("x.txt", "xxx<caret>\nyyy");
type(' ');
FocusEvent event = new FocusEvent(getEditor().getContentComponent(), 1005);
FocusListener[] listeners = getEditor().getContentComponent().getListeners(FocusListener.class);
for (FocusListener listener : listeners) {
listener.focusLost(event);
}
stripTrailingSpaces();
checkResultByText("xxx <caret>\nyyy");
}
示例4: focusLost
import java.awt.event.FocusListener; //导入方法依赖的package包/类
@Override
public void focusLost(FocusEvent evt) {
focusCatched = evt.getOppositeComponent()==target;//On a récupéré le focus directement depuis la cible
boolean stillFocused = focusCatched;
focusCatched = false;focused=false;
if(!canDispatch(evt) || stillFocused) {return;}
FocusEvent e = new FocusEvent(evt.getComponent(), evt.getID(), evt.isTemporary(), evt.getOppositeComponent());
FocusListener[] listeners = getListenersAndAdaptEvent(e, FocusListener.class);
for(FocusListener l : listeners) {l.focusLost(e);}
}
示例5: processFocusEventImpl
import java.awt.event.FocusListener; //导入方法依赖的package包/类
private void processFocusEventImpl(FocusEvent e, Collection<FocusListener> c) {
for (FocusListener listener : c) {
switch (e.getID()) {
case FocusEvent.FOCUS_GAINED:
listener.focusGained(e);
break;
case FocusEvent.FOCUS_LOST:
listener.focusLost(e);
break;
}
}
}
示例6: focusLost
import java.awt.event.FocusListener; //导入方法依赖的package包/类
@Override
public void focusLost(FocusEvent e) {
for (FocusListener listener : myFocusListeners) {
listener.focusLost(e);
}
}
示例7: invokeFocusLost
import java.awt.event.FocusListener; //导入方法依赖的package包/类
public static void invokeFocusLost(Component component) {
FocusListener[] fls = component.getFocusListeners();
for (FocusListener focusListener : fls) {
focusListener.focusLost(new FocusEvent(component, FocusEvent.FOCUS_LOST));
}
}
示例8: focusLost
import java.awt.event.FocusListener; //导入方法依赖的package包/类
/** Delegates to the original listener.
*/
public void focusLost(FocusEvent ev) {
FocusListener l = (FocusListener)super.get (ev);
if (l != null) l.focusLost (ev);
}