Tabnine Logo
ArraySelection.addAll
Code IndexAdd Tabnine to your IDE (free)

How to use
addAll
method
in
com.badlogic.gdx.scenes.scene2d.utils.ArraySelection

Best Java code snippets using com.badlogic.gdx.scenes.scene2d.utils.ArraySelection.addAll (Showing top 7 results out of 315)

origin: libgdx/libgdx

if (UIUtils.ctrl() && selection.getMultiple()) {
  selection.clear();
  selection.addAll(items);
  return true;
origin: libgdx/libgdx

if (UIUtils.ctrl() && selection.getMultiple()) {
  selection.clear();
  selection.addAll(items);
  return true;
origin: com.badlogicgames.gdx/gdx

public boolean keyDown (InputEvent event, int keycode) {
  if (keycode == Keys.A && UIUtils.ctrl() && selection.getMultiple()) {
    selection.clear();
    selection.addAll(items);
    return true;
  }
  return false;
}
origin: bladecoder/bladecoder-adventure-engine

list.getSelection().addAll(sel);
Ctx.project.setModified();
origin: bladecoder/bladecoder-adventure-engine

private void toggleEnabled() {
  if (list.getSelection().size() <= 0)
    return;
  Array<Action> sel = new Array<Action>();
  for (Action a : list.getSelection().toArray()) {
    // CONTROL ACTIONS CAN'T BE DISABLED
    if (a == null || isControlAction(a))
      continue;
    Array<Action> items = list.getItems();
    int pos = items.indexOf(a, true);
    if (a instanceof DisableActionAction) {
      Action a2 = ((DisableActionAction) a).getAction();
      parent.getActions().set(pos, a2);
      items.set(pos, a2);
      sel.add(a2);
    } else {
      DisableActionAction a2 = new DisableActionAction();
      a2.setAction(a);
      parent.getActions().set(pos, a2);
      items.set(pos, a2);
      sel.add(a2);
    }
  }
  Ctx.project.setModified();
  list.getSelection().clear();
  list.getSelection().addAll(sel);
}
origin: bladecoder/bladecoder-adventure-engine

private void up() {
  if (parent == null || list.getSelection().size() == 0)
    return;
  Array<Action> sel = new Array<Action>();
  for (Action a : getSortedSelection()) {
    
    int pos = list.getItems().indexOf(a, true);
    if (pos == -1 || pos == 0)
      return;
    Array<Action> items = list.getItems();
    Action e = items.get(pos);
    Action e2 = items.get(pos - 1);
    sel.add(e);
    if (isControlAction(e) && isControlAction(e2)) {
      continue;
    }
    parent.getActions().set(pos - 1, e);
    parent.getActions().set(pos, e2);
    items.set(pos - 1, e);
    items.set(pos, e2);
  }
  list.getSelection().clear();
  list.getSelection().addAll(sel);
  upBtn.setDisabled(list.getSelectedIndex() == 0);
  downBtn.setDisabled(list.getSelectedIndex() == list.getItems().size - 1);
  Ctx.project.setModified();
}
origin: bladecoder/bladecoder-adventure-engine

private void down() {
  if (parent == null || list.getSelection().size() == 0)
    return;
  Array<Action> sel = new Array<Action>();
  Array<Action> sortedSelection = getSortedSelection();
  for (int i = sortedSelection.size - 1; i >= 0; i--) {
    int pos = list.getItems().indexOf(sortedSelection.get(i), true);
    Array<Action> items = list.getItems();
    if (pos == -1 || pos == items.size - 1)
      return;
    Action e = items.get(pos);
    Action e2 = items.get(pos + 1);
    sel.add(e);
    if (isControlAction(e) && isControlAction(e2)) {
      continue;
    }
    parent.getActions().set(pos + 1, e);
    parent.getActions().set(pos, e2);
    items.set(pos + 1, e);
    items.set(pos, e2);
  }
  list.getSelection().clear();
  list.getSelection().addAll(sel);
  upBtn.setDisabled(list.getSelectedIndex() == 0);
  downBtn.setDisabled(list.getSelectedIndex() == list.getItems().size - 1);
  Ctx.project.setModified();
}
com.badlogic.gdx.scenes.scene2d.utilsArraySelectionaddAll

Popular methods of ArraySelection

  • first
  • items
  • set
  • setRequired
  • choose
  • clear
  • contains
  • getRequired
  • isDisabled
  • setActor
  • setProgrammaticChangeEvents
  • validate
    Removes objects from the selection that are no longer in the items array. If #getRequired() is true
  • setProgrammaticChangeEvents,
  • validate,
  • changed,
  • cleanup,
  • fireChangeEvent,
  • getMultiple,
  • revert,
  • setMultiple,
  • snapshot

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now