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

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JLabel (javax.swing)
  • JPanel (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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