01: /*
02: * @(#)TableValidationObject.java
03: *
04: * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.validation;
07:
08: /**
09: * TableValidationObject extends ValidationObject
10: * to provide row and column information of the value to be validated.
11: */
12: public class TableValidationObject extends ValidationObject {
13: private int _row;
14: private int _column;
15:
16: public TableValidationObject(Object source, Object oldValue,
17: Object newValue) {
18: super (source, oldValue, newValue);
19: }
20:
21: public TableValidationObject(Object source, Object oldValue,
22: Object newValue, int row, int column) {
23: super (source, oldValue, newValue);
24: _row = row;
25: _column = column;
26: }
27:
28: /**
29: * Gets the row.
30: *
31: * @return the row.
32: */
33: public int getRow() {
34: return _row;
35: }
36:
37: /**
38: * Sets the row.
39: *
40: * @param row the row.
41: */
42: public void setRow(int row) {
43: _row = row;
44: }
45:
46: /**
47: * Gets the column.
48: *
49: * @return the column.
50: */
51: public int getColumn() {
52: return _column;
53: }
54:
55: /**
56: * Sets the column.
57: *
58: * @param column the column.
59: */
60: public void setColumn(int column) {
61: _column = column;
62: }
63:
64: @Override
65: public String toString() {
66: String properties = " source=" + getSource() + " oldValue="
67: + getOldValue() + " newValue=" + getNewValue()
68: + " row=" + getRow() + " column=" + getColumn() + " ";
69: return getClass().getName() + "[" + properties + "]";
70: }
71: }
|