| java.lang.Object com.jeta.forms.gui.form.CellAssignmentCache
CellAssignmentCache | public class CellAssignmentCache (Code) | | This class maintains an array of GridComponents for a given view. It is used
to quickly find a component at a given cell row/column position.
Additionally, it can find out any components that overlap a given row/column
position of those componenents have rowspan/columnspans greater than 1. We
need this class because the current FormLayout does not fully provide this
information, and the information it does provide is a copy. This makes it
terribly inefficient to use when repainting, so we need this cache mainly for
performance.
author: Jeff Tassin |
Constructor Summary | |
public | CellAssignmentCache(GridView view) Creates a CellAssignmentCache that is associated with the
specified view. |
Method Summary | |
void | addComponent(GridComponent gc) Adds the specified component to this cache. | public GridComponent | getGridComponent(int col, int row) Returns the GridComponent object that is located at the give column and
row. | public GridComponent | getOverlappingComponent(int col, int row) Returns the component, if any, that overlaps the given cell.
Parameters: col - the column for the specified cell Parameters: row - the row for the specified cell. | void | sync() Marks the cache as invalid. |
CellAssignmentCache | public CellAssignmentCache(GridView view)(Code) | | Creates a CellAssignmentCache that is associated with the
specified view.
Parameters: view - the GridView that this cache maintains information for. |
addComponent | void addComponent(GridComponent gc)(Code) | | Adds the specified component to this cache.
Parameters: gc - the component to add to the cache. |
getGridComponent | public GridComponent getGridComponent(int col, int row)(Code) | | Returns the GridComponent object that is located at the give column and
row.
the component that occupies the cell at the given row/column.Null is returned if the specified cell does not have aGridComponent. |
getOverlappingComponent | public GridComponent getOverlappingComponent(int col, int row)(Code) | | Returns the component, if any, that overlaps the given cell.
Parameters: col - the column for the specified cell Parameters: row - the row for the specified cell. the component that overlaps the cell at the given column and row.If no component overlaps, then null is returned. |
sync | void sync()(Code) | | Marks the cache as invalid.
|
|
|