|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
fr.ifremer.coser.ui.control.ControlTableModel
fr.ifremer.coser.ui.control.ControlDuplicatedLineTableModel
public class ControlDuplicatedLineTableModel
Table model that change line order to display duplicated line side by side. L'implementation reside sur la construction d'un tableau associatif qui associe les numeros demandé par la vue à d'autre numero différents qui correspondent au données du modèle réel. La précédente implémentation utilisait des ArrayList, mais n'était pas performante vis à vis de la construction de la liste.
| Field Summary | |
|---|---|
protected List<ControlError> |
controlErrors
List des erreurs de validation (non null seulement apres validation). |
protected ControlTableModel |
dataTableModel
|
protected int[] |
linesIndex
|
protected int[] |
reverseLinesIndex
|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
ControlDuplicatedLineTableModel(ControlTableModel dataTableModel)
|
|
| Method Summary | ||
|---|---|---|
void |
addTableModelListener(TableModelListener l)
|
|
protected void |
computeLineIndices()
Compute line indices. |
|
protected void |
deleteLine(int lineIndex)
Update linesIndex array to remove an index of a line. |
|
int |
findColumn(String columnName)
|
|
void |
fireTableCellUpdated(int row,
int column)
|
|
void |
fireTableChanged(TableModelEvent e)
|
|
void |
fireTableDataChanged()
|
|
void |
fireTableRowsDeleted(int firstRow,
int lastRow)
|
|
void |
fireTableRowsInserted(int firstRow,
int lastRow)
|
|
void |
fireTableRowsUpdated(int firstRow,
int lastRow)
|
|
void |
fireTableStructureChanged()
|
|
CoserConstants.Category |
getCategory()
Return category managed by model. |
|
Class<?> |
getColumnClass(int columnIndex)
|
|
int |
getColumnCount()
|
|
String |
getColumnName(int column)
|
|
protected List<ControlError> |
getCurrentModelErrors()
Parse input control errors list, an build a new list with only errors that will be used by this model. |
|
String[] |
getDataAt(int rowIndex)
Retourne la donnée (toutes le String[]) à la ligne demandée. |
|
|
getListeners(Class<T> listenerType)
|
|
protected int |
getModifiedRowIndex(int rowIndex)
Look for modified order row index. |
|
int |
getRealIndexOfLine(String lineNumber)
Retourne l'index réel de la ligne dans la vue. |
|
int |
getRowCount()
|
|
TableModelListener[] |
getTableModelListeners()
|
|
Object |
getValueAt(int rowIndex,
int columnIndex)
|
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
|
void |
removeTableModelListener(TableModelListener l)
|
|
void |
setControlErrors(List<ControlError> controlErrors)
|
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ControlTableModel dataTableModel
protected List<ControlError> controlErrors
protected int[] linesIndex
protected int[] reverseLinesIndex
| Constructor Detail |
|---|
public ControlDuplicatedLineTableModel(ControlTableModel dataTableModel)
| Method Detail |
|---|
public CoserConstants.Category getCategory()
ControlTableModel
getCategory in class ControlTableModelpublic void setControlErrors(List<ControlError> controlErrors)
protected void computeLineIndices()
protected List<ControlError> getCurrentModelErrors()
public int getRowCount()
public int getColumnCount()
public String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelprotected int getModifiedRowIndex(int rowIndex)
rowIndex - initial row index
public Object getValueAt(int rowIndex,
int columnIndex)
public String[] getDataAt(int rowIndex)
ControlTableModel
getDataAt in class ControlTableModelpublic int getRealIndexOfLine(String lineNumber)
getRealIndexOfLine in class ControlTableModellineNumber - le numero de données
protected void deleteLine(int lineIndex)
lineIndex - index of line to deletepublic int findColumn(String columnName)
findColumn in class AbstractTableModelpublic Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModel
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModel
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic void fireTableDataChanged()
fireTableDataChanged in class AbstractTableModelpublic void fireTableStructureChanged()
fireTableStructureChanged in class AbstractTableModel
public void fireTableRowsInserted(int firstRow,
int lastRow)
fireTableRowsInserted in class AbstractTableModel
public void fireTableRowsUpdated(int firstRow,
int lastRow)
fireTableRowsUpdated in class AbstractTableModel
public void fireTableRowsDeleted(int firstRow,
int lastRow)
fireTableRowsDeleted in class AbstractTableModel
public void fireTableCellUpdated(int row,
int column)
fireTableCellUpdated in class AbstractTableModelpublic void fireTableChanged(TableModelEvent e)
fireTableChanged in class AbstractTableModelpublic void addTableModelListener(TableModelListener l)
addTableModelListener in interface TableModeladdTableModelListener in class AbstractTableModelpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModelremoveTableModelListener in class AbstractTableModelpublic TableModelListener[] getTableModelListeners()
getTableModelListeners in class AbstractTableModelpublic <T extends EventListener> T[] getListeners(Class<T> listenerType)
getListeners in class AbstractTableModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||