se ejecuto limpieza del codigo, reformateo del codigo y optimizacion de los imports por parte del IDE
This commit is contained in:
@@ -36,7 +36,7 @@ public class EgresosTableModel extends AbstractTableModel {
|
||||
private NumberFormat nf;
|
||||
|
||||
|
||||
public EgresosTableModel(){
|
||||
public EgresosTableModel() {
|
||||
super();
|
||||
this.columns = new String[]{"N°", "Descripcion", "Valor", "Tipo"};
|
||||
this.rows = new ArrayList<>();
|
||||
@@ -61,31 +61,31 @@ public class EgresosTableModel extends AbstractTableModel {
|
||||
|
||||
public void addRow(Egreso egreso) {
|
||||
rows.add(egreso);
|
||||
this.fireTableRowsInserted(getRowCount()-1, getRowCount()-1);
|
||||
this.fireTableRowsInserted(getRowCount() - 1, getRowCount() - 1);
|
||||
|
||||
}
|
||||
|
||||
public void removeRow(int row){
|
||||
public void removeRow(int row) {
|
||||
this.rows.remove(row);
|
||||
this.fireTableRowsDeleted(row,row);
|
||||
this.fireTableRowsDeleted(row, row);
|
||||
}
|
||||
|
||||
public void removeRows(){
|
||||
public void removeRows() {
|
||||
int rowCount = getRowCount();
|
||||
if(rowCount > 0){
|
||||
if (rowCount > 0) {
|
||||
this.rows.clear();
|
||||
this.fireTableRowsDeleted(0, rowCount-1);
|
||||
this.fireTableRowsDeleted(0, rowCount - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEgreso(int editingId, Egreso egreso) {
|
||||
this.rows.set(editingId, egreso);
|
||||
this.fireTableRowsUpdated(0,getRowCount()-1);
|
||||
this.fireTableRowsUpdated(0, getRowCount() - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValueAt(int row, int col) {
|
||||
switch (col){
|
||||
switch (col) {
|
||||
case 0:
|
||||
return rows.get(row).getNro();
|
||||
case 1:
|
||||
@@ -98,7 +98,7 @@ public class EgresosTableModel extends AbstractTableModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Egreso getEgreso(int row){
|
||||
public Egreso getEgreso(int row) {
|
||||
return rows.get(row);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user