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<?>
columnClass
protected Object
headerValue
The header value of the column.protected boolean
isResizable
If true, the user is allowed to resize the column; the default is true.protected int
maxWidth
The maximum width of the column.protected int
minWidth
The minimum width of the column.protected String
tooltipText
protected int
width
The 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 int
getAD_Reference_ID()
Class<?>
getColumnClass()
Object
getHeaderValue()
Returns theObject
used as the value for the header renderer.int
getMaxWidth()
Returns the maximum width for theWTableColumn
.int
getMinWidth()
Returns the minimum width for theWTableColumn
.int
getPreferredWidth()
Returns the preferred width of theWTableColumn
.boolean
getResizable()
Returns true if the user is allowed to resize theWTableColumn
's width, false otherwise.String
getTooltipText()
int
getWidth()
Returns the width of theTableColumn
.void
setAD_Reference_ID(int AD_Reference_ID)
void
setColumnClass(Class<?> columnClass)
void
setHeaderValue(Object headerValue)
Sets theObject
whose string representation will be used as the value for theheaderRenderer
.void
setMaxWidth(int maxWidth)
Sets theWTableColumn
's maximum width tomaxWidth
; also adjusts the width and preferred width if they are greater than this value.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.void
setPreferredWidth(int preferredWidth)
Sets this column's preferred width topreferredWidth
.void
setResizable(boolean isResizable)
Sets whether this column can be resized.void
setTooltipText(String tooltipText)
void
setWidth(int width)
This method should not be used to set the widths of columns in theWListbox
, usesetPreferredWidth
instead.
-
-
-
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 theObject
whose string representation will be used as the value for theheaderRenderer
. When theWTableColumn
is created, the defaultheaderValue
isnull
.- Parameters:
headerValue
- the new headerValue- See Also:
getHeaderValue()
-
getHeaderValue
public Object getHeaderValue()
Returns theObject
used as the value for the header renderer.- Returns:
- the
headerValue
property - 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
, usesetPreferredWidth
instead. This method sets this column's width towidth
. Ifwidth
exceeds 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
width
property - See Also:
setWidth(int)
-
setPreferredWidth
public void setPreferredWidth(int preferredWidth)
Sets this column's preferred width topreferredWidth
. IfpreferredWidth
exceeds 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
preferredWidth
property - 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
minWidth
property - 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
maxWidth
property - 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
isResizable
property - 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)
-
-