Class WidthCalculator<V>
- java.lang.Object
-
- org.kie.workbench.common.widgets.client.widget.WidthCalculator<V>
-
public class WidthCalculator<V> extends Object
A utility class to calculate the width of a Cell
-
-
Constructor Summary
Constructors Constructor Description WidthCalculator(com.google.gwt.cell.client.Cell<V> cell)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetElementWidth(V value)Get the width of a single itemintgetMaximumElementWidth(List<? extends V> values)Get the widest Cell from a list of contentvoidsetMinimumWidth(int minWidth)Set the minimum width
-
-
-
Constructor Detail
-
WidthCalculator
public WidthCalculator(com.google.gwt.cell.client.Cell<V> cell)
Constructor- Parameters:
cell- The Cell used to render content
-
-
Method Detail
-
setMinimumWidth
public void setMinimumWidth(int minWidth)
Set the minimum width- Parameters:
minWidth-
-
getMaximumElementWidth
public int getMaximumElementWidth(List<? extends V> values)
Get the widest Cell from a list of content- Parameters:
values-- Returns:
-
getElementWidth
public int getElementWidth(V value)
Get the width of a single item- Parameters:
value-- Returns:
-
-