|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.data.DataObject
ewe.util.Vector
ewe.util.Grid
A Grid is a way of storing a 2-D collection of objects. Objects are either added left to right and top to bottom OR an explicit row and column can be set.
When adding sequentially call the add(Object what,boolean lastInRow) method to add an object to the end of the current row. End a row either by calling endRow() or by setting "lastInRow" true when adding the last object to the row.
| Field Summary | |
int |
columns
This holds the number of columns in the Grid. |
int |
rows
This holds the number of rows in the Grid. |
| Constructor Summary | |
Grid()
|
|
| Method Summary | |
Object |
add(Object what,
boolean lastInRow)
Add the object to the current row. |
void |
addAll(Vector what)
Add all elements of the Vector parameter to the current row. |
protected Object |
addToRow(Vector row,
Object what)
|
void |
clear()
Clear the entire grid. |
void |
endRow()
End the current row - all future add() calls will add objects to a new row. |
Vector |
getMostCurrentRow()
Return the Vector which represents the row which is currently being added to (you are hardly likely to use this method). |
Object |
objectAt(int index)
Return the Object stored at the index. |
Object |
objectAt(int row,
int column)
Return the Object stored at the specified row and column. |
void |
set(int row,
int column,
Object what)
Set the Object at a particluar row and column. |
| Methods inherited from class ewe.util.Vector |
add, add, add, addAll, addAll, addCopiesFrom, addElement, compare, contains, copyCopiesFrom, copyFrom, copyInto, copyInto, del, elementAt, elements, find, find, get, getCount, getFullCopy, insert, insertElementAt, isEmpty, iterator, iterator, pop, push, remove, removeAllElements, removeElementAt, set, setElementAt, setSize, size, sort, sort, toArray, toArray, toObjectArray, toString, zero |
| Methods inherited from class ewe.data.DataObject |
_getSetField, appendAllFields, compareTo, copied, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getDeclaredFieldValue, getFieldList, getFieldList, getMyFieldList, getNew |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode |
| Field Detail |
public int columns
public int rows
| Constructor Detail |
public Grid()
| Method Detail |
protected Object addToRow(Vector row,
Object what)
public void endRow()
public Object add(Object what,
boolean lastInRow)
public void addAll(Vector what)
addAll in class Vectorpublic void clear()
clear in class Vectorpublic Object objectAt(int index)
public Object objectAt(int row,
int column)
public Vector getMostCurrentRow()
public void set(int row,
int column,
Object what)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||