Example usage for javax.swing JComponent setVerifyInputWhenFocusTarget

List of usage examples for javax.swing JComponent setVerifyInputWhenFocusTarget

Introduction

In this page you can find the example usage for javax.swing JComponent setVerifyInputWhenFocusTarget.

Prototype

@BeanProperty(description = "Whether the Component verifies input before accepting focus.")
public void setVerifyInputWhenFocusTarget(boolean verifyInputWhenFocusTarget) 

Source Link

Document

Sets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.

Usage

From source file:com.aw.swing.mvp.Presenter.java

protected void registerFwActions() {
    boolean existCancel = actionRsr.getActions()
            .containsKey(ActionIdentifier.getActionIdentifier(ActionNames.ACTION_CANCEL));
    if (!existCancel) {
        com.aw.swing.mvp.action.Action cancelAction = new CancelAction();
        if (this instanceof FindPresenter || !showCancelMsgConfirmation) {
            cancelAction.setConfirmMsg("");
        }//www.  j a  v a 2s  .  c  om
        JComponent jComponent = (JComponent) getIpView().getComponent("btnCancel");
        if (jComponent != null) {
            jComponent.setVerifyInputWhenFocusTarget(false);
        }
        actionRsr.registerAction(ActionNames.ACTION_CANCEL, cancelAction);
    }
    if (ViewMode.MODE_PICK.equals(getViewMode())) {
        actionRsr.registerAction(ActionNames.ACTION_PICK_SELECT, new PickSelectItemAction(), getGridProvider());
    }
}