当前位置: 首页>>代码示例>>Java>>正文


Java FocusListener.focusGained方法代码示例

本文整理汇总了Java中java.awt.event.FocusListener.focusGained方法的典型用法代码示例。如果您正苦于以下问题:Java FocusListener.focusGained方法的具体用法?Java FocusListener.focusGained怎么用?Java FocusListener.focusGained使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.event.FocusListener的用法示例。


在下文中一共展示了FocusListener.focusGained方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: focusGained

import java.awt.event.FocusListener; //导入方法依赖的package包/类
/** Delegates to the original listener.
*/
public void focusGained(FocusEvent ev) {
    FocusListener l = (FocusListener) super.get(ev);

    if (l != null) {
        l.focusGained(ev);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:WeakListener.java

示例2: focusGained

import java.awt.event.FocusListener; //导入方法依赖的package包/类
/** Delegates to the original listener.
*/
@Override public void focusGained(FocusEvent ev) {
    FocusListener l = (FocusListener) super.get(ev);

    if (l != null) {
        l.focusGained(ev);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:WeakListenerImpl.java

示例3: focusGained

import java.awt.event.FocusListener; //导入方法依赖的package包/类
@Override
public void focusGained(FocusEvent evt) {
    focusCatched = evt.getOppositeComponent()==target;//On a récupéré le focus directement depuis la cible
    boolean alreadyFocused = focusCatched || focused;
    focusCatched = true;focused=true;
    if(!canDispatch(evt) || alreadyFocused) {return;}
    FocusEvent e = new FocusEvent(evt.getComponent(), evt.getID(), evt.isTemporary(), evt.getOppositeComponent());
    FocusListener[] listeners = getListenersAndAdaptEvent(e, FocusListener.class);
    for(FocusListener l : listeners) {l.focusGained(e);}
}
 
开发者ID:Sharcoux,项目名称:MathEOS,代码行数:11,代码来源:GlobalDispatcher.java

示例4: 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;
        }
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:13,代码来源:Component.java

示例5: testToolBarFocusListener

import java.awt.event.FocusListener; //导入方法依赖的package包/类
public void testToolBarFocusListener() {
    toolBar.add(b);
    FocusListener l = ui.createToolBarFocusListener();
    FocusEvent e = new FocusEvent(b, FocusEvent.FOCUS_GAINED);
    l.focusGained(e);
    assertEquals(toolBar.getComponentIndex(b), ui.focusedCompIndex);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:8,代码来源:BasicToolBarUITest.java

示例6: focusGained

import java.awt.event.FocusListener; //导入方法依赖的package包/类
@Override
public void focusGained(FocusEvent e) {
  for (FocusListener listener : myFocusListeners) {
    listener.focusGained(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:EditorTextField.java

示例7: focusGained

import java.awt.event.FocusListener; //导入方法依赖的package包/类
/** Delegates to the original listener.
*/
public void focusGained(FocusEvent ev) {
    FocusListener l = (FocusListener)super.get (ev);
    if (l != null) l.focusGained (ev);
}
 
开发者ID:CharlesSkelton,项目名称:studio,代码行数:7,代码来源:WeakListener.java


注:本文中的java.awt.event.FocusListener.focusGained方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。