List of usage examples for com.badlogic.gdx.scenes.scene2d.ui SelectBox clearItems
public void clearItems()
From source file:com.bladecoder.engineeditor.ui.EditAnimationDialog.java
License:Apache License
private void fillAnimations() { @SuppressWarnings("unchecked") SelectBox<String> cb = (SelectBox<String>) id.getField(); cb.clearItems(); // When creating, give option to add all elements if (e == null) cb.getItems().add("<ADD ALL>"); String ids[] = spriteWidget.getAnimations(); for (String s : ids) cb.getItems().add(s);/* w w w . j a v a 2 s . c om*/ cb.getList().setItems(cb.getItems()); if (cb.getItems().size > 0) cb.setSelectedIndex(0); cb.invalidateHierarchy(); setAnimation(); }