|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.Vector<Cell> pagelayout.CellVector
public class CellVector
An object of the type CellVector
is associated
with every cell-container, i.e., a Row
or a
Column
object. It is basically a vector
to store the cells that are added to the associated cell-container.
However, depending upon the
alignment of the row or the column, it transparently inserts
suitable flexible gaps whenever a cell is added to it. Thus for example, if the row or the column is justified, it automatically adds
a flexible gaps whenever a cell is added to the
associated cell-container after the first or before the last addition.
Field Summary | |
---|---|
protected int |
alignment
The specified alignment. |
protected Gap |
flexGap
The default flexible gap for this object. |
static int |
FLEXGAP
The preferred length of a flexible gap. |
protected static Gap |
HGAP
The default flexible horizontal gap. |
protected boolean |
isCenter
Is the associated row/colum centered? |
protected boolean |
isJustified
Is the associated row/colum justified? |
protected boolean |
isRight
Is the associated row/colum right/bottom justified? |
protected boolean |
noGapsAtEnd
Does the specified justification require that there be no gaps at the tail end of the vector? |
protected static Gap |
VGAP
The default flexible vertical gap. |
Fields inherited from class java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
protected |
CellVector(int align,
boolean isRow)
Creates a CellVector for a cell-container with given
alignment and orientation. |
Method Summary | |
---|---|
boolean |
add(Cell cell)
Adds a cell to this vector with appropriate flexible gap inserted depending upon the specified alignment. |
void |
changeAlignment(int newalignment,
boolean isRow)
|
void |
clear()
|
protected void |
init()
|
static boolean |
isFiller(Cell cell)
|
void |
removeElementAt(int i,
int n)
|
protected void |
removeLastGapIfNeeded()
Removes the gap at the tail end of the vector if the specified alignment so requires. |
Methods inherited from class java.util.Vector |
---|
add, addAll, addAll, addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
iterator, listIterator, listIterator |
Field Detail |
---|
public static final int FLEXGAP
protected int alignment
protected boolean isCenter
protected boolean isJustified
protected boolean isRight
protected static Gap VGAP
protected static Gap HGAP
protected Gap flexGap
protected boolean noGapsAtEnd
Constructor Detail |
---|
protected CellVector(int align, boolean isRow)
CellVector
for a cell-container with given
alignment and orientation.
align
- specified alignment (horizontal alignment for a row,or
vertical alignment for a column).isRow
- true
for a row, false
otherwise.Method Detail |
---|
protected void init()
public void clear()
clear
in interface java.util.Collection<Cell>
clear
in interface java.util.List<Cell>
clear
in class java.util.Vector<Cell>
public boolean add(Cell cell)
add
in interface java.util.Collection<Cell>
add
in interface java.util.List<Cell>
add
in class java.util.Vector<Cell>
cell
- the cell object to be added.
true
if addition was successful, false
otherwise.protected void removeLastGapIfNeeded()
public static boolean isFiller(Cell cell)
public void changeAlignment(int newalignment, boolean isRow)
public void removeElementAt(int i, int n)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |