org.eclipse.emf.ecp.view.model.common
Class AbstractGridDescription<GRIDCELL extends AbstractGridCell<?>>

java.lang.Object
  extended by org.eclipse.emf.ecp.view.model.common.AbstractGridDescription<GRIDCELL>
Type Parameters:
GRIDCELL - the grid cell type (e.g. SWT or JavaFX grid cell)
Direct Known Subclasses:
SWTGridDescription

public abstract class AbstractGridDescription<GRIDCELL extends AbstractGridCell<?>>
extends Object

A AbstractGridDescription describes the grid of the renderer using a list of GridCells and the number of rows and columns it has.

Author:
Eugen Neufeld, Lucas Köhler

Constructor Summary
AbstractGridDescription()
          Creating an empty grid.
AbstractGridDescription(int rows, int columns, List<GRIDCELL> grid)
          Creating a filled grid.
 
Method Summary
 int getColumns()
          Number of columns in this grid.
 List<GRIDCELL> getGrid()
          The GridCells describing the grid.
 int getRows()
          Number of rows in this Grid.
 void setColumns(int columns)
          Sets the number of columns.
 void setGrid(List<GRIDCELL> grid)
          List of GridCells.
 void setRows(int rows)
          Sets the number of rows.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGridDescription

public AbstractGridDescription()
Creating an empty grid.


AbstractGridDescription

public AbstractGridDescription(int rows,
                               int columns,
                               List<GRIDCELL> grid)
Creating a filled grid.

Parameters:
rows - number of rows in this description
columns - number of columns in this description
grid - the List of GridCells describing the grid
Method Detail

getGrid

public List<GRIDCELL> getGrid()
The GridCells describing the grid.

Returns:
the grid

getRows

public int getRows()
Number of rows in this Grid.

Returns:
the rows

getColumns

public int getColumns()
Number of columns in this grid.

Returns:
the columns

setGrid

public void setGrid(List<GRIDCELL> grid)
List of GridCells.

Parameters:
grid - the grid to set

setRows

public void setRows(int rows)
Sets the number of rows.

Parameters:
rows - the rows to set

setColumns

public void setColumns(int columns)
Sets the number of columns.

Parameters:
columns - the columns to set


Copyright © 2014. All Rights Reserved.