/** Overridden to check the focus event countdown and initiate editing on * the second focus event following a failed edit (dialog was shown) */ public void processFocusEvent(FocusEvent fe) { super.processFocusEvent(fe); if (fe.getID() == fe.FOCUS_GAINED) { countDown--; if (countDown == 0) { autoEdit(); } } if (fe.getID() == fe.FOCUS_GAINED || (fe.getOppositeComponent() != null && fe.getID() == fe.FOCUS_LOST && !isAncestorOf(fe.getOppositeComponent()))) { //Ensure the description goes back to the node description if //we lose focus fireChange(); } }
/** Overridden to check the focus event countdown and initiate editing on * the second focus event following a failed edit (dialog was shown) */ public void processFocusEvent(FocusEvent fe) { super.processFocusEvent(fe); if (fe.getID() == fe.FOCUS_GAINED) { countDown--; if (countDown == 0) { autoEdit(); } } if (fe.getID() == fe.FOCUS_GAINED || (fe.getOppositeComponent() != null && fe.getID() == fe.FOCUS_LOST && !isAncestorOf(fe.getOppositeComponent()))) { //Ensure the description goes back to the node description if //we lose focus fireChange(); } }
/** Overridden to check the focus event countdown and initiate editing on * the second focus event following a failed edit (dialog was shown) */ @Override public void processFocusEvent(FocusEvent fe) { super.processFocusEvent(fe); if (fe.getID() == fe.FOCUS_GAINED) { countDown--; if (countDown == 0) { autoEdit(); } } if ( (fe.getID() == fe.FOCUS_GAINED) || ((fe.getOppositeComponent() != null) && (fe.getID() == fe.FOCUS_LOST) && !isAncestorOf(fe.getOppositeComponent())) ) { //Ensure the description goes back to the node description if //we lose focus fireChange(); } }