Java Code Examples for com.kotcrab.vis.ui.FocusManager#resetFocus()
The following examples show how to use
com.kotcrab.vis.ui.FocusManager#resetFocus() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VisWindow.java From vis-ui with Apache License 2.0 | 6 votes |
/** * Fade outs this window, when fade out animation is completed, window is removed from Stage. Calling this for the * second time won't have any effect if previous animation is still running. */ public void fadeOut (float time) { if (fadeOutActionRunning) return; fadeOutActionRunning = true; final Touchable previousTouchable = getTouchable(); setTouchable(Touchable.disabled); Stage stage = getStage(); if (stage != null && stage.getKeyboardFocus() != null && stage.getKeyboardFocus().isDescendantOf(this)) { FocusManager.resetFocus(stage); } addAction(Actions.sequence(Actions.fadeOut(time, Interpolation.fade), new Action() { @Override public boolean act (float delta) { setTouchable(previousTouchable); remove(); getColor().a = 1f; fadeOutActionRunning = false; return true; } })); }
Example 2
Source File: VisTextField.java From vis-ui with Apache License 2.0 | 5 votes |
@Override public void setDisabled (boolean disabled) { this.disabled = disabled; if (disabled) { FocusManager.resetFocus(getStage(), this); keyRepeatTask.cancel(); } }
Example 3
Source File: GlobalActions.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@LmlAction("resetViewFocus") public void resetViewFocus() { FocusManager.resetFocus(getStage()); }
Example 4
Source File: VisImageTextButton.java From vis-ui with Apache License 2.0 | 4 votes |
@Override public void setDisabled (boolean disabled) { super.setDisabled(disabled); if (disabled) FocusManager.resetFocus(getStage(), this); }
Example 5
Source File: VisImageButton.java From vis-ui with Apache License 2.0 | 4 votes |
@Override public void setDisabled (boolean disabled) { super.setDisabled(disabled); if (disabled) FocusManager.resetFocus(getStage(), this); }