Package de.esoco.process.ui
Klasse UiLayout
- Bekannte direkte Unterklassen:
UiColumnGridLayout
,UiContentLayout
,UiDockLayout
,UiFillLayout
,UiFlexLayout
,UiFlowLayout
,UiFooterLayout
,UiGridLayout
,UiHeaderLayout
,UiInlineLayout
,UiSecondaryContentLayout
,UiTableLayout
The base class for layouts of process UI
Containers
. A
layout consists of rows and columns which in turn contain layout cells for
each component in the container at the respective layout position. If
properties are set on either the layout, a row, or a column, they define the
default values to be used for the creation of cells in the corresponding
element.-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungclass
A cell in a layout (at a crossing of a row and a column) that contains a single component.protected class
UiLayout.ChildElement<E extends UiLayout.ChildElement<E>>
The base class for child elements of layouts.class
A single column in a layout.class
A single row in a layout.protected class
UiLayout.StructureElement<E extends UiLayout.StructureElement<E>>
The base class for child elements of layouts that define the layout structure (columns and rows). -
Konstruktorübersicht
KonstruktorBeschreibungUiLayout
(de.esoco.lib.property.LayoutType layoutType) Creates a new instance with a single column and row (i.e. a single cell).UiLayout
(de.esoco.lib.property.LayoutType layoutType, int columns) Creates a new instance with a single row.UiLayout
(de.esoco.lib.property.LayoutType layoutType, int rows, int columns) Creates a new instance with a fixed number of columns and rows. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected void
addComponent
(UiComponent<?, ?> component) Internal method to initially add a component to the layout.final void
applyTo
(UiContainer<?> container) Applies this layout to the given container.protected void
applyToContainer
(UiContainer<?> container) Applies this layout to the given container.protected UiLayout.Cell
createCell
(UiLayout.Row row, UiLayout.Column column) Creates a new layout cell.getCells()
Returns the cells in this layout.Returns the columns in this layout.Returns the row in the layout which is used to add new components.protected UiLayout.Cell
getLayoutCell
(UiLayout.Row row, UiLayout.Column column) Returns the layout cell for a certain component at the next calculated grid position.final de.esoco.lib.property.LayoutType
Returns the layout type.protected UiLayout.Column
getNextGridColumn
(int row, int column) Returns the next grid column under consideration of column spans that may have been set on the cell at the given grid coordinate.protected UiLayout.Row
getNextGridRow
(int row, int column) Returns the next grid row under consideration of row spans that may have been set on the cell at the given grid coordinate.getRows()
Returns the rows in this layout.protected void
ignoreProperties
(de.esoco.lib.property.PropertyName<?>... properties) Can be invoked by subclasses to exclude certain properties from application upon components.protected boolean
isIgnored
(de.esoco.lib.property.PropertyName<?> property) Checks whether a certain property should be ignored for application on components.protected void
layoutComponent
(UiComponent<?, ?> component) Internal method to place a component in the layout.void
nextRow()
Signals that the next component added to this layout should be placed at the beginning of the next layout row.void
removeColumn
(UiLayout.Column column) Removes a certain column from this layout.void
removeRow
(UiLayout.Row row) Removes a certain row from this layout.protected void
reset
(int rowCount, int colCount) Resets this layout for recalculation.Von Klasse geerbte Methoden de.esoco.process.ui.UiLayoutElement
alignHorizontal, alignVertical, applyPropertiesTo, applyProperty
Von Klasse geerbte Methoden de.esoco.process.ui.UiElement
applyTo, clearProperties, copyPropertiesFrom, get, get, hasProperty, isModified, set, set, set, setModified, toString
-
Konstruktordetails
-
UiLayout
public UiLayout(de.esoco.lib.property.LayoutType layoutType) Creates a new instance with a single column and row (i.e. a single cell).- Parameter:
layoutType
- The layout type
-
UiLayout
public UiLayout(de.esoco.lib.property.LayoutType layoutType, int columns) Creates a new instance with a single row.- Parameter:
layoutType
- The layout typecolumns
- The number of columns in this layout
-
UiLayout
public UiLayout(de.esoco.lib.property.LayoutType layoutType, int rows, int columns) Creates a new instance with a fixed number of columns and rows. All rows and columns will be created and filled with empty cells (component = NULL).- Parameter:
layoutType
- The layout typerows
- The number of rows in this layoutcolumns
- The number of columns in this layout
-
-
Methodendetails
-
applyTo
Applies this layout to the given container.- Parameter:
container
- The container
-
getCells
Returns the cells in this layout. Their order will follow the layout structure, i.e. row by row and column after column in the respective row. Depending on the layout type cells can be empty, i.e. their component may be NULL.- Gibt zurück:
- The layout cells
-
getColumns
Returns the columns in this layout.- Gibt zurück:
- The column list
-
getCurrentRow
Returns the row in the layout which is used to add new components.- Gibt zurück:
- The last row
-
getLayoutType
public final de.esoco.lib.property.LayoutType getLayoutType()Returns the layout type.- Gibt zurück:
- The layout type
-
getRows
Returns the rows in this layout.- Gibt zurück:
- The row list
-
nextRow
public void nextRow()Signals that the next component added to this layout should be placed at the beginning of the next layout row. The actual effect of this call depends on the respective layout implementation. -
removeColumn
Removes a certain column from this layout. This will also remove all components in the column cells from their parent container. Attention: depending on the layout type this call can have unforeseen effects if the layout parameters are not adjusted accordingly (e.g. column count).- Parameter:
column
- The column to remove
-
removeRow
Removes a certain row from this layout. This will also remove all components in the row cells from their parent container.- Parameter:
row
- The row to remove
-
addComponent
Internal method to initially add a component to the layout. This will add a dummy layout cell to the component that is not positioned in the layout but can be used to set layout parameters on the component by querying it withUiComponent.cell()
. The actual layout is performed by the methodlayoutComponent(UiComponent)
.Invoked by
UiContainer.addComponent(UiComponent)
.- Parameter:
component
- The component that has been added to the container
-
applyToContainer
Applies this layout to the given container.- Parameter:
container
- The container
-
createCell
Creates a new layout cell. Can be overridden by subclasses to create layout-specific cell types. The default implementation returns an instance of the inner classUiLayout.Cell
.- Parameter:
row
- The row of the cellcolumn
- The column of the cell- Gibt zurück:
- The new cell
-
getLayoutCell
Returns the layout cell for a certain component at the next calculated grid position. Can be overridden by subclasses that need to modify the grid position, e.g. because of irregular grid structures.- Parameter:
row
- The row at which to place the componentcolumn
- The column at which to place the component- Gibt zurück:
- The layout cell
-
getNextGridColumn
Returns the next grid column under consideration of column spans that may have been set on the cell at the given grid coordinate. This method is intended to be used by subclasses that allow to define irregular grids.- Parameter:
row
- The index of the cell columncolumn
- The index of the cell row- Gibt zurück:
- The next row
-
getNextGridRow
Returns the next grid row under consideration of row spans that may have been set on the cell at the given grid coordinate. This method is intended to be used by subclasses that allow to define irregular grids.- Parameter:
row
- The index of the cell rowcolumn
- The index of the cell column- Gibt zurück:
- The next row
-
ignoreProperties
protected void ignoreProperties(de.esoco.lib.property.PropertyName<?>... properties) Can be invoked by subclasses to exclude certain properties from application upon components.- Parameter:
properties
- The properties to ignore
-
isIgnored
protected boolean isIgnored(de.esoco.lib.property.PropertyName<?> property) Checks whether a certain property should be ignored for application on components.- Parameter:
property
- The property name- Gibt zurück:
- TRUE if the property is to be ignored
-
layoutComponent
Internal method to place a component in the layout. Invoked byUiContainer.applyProperties()
.- Parameter:
component
- The component to layout
-
reset
protected void reset(int rowCount, int colCount) Resets this layout for recalculation.- Parameter:
rowCount
- The number of rowscolCount
- The number of column
-