@Override public void actionPerformed(ActionEvent e) { int temp = jt.getSelectedRow(); if (temp == -1) { return; } int temp2 = jt.getSelectedRowCount(); for (int i = 0; i < temp2; i++) { dtm.removeRow(temp); } } }
void deleteEmitter () { int row = emitterTable.getSelectedRow(); if (row == -1) return; int newIndex = Math.min(editIndex, emitterTableModel.getRowCount()-2); editor.removeEmitter(row); emitterTableModel.removeRow(row); //Reload data check emitterTable.getSelectionModel().setSelectionInterval(newIndex, newIndex); }
void deleteEmitter () { int row = emitterTable.getSelectedRow(); if (row == -1) return; int newIndex = Math.min(editIndex, emitterTableModel.getRowCount()-2); editor.removeEmitter(row); emitterTableModel.removeRow(row); //Reload data check emitterTable.getSelectionModel().setSelectionInterval(newIndex, newIndex); }
DefaultTableModel dm = (DefaultTableModel) getModel(); int rowCount = dm.getRowCount(); //Remove rows one by one from the end of the table for (int i = rowCount - 1; i >= 0; i--) { dm.removeRow(i); }
public void remove() { if (hasNext()) self.removeRow(row--); } };
DefaultTableModel model = (DefaultTableModel)this.getModel(); int rows = model.getRowCount(); for(int i = rows - 1; i >=0; i--) { model.removeRow(i); }
void deleteEmitter () { if (editor.effect.getEmitters().size == 1) return; int row = emitterTable.getSelectedRow(); if (row == -1) return; if (row <= editIndex) { int oldEditIndex = editIndex; editIndex = Math.max(0, editIndex - 1); if (oldEditIndex == row) editor.reloadRows(); } editor.effect.getEmitters().removeIndex(row); emitterTableModel.removeRow(row); emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex); }
void deleteEmitter () { if (editor.effect.getEmitters().size == 1) return; int row = emitterTable.getSelectedRow(); if (row == -1) return; if (row <= editIndex) { int oldEditIndex = editIndex; editIndex = Math.max(0, editIndex - 1); if (oldEditIndex == row) editor.reloadRows(); } editor.effect.getEmitters().removeIndex(row); emitterTableModel.removeRow(row); emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex); }
protected void deleteVelocity () { int row = velocityTable.getSelectedRow(); if (row == -1) return; //Remove the velocity from the table ParticleController controller = editor.getEmitter(); DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class); influencer.velocities.removeValue(velocities.removeIndex(row).velocityValue, true); velocityTableModel.removeRow(row); //Restart the effect and reinit the controller editor.restart(); selectedVelocityPanel.setVisible(false); selectedVelocityPanel = null; }
protected void deleteVelocity () { int row = velocityTable.getSelectedRow(); if (row == -1) return; //Remove the velocity from the table ParticleController controller = editor.getEmitter(); DynamicsInfluencer influencer = (DynamicsInfluencer)controller.findInfluencer(DynamicsInfluencer.class); influencer.velocities.removeValue(velocities.removeIndex(row).velocityValue, true); velocityTableModel.removeRow(row); //Restart the effect and reinit the controller editor.restart(); selectedVelocityPanel.setVisible(false); selectedVelocityPanel = null; }
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); }
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); }
private void set (DynamicsInfluencer influencer) { //Clear for (int i = velocityTableModel.getRowCount() - 1; i >= 0; i--) { velocityTableModel.removeRow(i); } velocities.clear(); //Add for(int i=0, c = influencer.velocities.size; i < c; ++i){ velocities.add(new VelocityWrapper((DynamicsModifier)influencer.velocities.items[i], true)); velocityTableModel.addRow(new Object[] {"Velocity "+i, true}); } DefaultComboBoxModel model = (DefaultComboBoxModel) velocityBox.getModel(); model.removeAllElements(); for(Object velocityObject : getAvailableVelocities(editor.getControllerType())){ model.addElement(velocityObject); } }
private void set (DynamicsInfluencer influencer) { //Clear for (int i = velocityTableModel.getRowCount() - 1; i >= 0; i--) { velocityTableModel.removeRow(i); } velocities.clear(); //Add for(int i=0, c = influencer.velocities.size; i < c; ++i){ velocities.add(new VelocityWrapper((DynamicsModifier)influencer.velocities.items[i], true)); velocityTableModel.addRow(new Object[] {"Velocity "+i, true}); } DefaultComboBoxModel model = (DefaultComboBoxModel) velocityBox.getModel(); model.removeAllElements(); for(Object velocityObject : getAvailableVelocities(editor.getControllerType())){ model.addElement(velocityObject); } }
messagesTable.removeRow(0);
messagesTable.removeRow(0);
int row = table.getEditingRow(); table.getCellEditor().stopCellEditing(); ((DefaultTableModel) table.getModel()).removeRow(row);
private void removeSelectedPatternRemover() { int[] rows = customRemoverTable.getSelectedRows(); Arrays.sort(rows); DefaultTableModel model = (DefaultTableModel) this.customRemoverTable.getModel(); for (int i = rows.length; i > 0; i--) { int row = rows[i-1]; model.removeRow(row); } }
/** * Delete all rows from the table. */ public void clear() { while (model.getRowCount()>0){ model.removeRow(0); } //model.dropData(); this.offset = 0; this.first = true; }
public void onRemoveButtonClick(ActionEvent e) { int[] rows = table.getSelectedRows(); for (int i = 0; i < rows.length; i++) { model.removeRow(rows[i] - i); scan.removeMatchRule(rows[i] - i); } }