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

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

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

origin: libgdx/libgdx

/** Sets the selection to only the selected index. */
public void setSelectedIndex (int index) {
  selection.set(items.get(index));
}
origin: libgdx/libgdx

/** Sets the selection to only the selected index. */
public void setSelectedIndex (int index) {
  selection.set(items.get(index));
}
origin: libgdx/libgdx

/** Sets the selection to only the passed item, if it is a possible choice, else selects the first item. */
public void setSelected (T item) {
  if (items.contains(item, false))
    selection.set(item);
  else if (items.size > 0)
    selection.set(items.first());
  else
    selection.clear();
}
origin: libgdx/libgdx

/** Sets the selection to only the passed item, if it is a possible choice, else selects the first item. */
public void setSelected (T item) {
  if (items.contains(item, false))
    selection.set(item);
  else if (items.size > 0)
    selection.set(items.first());
  else
    selection.clear();
}
origin: libgdx/libgdx

/** Sets the selection to only the selected index.
 * @param index -1 to clear the selection. */
public void setSelectedIndex (int index) {
  if (index < -1 || index >= items.size)
    throw new IllegalArgumentException("index must be >= -1 and < " + items.size + ": " + index);
  if (index == -1) {
    selection.clear();
  } else {
    selection.set(items.get(index));
  }
}
origin: libgdx/libgdx

/** Sets the selection to only the selected index.
 * @param index -1 to clear the selection. */
public void setSelectedIndex (int index) {
  if (index < -1 || index >= items.size)
    throw new IllegalArgumentException("index must be >= -1 and < " + items.size + ": " + index);
  if (index == -1) {
    selection.clear();
  } else {
    selection.set(items.get(index));
  }
}
origin: libgdx/libgdx

/** Sets the selection to only the passed item, if it is a possible choice.
 * @param item May be null. */
public void setSelected (T item) {
  if (items.contains(item, false))
    selection.set(item);
  else if (selection.getRequired() && items.size > 0)
    selection.set(items.first());
  else
    selection.clear();
}
origin: libgdx/libgdx

/** Sets the selection to only the passed item, if it is a possible choice.
 * @param item May be null. */
public void setSelected (T item) {
  if (items.contains(item, false))
    selection.set(item);
  else if (selection.getRequired() && items.size > 0)
    selection.set(items.first());
  else
    selection.clear();
}
origin: libgdx/libgdx

  public void exit (InputEvent event, float x, float y, int pointer, Actor toActor) {
    if (toActor == null || !isAscendantOf(toActor)) list.selection.set(selectBox.getSelected());
  }
});
origin: libgdx/libgdx

  public void exit (InputEvent event, float x, float y, int pointer, Actor toActor) {
    if (toActor == null || !isAscendantOf(toActor)) list.selection.set(selectBox.getSelected());
  }
});
origin: libgdx/libgdx

  /** Removes objects from the selection that are no longer in the items array. If {@link #getRequired()} is true and there is no
   * selected item, the first item is selected. */
  public void validate () {
    Array<T> array = this.array;
    if (array.size == 0) {
      clear();
      return;
    }
    for (Iterator<T> iter = items().iterator(); iter.hasNext();) {
      T selected = iter.next();
      if (!array.contains(selected, false)) iter.remove();
    }
    if (required && selected.size == 0) set(array.first());
  }
}
origin: libgdx/libgdx

  /** Removes objects from the selection that are no longer in the items array. If {@link #getRequired()} is true and there is no
   * selected item, the first item is selected. */
  public void validate () {
    Array<T> array = this.array;
    if (array.size == 0) {
      clear();
      return;
    }
    for (Iterator<T> iter = items().iterator(); iter.hasNext();) {
      T selected = iter.next();
      if (!array.contains(selected, false)) iter.remove();
    }
    if (required && selected.size == 0) set(array.first());
  }
}
origin: libgdx/libgdx

public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  Actor target = event.getTarget();
  if (isAscendantOf(target)) return false;
  list.selection.set(selectBox.getSelected());
  hide();
  return false;
}
origin: libgdx/libgdx

public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  Actor target = event.getTarget();
  if (isAscendantOf(target)) return false;
  list.selection.set(selectBox.getSelected());
  hide();
  return false;
}
origin: libgdx/libgdx

stage.setScrollFocus(this);
list.selection.set(selectBox.getSelected());
list.setTouchable(Touchable.enabled);
clearActions();
origin: libgdx/libgdx

stage.setScrollFocus(this);
list.selection.set(selectBox.getSelected());
list.setTouchable(Touchable.enabled);
clearActions();
origin: com.badlogicgames.gdx/gdx

/** Sets the selection to only the passed item, if it is a possible choice, else selects the first item. */
public void setSelected (T item) {
  if (items.contains(item, false))
    selection.set(item);
  else if (items.size > 0)
    selection.set(items.first());
  else
    selection.clear();
}
origin: com.badlogicgames.gdx/gdx

/** Sets the selection to only the selected index.
 * @param index -1 to clear the selection. */
public void setSelectedIndex (int index) {
  if (index < -1 || index >= items.size)
    throw new IllegalArgumentException("index must be >= -1 and < " + items.size + ": " + index);
  if (index == -1) {
    selection.clear();
  } else {
    selection.set(items.get(index));
  }
}
origin: com.badlogicgames.gdx/gdx

/** Sets the selection to only the passed item, if it is a possible choice.
 * @param item May be null. */
public void setSelected (T item) {
  if (items.contains(item, false))
    selection.set(item);
  else if (selection.getRequired() && items.size > 0)
    selection.set(items.first());
  else
    selection.clear();
}
origin: com.badlogicgames.gdx/gdx

public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
  Actor target = event.getTarget();
  if (isAscendantOf(target)) return false;
  list.selection.set(selectBox.getSelected());
  hide();
  return false;
}
com.badlogic.gdx.scenes.scene2d.utilsArraySelectionset

Popular methods of ArraySelection

  • first
  • items
  • setRequired
  • addAll
  • 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