public void insert (int index, T value) { if (iterating > 0) throw new IllegalStateException("Invalid between begin/end."); super.insert(index, value); }
public void insert (int index, T value) { if (iterating > 0) throw new IllegalStateException("Invalid between begin/end."); super.insert(index, value); }
public void insert (int index, Node node) { node.parent = this; children.insert(index, node); updateChildren(); }
public void insert (int index, Node node) { node.parent = this; children.insert(index, node); updateChildren(); }
public void insert (int index, T value) { modified(); super.insert(index, value); }
public void insert (int index, T value) { modified(); super.insert(index, value); }
/** Sets the z-index of this actor. The z-index is the index into the parent's {@link Group#getChildren() children}, where a * lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. * Setting a z-index less than zero is invalid. * @return true if the z-index changed. */ public boolean setZIndex (int index) { if (index < 0) throw new IllegalArgumentException("ZIndex cannot be < 0."); Group parent = this.parent; if (parent == null) return false; Array<Actor> children = parent.children; if (children.size == 1) return false; index = Math.min(index, children.size - 1); if (children.get(index) == this) return false; if (!children.removeValue(this, true)) return false; children.insert(index, this); return true; }
/** Sets the z-index of this actor. The z-index is the index into the parent's {@link Group#getChildren() children}, where a * lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. * Setting a z-index less than zero is invalid. * @return true if the z-index changed. */ public boolean setZIndex (int index) { if (index < 0) throw new IllegalArgumentException("ZIndex cannot be < 0."); Group parent = this.parent; if (parent == null) return false; Array<Actor> children = parent.children; if (children.size == 1) return false; index = Math.min(index, children.size - 1); if (children.get(index) == this) return false; if (!children.removeValue(this, true)) return false; children.insert(index, this); return true; }
/** Replaces the Influencer of the given type with the one passed as parameter. */ public <K extends Influencer> boolean replaceInfluencer (Class<K> type, K newInfluencer) { int index = findIndex(type); if (index > -1) { influencers.insert(index, newInfluencer); influencers.removeIndex(index + 1); return true; } return false; }
/** Replaces the Influencer of the given type with the one passed as parameter. */ public <K extends Influencer> boolean replaceInfluencer (Class<K> type, K newInfluencer) { int index = findIndex(type); if (index > -1) { influencers.insert(index, newInfluencer); influencers.removeIndex(index + 1); return true; } return false; }
@Override public void actionPerformed (ActionEvent e) { int index = imageList.getSelectedIndex(); if (index < 0 || index >= imageList.getModel().getSize() - 1) return; final ParticleEmitter emitter = editor.getEmitter(); String imagePath = emitter.getImagePaths().removeIndex(index); emitter.getImagePaths().insert(index + 1, imagePath); emitter.getSprites().clear(); updateImageList(emitter.getImagePaths()); imageList.setSelectedIndex(index + 1); } });
@Override public void actionPerformed (ActionEvent e) { int index = imageList.getSelectedIndex(); if (index < 0 || index >= imageList.getModel().getSize() - 1) return; final ParticleEmitter emitter = editor.getEmitter(); String imagePath = emitter.getImagePaths().removeIndex(index); emitter.getImagePaths().insert(index + 1, imagePath); emitter.getSprites().clear(); updateImageList(emitter.getImagePaths()); imageList.setSelectedIndex(index + 1); } });
public void insert (int index, Node node) { int existingIndex = rootNodes.indexOf(node, true); if (existingIndex != -1 && existingIndex < index) index--; remove(node); node.parent = null; rootNodes.insert(index, node); node.addToTree(this); invalidateHierarchy(); }
public void insert (int index, Node node) { int existingIndex = rootNodes.indexOf(node, true); if (existingIndex != -1 && existingIndex < index) index--; remove(node); node.parent = null; rootNodes.insert(index, node); node.addToTree(this); invalidateHierarchy(); }
@Override public void actionPerformed (ActionEvent e) { int index = imageList.getSelectedIndex(); if (index <= 0) return; final ParticleEmitter emitter = editor.getEmitter(); String imagePath = emitter.getImagePaths().removeIndex(index); emitter.getImagePaths().insert(index - 1, imagePath); emitter.getSprites().clear(); updateImageList(emitter.getImagePaths()); imageList.setSelectedIndex(index - 1); } });
void move (int direction) { if (direction < 0 && editIndex == 0) return; Array<ParticleEmitter> emitters = editor.effect.getEmitters(); if (direction > 0 && editIndex == emitters.size - 1) return; int insertIndex = editIndex + direction; Object name = emitterTableModel.getValueAt(editIndex, 0); emitterTableModel.removeRow(editIndex); ParticleEmitter emitter = emitters.removeIndex(editIndex); emitterTableModel.insertRow(insertIndex, new Object[] {name}); emitters.insert(insertIndex, emitter); editIndex = insertIndex; emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex); }
@Override public void actionPerformed (ActionEvent e) { int index = imageList.getSelectedIndex(); if (index <= 0) return; final ParticleEmitter emitter = editor.getEmitter(); String imagePath = emitter.getImagePaths().removeIndex(index); emitter.getImagePaths().insert(index - 1, imagePath); emitter.getSprites().clear(); updateImageList(emitter.getImagePaths()); imageList.setSelectedIndex(index - 1); } });
void move (int direction) { if (direction < 0 && editIndex == 0) return; Array<ParticleEmitter> emitters = editor.effect.getEmitters(); if (direction > 0 && editIndex == emitters.size - 1) return; int insertIndex = editIndex + direction; Object name = emitterTableModel.getValueAt(editIndex, 0); emitterTableModel.removeRow(editIndex); ParticleEmitter emitter = emitters.removeIndex(editIndex); emitterTableModel.insertRow(insertIndex, new Object[] {name}); emitters.insert(insertIndex, emitter); editIndex = insertIndex; emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex); }