Codota Logo
FocusManager
Code IndexAdd Codota to your IDE (free)

How to use
FocusManager
in
com.kotcrab.vis.ui

Best Java code snippets using com.kotcrab.vis.ui.FocusManager (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    FocusManager.resetFocus(getStage());
    return false;
  }
});
origin: kotcrab/vis-ui

@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  FocusManager.switchFocus(getChooserStage(), ShortcutItem.this);
  getChooserStage().setKeyboardFocus(ShortcutItem.this);
  return true;
}
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    Focusable focusable = FocusManager.getFocusedWidget();
    if (focusable instanceof Actor == false || isAscendantOf((Actor) focusable) == false) {
      FocusManager.resetFocus(getStage());
    }
    return false;
  }
});
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    FocusManager.resetFocus(getStage());
    return false;
  }
});
origin: kotcrab/vis-ui

@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  FocusManager.switchFocus(getChooserStage(), FileItem.this);
  getChooserStage().setKeyboardFocus(FileItem.this);
  return true;
}
origin: kotcrab/vis-ui

@Override
public void setDisabled (boolean disabled) {
  super.setDisabled(disabled);
  if (disabled) FocusManager.resetFocus(getStage(), this);
}
origin: crashinvaders/gdx-texture-packer-gui

@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  /*if (isDisabled() == false)*/ FocusManager.switchFocus(getStage(), SeekBar.this);
  return false;
}
origin: kotcrab/vis-ui

@Override
public void setDisabled (boolean disabled) {
  super.setDisabled(disabled);
  if (disabled) FocusManager.resetFocus(getStage(), this);
}
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    if (isDisabled() == false) FocusManager.switchFocus(getStage(), VisTextButton.this);
    return false;
  }
});
origin: kotcrab/vis-ui

@Override
public void setDisabled (boolean disabled) {
  this.disabled = disabled;
  if (disabled) {
    FocusManager.resetFocus(getStage(), this);
    keyRepeatTask.cancel();
  }
}
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    if (isDisabled() == false) FocusManager.switchFocus(getStage(), VisImageButton.this);
    return false;
  }
});
origin: crashinvaders/gdx-texture-packer-gui

@LmlAction("resetViewFocus") public void resetViewFocus() {
  FocusManager.resetFocus(getStage());
}
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    if (isDisabled() == false) FocusManager.switchFocus(getStage(), VisImageTextButton.this);
    return false;
  }
});
origin: kotcrab/vis-ui

@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  if (isTouchable() == false) return false;
  if (draggingPointer != -1) return false;
  if (pointer == 0 && button != 0) return false;
  Rectangle containingHandle = getHandleContaining(x, y);
  if (containingHandle != null) {
    handleOverIndex = handleBounds.indexOf(containingHandle, true);
    FocusManager.resetFocus(getStage());
    draggingPointer = pointer;
    lastPoint.set(x, y);
    handlePosition.set(containingHandle.x, containingHandle.y);
    return true;
  }
  return false;
}
origin: kotcrab/vis-ui

  @Override
  public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
    if (isDisabled() == false) FocusManager.switchFocus(getStage(), VisCheckBox.this);
    return false;
  }
});
origin: kotcrab/vis-ui

@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  //TODO potential bug with libgdx scene2d?
  //fixes issue when split bar could be still dragged even when touchable is set to childrenOnly, probably scene2d issue
  if (isTouchable() == false) return false;
  if (draggingPointer != -1) return false;
  if (pointer == 0 && button != 0) return false;
  if (handleBounds.contains(x, y)) {
    FocusManager.resetFocus(getStage());
    draggingPointer = pointer;
    lastPoint.set(x, y);
    handlePosition.set(handleBounds.x, handleBounds.y);
    return true;
  }
  return false;
}
origin: crashinvaders/gdx-texture-packer-gui

  private void fillUpdateDetailsGroup(VersionData versionData) {
    lblVersionNew.setText(versionData.getVersion().toString());
    FocusManager.switchFocus(btnVisitUpdatePage.getStage(), btnVisitUpdatePage);
  }
}
origin: mbrlabs/Mundus

@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
  if (isTouchable() == false) return false;
  if (draggingPointer != -1) return false;
  if (pointer == 0 && button != 0) return false;
  Rectangle containingHandle = getHandleContaining(x, y);
  if (containingHandle != null) {
    handleOverIndex = handleBounds.indexOf(containingHandle, true);
    FocusManager.resetFocus(getStage());
    draggingPointer = pointer;
    lastPoint.set(x, y);
    handlePosition.set(containingHandle.x, containingHandle.y);
    return true;
  }
  return false;
}
origin: kotcrab/vis-ui

@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  if (!super.touchDown(event, x, y, pointer, button)) return false;
  if (pointer == 0 && button != 0) return false;
  if (disabled) return true;
  Stage stage = getStage();
  FocusManager.switchFocus(stage, VisTextField.this);
  setCursorPosition(x, y);
  selectionStart = cursor;
  if (stage != null) stage.setKeyboardFocus(VisTextField.this);
  if (readOnly == false) keyboard.show(true);
  hasSelection = true;
  return true;
}
origin: mbrlabs/Mundus

@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
  // TODO potential bug with libgdx scene2d?
  // fixes issue when split bar could be still dragged even when
  // touchable is set to childrenOnly, probably scene2d issue
  if (isTouchable() == false) return false;
  if (draggingPointer != -1) return false;
  if (pointer == 0 && button != 0) return false;
  if (handleBounds.contains(x, y)) {
    FocusManager.resetFocus(getStage());
    draggingPointer = pointer;
    lastPoint.set(x, y);
    handlePosition.set(handleBounds.x, handleBounds.y);
    return true;
  }
  return false;
}
com.kotcrab.vis.uiFocusManager

Javadoc

Manages focus of VisUI components. This is different from stage2d.ui focus management. In scene2d widgets can only acquire keyboard and scroll focus. VisUI focus managers allows any widget to acquire general user focus, this is used mainly to manage rendering focus borders around widgets. Generally there is no need to call those method manually.

Most used methods

  • resetFocus
    Takes focus from current focused widget (if any), and sets current focused widget to null
  • switchFocus
    Takes focus from current focused widget (if any), and sets focus to provided widget
  • getFocusedWidget

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Kernel (java.awt.image)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • ImageIO (javax.imageio)
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now