|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
jaxx.runtime.validator.swing.SwingValidatorMessageTableModel
public class SwingValidatorMessageTableModel
The model of the table of errors.
The model listens validators messages and update his internal model from it.
| Field Summary | |
|---|---|
static Class<?>[] |
columnClasses
|
static String[] |
columnNames
|
protected List<SwingValidatorMessage> |
data
list of messages actual displayed |
protected List<SwingValidator<?>> |
validators
list of registred validators |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
SwingValidatorMessageTableModel()
|
|
| Method Summary | |
|---|---|
protected void |
addMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope,
boolean sort,
String... messages)
|
void |
addMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope,
String... messages)
|
protected void |
addMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
boolean sort,
String... messages)
|
void |
addMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
String... messages)
|
protected void |
addMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
boolean sort,
String... messages)
|
void |
addMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
String... messages)
|
void |
clear()
|
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(BeanValidatorEvent event)
Invoked when a validator detects some changes on a field. |
void |
registerValidator(SwingValidator<?> validator)
Register a validator for this model. |
void |
removeMessages(JComponent editor,
BeanValidatorScope scope)
|
void |
removeMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope)
|
protected void |
removeMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope,
boolean notify)
|
protected void |
removeMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
boolean notify,
String... messages)
|
void |
removeMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
String... messages)
|
protected void |
removeMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
boolean notify,
String... messages)
|
void |
removeMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
String... messages)
|
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String[] columnNames
public static final Class<?>[] columnClasses
protected transient List<SwingValidator<?>> validators
protected List<SwingValidatorMessage> data
| Constructor Detail |
|---|
public SwingValidatorMessageTableModel()
| Method Detail |
|---|
public void registerValidator(SwingValidator<?> validator)
validator - the validator to register
public void addMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
String... messages)
public void addMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope,
String... messages)
public void addMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
String... messages)
public void removeMessages(JComponent editor,
BeanValidatorScope scope)
public void removeMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
String... messages)
public void removeMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope)
public void removeMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
String... messages)
public void clear()
public SwingValidatorMessage getRow(int rowIndex)
rowIndex - the row index
public 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(BeanValidatorEvent event)
BeanValidatorListener
onFieldChanged in interface BeanValidatorListenerevent - the eventpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModel
public Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface TableModel
protected void ensureRowIndex(int rowIndex)
throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
protected void ensureColumnIndex(int index)
throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
protected void addMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
boolean sort,
String... messages)
protected void addMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
boolean sort,
String... messages)
protected void addMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope,
boolean sort,
String... messages)
protected void removeMessages(SwingValidator<?> validator,
BeanValidatorField<?> field,
BeanValidatorScope scope,
boolean notify,
String... messages)
protected void removeMessages(SwingValidator<?> validator,
String fieldName,
BeanValidatorScope scope,
boolean notify,
String... messages)
protected void removeMessages(JComponent editor,
String fieldName,
BeanValidatorScope scope,
boolean notify)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||