Package org.adempiere.webui.component
Class WTableColumn
- java.lang.Object
-
- org.adempiere.webui.component.WTableColumn
-
public class WTableColumn extends Object
- Author:
- Andrew Kimball
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<?>columnClassprotected ObjectheaderValueThe header value of the column.protected booleanisResizableIf true, the user is allowed to resize the column; the default is true.protected intmaxWidthThe maximum width of the column.protected intminWidthThe minimum width of the column.protected StringtooltipTextprotected intwidthThe width of the column.
-
Constructor Summary
Constructors Constructor Description WTableColumn()Cover method, using a default width of 75WTableColumn(int width)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAD_Reference_ID()Class<?>getColumnClass()ObjectgetHeaderValue()Returns theObjectused as the value for the header renderer.intgetMaxWidth()Returns the maximum width for theWTableColumn.intgetMinWidth()Returns the minimum width for theWTableColumn.intgetPreferredWidth()Returns the preferred width of theWTableColumn.booleangetResizable()Returns true if the user is allowed to resize theWTableColumn's width, false otherwise.StringgetTooltipText()intgetWidth()Returns the width of theTableColumn.voidsetAD_Reference_ID(int AD_Reference_ID)voidsetColumnClass(Class<?> columnClass)voidsetHeaderValue(Object headerValue)Sets theObjectwhose string representation will be used as the value for theheaderRenderer.voidsetMaxWidth(int maxWidth)Sets theWTableColumn's maximum width tomaxWidth; also adjusts the width and preferred width if they are greater than this value.voidsetMinWidth(int minWidth)Sets theWTableColumn's minimum width tominWidth; also adjusts the current width and preferred width if they are less than this value.voidsetPreferredWidth(int preferredWidth)Sets this column's preferred width topreferredWidth.voidsetResizable(boolean isResizable)Sets whether this column can be resized.voidsetTooltipText(String tooltipText)voidsetWidth(int width)This method should not be used to set the widths of columns in theWListbox, usesetPreferredWidthinstead.
-
-
-
Field Detail
-
width
protected int width
The width of the column.
-
minWidth
protected int minWidth
The minimum width of the column.
-
maxWidth
protected int maxWidth
The maximum width of the column.
-
isResizable
protected boolean isResizable
If true, the user is allowed to resize the column; the default is true.
-
headerValue
protected Object headerValue
The header value of the column.
-
columnClass
protected Class<?> columnClass
-
tooltipText
protected String tooltipText
-
-
Constructor Detail
-
WTableColumn
public WTableColumn()
Cover method, using a default width of 75- See Also:
WTableColumn(int)
-
WTableColumn
public WTableColumn(int width)
-
-
Method Detail
-
setHeaderValue
public void setHeaderValue(Object headerValue)
Sets theObjectwhose string representation will be used as the value for theheaderRenderer. When theWTableColumnis created, the defaultheaderValueisnull.- Parameters:
headerValue- the new headerValue- See Also:
getHeaderValue()
-
getHeaderValue
public Object getHeaderValue()
Returns theObjectused as the value for the header renderer.- Returns:
- the
headerValueproperty - See Also:
setHeaderValue(java.lang.Object)
-
setWidth
public void setWidth(int width)
This method should not be used to set the widths of columns in theWListbox, usesetPreferredWidthinstead. This method sets this column's width towidth. Ifwidthexceeds the minimum or maximum width, it is adjusted to the appropriate limiting value.- Parameters:
width- the new width- See Also:
getWidth(),setMinWidth(int),setMaxWidth(int),setPreferredWidth(int)
-
getWidth
public int getWidth()
Returns the width of theTableColumn. The default width is 75.- Returns:
- the
widthproperty - See Also:
setWidth(int)
-
setPreferredWidth
public void setPreferredWidth(int preferredWidth)
Sets this column's preferred width topreferredWidth. IfpreferredWidthexceeds the minimum or maximum width, it is adjusted to the appropriate limiting value.- Parameters:
preferredWidth- the new preferred width- See Also:
getPreferredWidth()
-
getPreferredWidth
public int getPreferredWidth()
Returns the preferred width of theWTableColumn. The default preferred width is 75.- Returns:
- the
preferredWidthproperty - See Also:
setPreferredWidth(int)
-
setMinWidth
public void setMinWidth(int minWidth)
Sets theWTableColumn's minimum width tominWidth; also adjusts the current width and preferred width if they are less than this value.- Parameters:
minWidth- the new minimum width- See Also:
getMinWidth(),setPreferredWidth(int),setMaxWidth(int)
-
getMinWidth
public int getMinWidth()
Returns the minimum width for theWTableColumn. TheWTableColumn's width can't be made less than this either by the user or programmatically. The default minWidth is 15.- Returns:
- the
minWidthproperty - See Also:
setMinWidth(int)
-
setMaxWidth
public void setMaxWidth(int maxWidth)
Sets theWTableColumn's maximum width tomaxWidth; also adjusts the width and preferred width if they are greater than this value.- Parameters:
maxWidth- the new maximum width- See Also:
getMaxWidth(),setPreferredWidth(int),setMinWidth(int)
-
getMaxWidth
public int getMaxWidth()
Returns the maximum width for theWTableColumn. TheWTableColumn's width can't be made larger than this either by the user or programmatically. The default maxWidth is Integer.MAX_VALUE.- Returns:
- the
maxWidthproperty - See Also:
setMaxWidth(int)
-
setResizable
public void setResizable(boolean isResizable)
Sets whether this column can be resized.- Parameters:
isResizable- if true, resizing is allowed; otherwise false- See Also:
getResizable()
-
getResizable
public boolean getResizable()
Returns true if the user is allowed to resize theWTableColumn's width, false otherwise. You can change the width programmatically regardless of this setting. The default is true.- Returns:
- the
isResizableproperty - See Also:
setResizable(boolean)
-
getColumnClass
public Class<?> getColumnClass()
- Returns:
- Class
-
setColumnClass
public void setColumnClass(Class<?> columnClass)
- Parameters:
columnClass-
-
getTooltipText
public String getTooltipText()
- Returns:
- tooltip text
-
setTooltipText
public void setTooltipText(String tooltipText)
- Parameters:
tooltipText-
-
getAD_Reference_ID
public int getAD_Reference_ID()
-
setAD_Reference_ID
public void setAD_Reference_ID(int AD_Reference_ID)
-
-