public class SwingValidatorMessageTableModel extends AbstractTableModel implements org.nuiton.validator.bean.BeanValidatorListener
| Modifier and Type | Field and Description |
|---|---|
static Class<?>[] |
columnClasses |
static String[] |
columnNames |
protected List<SwingValidatorMessage> |
data
list of messages actual displayed
|
protected List<SwingValidator<?>> |
validators
list of registred validators
|
listenerList| Constructor and Description |
|---|
SwingValidatorMessageTableModel() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessages(JComponent editor,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
boolean sort,
String... messages) |
void |
addMessages(JComponent editor,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
String... messages) |
protected void |
addMessages(SwingValidator<?> validator,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
boolean sort,
String... messages) |
void |
addMessages(SwingValidator<?> validator,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
String... messages) |
void |
clear() |
void |
clearValidators() |
protected void |
ensureColumnIndex(int index) |
protected void |
ensureRowIndex(int rowIndex) |
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int column) |
SwingValidatorMessage |
getRow(int rowIndex)
Obtain the message for a given row.
|
int |
getRowCount() |
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int row,
int column) |
void |
onFieldChanged(org.nuiton.validator.bean.BeanValidatorEvent event) |
void |
registerValidator(SwingValidator<?> validator)
Register a validator for this model.
|
void |
removeMessages(JComponent editor,
org.nuiton.validator.NuitonValidatorScope scope) |
void |
removeMessages(JComponent editor,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope) |
protected void |
removeMessages(JComponent editor,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
boolean notify) |
protected void |
removeMessages(SwingValidator<?> validator,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
boolean notify,
String... messages) |
void |
removeMessages(SwingValidator<?> validator,
String fieldName,
org.nuiton.validator.NuitonValidatorScope scope,
String... messages) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAtpublic static final String[] columnNames
public static final Class<?>[] columnClasses
protected transient List<SwingValidator<?>> validators
protected List<SwingValidatorMessage> data
public void registerValidator(SwingValidator<?> validator)
validator - the validator to registerpublic void addMessages(SwingValidator<?> validator, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, String... messages)
public void addMessages(JComponent editor, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, String... messages)
public void removeMessages(JComponent editor, org.nuiton.validator.NuitonValidatorScope scope)
public void removeMessages(SwingValidator<?> validator, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, String... messages)
public void removeMessages(JComponent editor, String fieldName, org.nuiton.validator.NuitonValidatorScope scope)
public void clear()
public void clearValidators()
public SwingValidatorMessage getRow(int rowIndex)
rowIndex - the row indexpublic boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic void onFieldChanged(org.nuiton.validator.bean.BeanValidatorEvent event)
onFieldChanged in interface org.nuiton.validator.bean.BeanValidatorListenerpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic Object getValueAt(int rowIndex, int columnIndex)
getValueAt in interface TableModelprotected void ensureRowIndex(int rowIndex)
throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsExceptionprotected void ensureColumnIndex(int index)
throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsExceptionprotected void addMessages(SwingValidator<?> validator, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, boolean sort, String... messages)
protected void addMessages(JComponent editor, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, boolean sort, String... messages)
protected void removeMessages(SwingValidator<?> validator, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, boolean notify, String... messages)
protected void removeMessages(JComponent editor, String fieldName, org.nuiton.validator.NuitonValidatorScope scope, boolean notify)
Copyright © 2008-2012 CodeLutin. All Rights Reserved.