Package com.vaadin.classic.v8.ui
Class GridLayout.Area
java.lang.Object
com.vaadin.classic.v8.ui.GridLayout.Area
- All Implemented Interfaces:
Serializable
- Enclosing class:
- GridLayout
Defines a rectangular area of cells in a GridLayout.
Also maintains a reference to the component contained in the area.
The area is specified by the cell coordinates of its upper left corner (column1,row1) and lower right corner (column2,row2). As otherwise with GridLayout, the column and row coordinates start from zero.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArea(GridLayoutState.ChildComponentData childData, com.vaadin.flow.component.Component component) Area(com.vaadin.flow.component.Component component, int column1, int row1, int column2, int row2) Construct a new area on a grid. -
Method Summary
Modifier and TypeMethodDescriptionintGets the column of the top-left corner cell.intGets the column of the bottom-right corner cell.com.vaadin.flow.component.ComponentGets the component connected to the area.intgetRow1()Gets the row of the top-left corner cell.intgetRow2()Gets the row of the bottom-right corner cell.booleanoverlaps(GridLayout.Area other) Tests if this Area overlaps with another Area.toString()
-
Constructor Details
-
Area
public Area(com.vaadin.flow.component.Component component, int column1, int row1, int column2, int row2) Construct a new area on a grid.
- Parameters:
component- the component connected to the area.column1- The column of the upper left corner cell of the area. The leftmost column has index 0.row1- The row of the upper left corner cell of the area. The topmost row has index 0.column2- The column of the lower right corner cell of the area. The leftmost column has index 0.row2- The row of the lower right corner cell of the area. The topmost row has index 0.
-
-
Method Details
-
overlaps
Tests if this Area overlaps with another Area.- Parameters:
other- the other Area that is to be tested for overlap with this area- Returns:
trueifotherarea overlaps with this on,falseif it does not.
-
getComponent
public com.vaadin.flow.component.Component getComponent()Gets the component connected to the area.- Returns:
- the Component.
-
getColumn1
public int getColumn1()Gets the column of the top-left corner cell.- Returns:
- the column of the top-left corner cell.
-
getColumn2
public int getColumn2()Gets the column of the bottom-right corner cell.- Returns:
- the column of the bottom-right corner cell.
-
getRow1
public int getRow1()Gets the row of the top-left corner cell.- Returns:
- the row of the top-left corner cell.
-
getRow2
public int getRow2()Gets the row of the bottom-right corner cell.- Returns:
- the row of the bottom-right corner cell.
-
toString
-