tablelayout
Class TableVec

java.lang.Object
  extended by tablelayout.TableVec
Direct Known Subclasses:
TableCol, TableRow

public abstract class TableVec
extends Object

Each TableLayout Manager has two TableVectors: one describes the columns, and the other describes the rows. The TableVector is an abstract class. For the column use TableCol, for the row use TableRow. The table vector is created, based on information of the layout of the TableLayout Manager, hence they must be created after the layout, and they must be updated when the layout changes. The TableVec is an array of TableVecRec, which contains the size information of each component in a row of column.

Version:
$Revision: 11553 $ $Date: 2007-06-05 15:06:23 -0700 (Tue, 05 Jun 2007) $
Author:
Birgit Arkesteijn
See Also:
TableVecRec, TableLoc, TableCol, TableRow, TableLayout

Field Summary
 TableLayout parent
          The layout parent
 int size
          Number of elements (columns or rows)
 TableVecRec[] vec
          Vector with the sizes of the elements (columns or rows)
 
Constructor Summary
TableVec()
           
 
Method Summary
 void adjust(int change)
          Adjust the row or column after a resize
 void computeOffsets(int margin, int gap)
          Sets the upper left corner coordinate of each component within the container
 TableVecRec elementAt(int index)
          Returns the TableVecRec size information on a given position
abstract  int getPreferredSize()
          Returns the preferred size
abstract  int layoutSize(boolean do_actual)
          Calculates the size of the layout
abstract  void minimize()
          Changes the cells to its minimum size.
 String toString()
          Returns the String representation
abstract  int totalSize()
          Returns the total (minimum) size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vec

public TableVecRec[] vec
Vector with the sizes of the elements (columns or rows)


parent

public TableLayout parent
The layout parent


size

public int size
Number of elements (columns or rows)

Constructor Detail

TableVec

public TableVec()
Method Detail

minimize

public abstract void minimize()
Changes the cells to its minimum size.


totalSize

public abstract int totalSize()
Returns the total (minimum) size


getPreferredSize

public abstract int getPreferredSize()
Returns the preferred size


layoutSize

public abstract int layoutSize(boolean do_actual)
Calculates the size of the layout


elementAt

public TableVecRec elementAt(int index)
Returns the TableVecRec size information on a given position

Parameters:
index - the index of the information
Throws:
ArrayIndexOutOfBoundsException - if the index if out of bound
See Also:
TableVecRec

adjust

public void adjust(int change)
Adjust the row or column after a resize

Parameters:
change - the number of pixel the row or column should grow or shrink

computeOffsets

public void computeOffsets(int margin,
                           int gap)
Sets the upper left corner coordinate of each component within the container

Parameters:
margin - the margin of the container
gap - the gap between each component in the container

toString

public String toString()
Returns the String representation

Overrides:
toString in class Object


Copyright © 2000-2009 FreeHEP. All Rights Reserved.