List of usage examples for com.badlogic.gdx.utils SnapshotArray SnapshotArray
public SnapshotArray(T[] array)
From source file:com.gdx.extension.ui.grid.GridSelection.java
License:Apache License
/** * Relayout the grid with {@link itemCount}. *///from w w w . jav a2s. c o m public void relayout() { SnapshotArray<T> _actors = new SnapshotArray<T>(gridItemGroup.getActors()); gridItemGroup.clear(); if (isVertical) { for (VerticalGroup _column : columns) _column.clear(); } else { for (HorizontalGroup _row : rows) _row.clear(); } for (T _item : _actors) addItem(_item); }
From source file:com.vlaaad.dice.game.world.events.EventDispatcher.java
License:Open Source License
@SuppressWarnings("unchecked") private <T> SnapshotArray<EventListener<T>> getList(EventType<T> type, boolean createIfNotExist) { Object list = data.get(type); if (list == null) { if (!createIfNotExist) return null; SnapshotArray<EventListener<T>> result = new SnapshotArray<EventListener<T>>(EventListener.class); data.put(type, result);/*from ww w .j a v a2s . co m*/ return result; } return (SnapshotArray<EventListener<T>>) list; }
From source file:es.eucm.ead.editor.view.controllers.OptionsController.java
License:Open Source License
public OptionsController(Controller controller, Skin skin) { this.controller = controller; i18n = controller.getApplicationAssets().getI18N(); this.skin = skin; this.optionValues = new HashMap<String, Object>(); this.optionControllers = new HashMap<String, OptionController>(); this.changeListeners = new SnapshotArray<ChangeListener>(ChangeListener.class); panel = newOptionsPanel(skin);/*from w w w . jav a 2 s. com*/ }