Adempiere 3.5.2a

org.adempiere.webui.component
Class WTableColumn

java.lang.Object
  extended by org.adempiere.webui.component.WTableColumn

public class WTableColumn
extends Object

Author:
Andrew Kimball

Field Summary
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  int width
          The width of the column.
 
Constructor Summary
WTableColumn()
          Cover method, using a default width of 75
WTableColumn(int width)
           
 
Method Summary
 Object getHeaderValue()
          Returns the Object used as the value for the header renderer.
 int getMaxWidth()
          Returns the maximum width for the WTableColumn.
 int getMinWidth()
          Returns the minimum width for the WTableColumn.
 int getPreferredWidth()
          Returns the preferred width of the WTableColumn.
 boolean getResizable()
          Returns true if the user is allowed to resize the WTableColumn's width, false otherwise.
 int getWidth()
          Returns the width of the TableColumn.
 void setHeaderValue(Object headerValue)
          Sets the Object whose string representation will be used as the value for the headerRenderer.
 void setMaxWidth(int maxWidth)
          Sets the WTableColumn's maximum width to maxWidth; also adjusts the width and preferred width if they are greater than this value.
 void setMinWidth(int minWidth)
          Sets the WTableColumn's minimum width to minWidth; 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 to preferredWidth.
 void setResizable(boolean isResizable)
          Sets whether this column can be resized.
 void setWidth(int width)
          This method should not be used to set the widths of columns in the WListbox, use setPreferredWidth instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

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 the Object whose string representation will be used as the value for the headerRenderer. When the WTableColumn is created, the default headerValue is null.

Parameters:
headerValue - the new headerValue
See Also:
getHeaderValue()

getHeaderValue

public Object getHeaderValue()
Returns the Object 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 the WListbox, use setPreferredWidth instead. This method sets this column's width to width. If width 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 the TableColumn. 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 to preferredWidth. If preferredWidth 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 the WTableColumn. The default preferred width is 75.

Returns:
the preferredWidth property
See Also:
setPreferredWidth(int)

setMinWidth

public void setMinWidth(int minWidth)
Sets the WTableColumn's minimum width to minWidth; 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 the WTableColumn. The WTableColumn'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 the WTableColumn's maximum width to maxWidth; 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 the WTableColumn. The WTableColumn'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 the WTableColumn'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)

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.