SimpleTestStepLocation.java 文件源码

java
阅读 47 收藏 0 点赞 0 评论 0

项目:incubator-netbeans 作者:
/**
 */
private void tfClassToTestFocusLost(FocusEvent e) {
    final Component allowFocusGain = focusGainAllowedFor;
    focusGainAllowedFor = null;

    if (multipleSourceRoots
            && interactionRestrictionsActive
            && !interactionRestrictionsSuspended) {

        final Component opposite = e.getOppositeComponent();

        if ((allowFocusGain != null) && (opposite == allowFocusGain)) {
            return;
        }
        if (opposite == btnBrowse) {
            return;
        }
        if ((opposite instanceof JLabel)
                && (((JLabel) opposite).getLabelFor() == tfClassToTest)) {
            /*
             * When a JLabel's mnemonic key is pressed, the JLabel gains focus
             * until the key is released again. That's why we must ignore such
             * focus transfers.
             */
            return;
        }

        if (!maybeDisplaySourceGroupChooser()) {

            /* send the request back to the Test to Class textfield: */
            tfClassToTest.requestFocus();
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号