Class BoxLayoutAlgorithm
java.lang.Object
org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm
org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm
org.eclipse.zest.layouts.algorithms.BoxLayoutAlgorithm
- All Implemented Interfaces:
LayoutAlgorithm
Layout algorithm that places all elements in one column or one row, depending
on set orientation.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm
GridLayoutAlgorithm.Zest1
-
Field Summary
Fields inherited from class org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm
aspectRatio, childrenHeight, childrenWidth, cols, colWidth, numChildren, offsetX, offsetY, rowHeight, rowPadding, rows
Fields inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int[]
calculateNumberOfRowsAndCols
(int numChildren, double boundX, double boundY, double boundWidth, double boundHeight) Calculates and returns an array containing the number of columns, followed by the number of rowsint
void
setOrientation
(int orientation) Methods inherited from class org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm
applyLayout, applyLayoutInternal, calculateGrid, calculateNodeSize, calculateNumberOfRowsAndCols_rectangular, calculateNumberOfRowsAndCols_square, isResizing, setAspectRatio, setResizing, setRowPadding
Methods inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm
setLayoutContext
-
Constructor Details
-
BoxLayoutAlgorithm
public BoxLayoutAlgorithm() -
BoxLayoutAlgorithm
public BoxLayoutAlgorithm(int orientation)
-
-
Method Details
-
getOrientation
public int getOrientation() -
setOrientation
public void setOrientation(int orientation) -
calculateNumberOfRowsAndCols
protected int[] calculateNumberOfRowsAndCols(int numChildren, double boundX, double boundY, double boundWidth, double boundHeight) Description copied from class:GridLayoutAlgorithm
Calculates and returns an array containing the number of columns, followed by the number of rows- Overrides:
calculateNumberOfRowsAndCols
in classGridLayoutAlgorithm
-