FileDocCategorySizeDatePackage
CoreTableColumn.javaAPI DocAzureus 3.0.3.44793Mon Feb 19 13:31:32 GMT 2007org.gudy.azureus2.ui.swt.views.table.utils

CoreTableColumn

public class CoreTableColumn extends com.aelitis.azureus.ui.common.table.impl.TableColumnImpl
This class provides constructors for setting most of the common column attributes and sets the column as a 'core' column.

author
TuxPaper

Fields Summary
Constructors Summary
public CoreTableColumn(String sName, int iAlignment, int iPosition, int iWidth, String sTableID)
Construct a new CoreTableColumn Type will be TYPE_TEXT, Update Interval will be INTERVAL_INVALID_ONLY

TableCell listeners (Added, Refresh, Dispose, ToolTip) are added based on whether the class is an instance of them.

param
sName Unique ID for column
param
iAlignment See {@link #getAlignment()}
param
iPosition See {@link TableColumn#setPosition(int)}
param
iWidth See {@link TableColumn#setWidth(int)}
param
sTableID See {@link TableManager}_TABLE*

    super(sTableID, sName);
    super.initialize(iAlignment, iPosition, iWidth);
    setUseCoreDataSource(true);
    addListeners(this);
  
public CoreTableColumn(String sName, int iPosition, int iWidth, String sTableID)
Construct a new CoreTableColumn.

Alignment will be ALIGN_LEAD, Type will be TYPE_TEXT, Update Interval will be INTERVAL_INVALID_ONLY

TableCell listeners (Added, Refresh, Dispose, ToolTip) are added based on whether the class is an instance of them.

param
sName Unique ID for column
param
iPosition See {@link TableColumn#setPosition(int)}
param
iWidth See {@link TableColumn#setWidth(int)}
param
sTableID See {@link TableManager}_TABLE*

    super(sTableID, sName);
    setPosition(iPosition);
    setWidth(iWidth);
    setUseCoreDataSource(true);
    addListeners(this);
  
public CoreTableColumn(String sName, int iWidth, String sTableID)
Construct a new CoreTableColumn.

Alignment will be ALIGN_LEAD, Type will be TYPE_TEXT, Position will be POSITION_INVISIBLE, Update Interval will be INTERVAL_INVALID_ONLY

TableCell listeners (Added, Refresh, Dispose, ToolTip) are added based on whether the class is an instance of them.

param
sName Unique ID for column
param
iWidth See {@link TableColumn#setWidth(int)}
param
sTableID See {@link TableManager}_TABLE*

    super(sTableID, sName);
    setWidth(iWidth);
    setUseCoreDataSource(true);
    addListeners(this);
  
public CoreTableColumn(String sName, String sTableID)
Construct a new CoreTableColumn.

Alignment will be ALIGN_LEAD, Type will be TYPE_TEXT, Position will be POSITION_INVISIBLE, Width will be 50, Update Interval will be INTERVAL_INVALID_ONLY

TableCell listeners (Added, Refresh, Dispose, ToolTip) are added based on whether the class is an instance of them.

param
sName Unique ID for column
param
sTableID See {@link TableManager}_TABLE*

    super(sTableID, sName);
    setUseCoreDataSource(true);
    addListeners(this);
  
Methods Summary
public static intgetSWTAlign(int alignment)
Convert the getAlignment() constant to a SWT constant

return
SWT alignment constant

    return alignment == ALIGN_LEAD ? SWT.LEAD
                                   : (alignment == ALIGN_CENTER) ? SWT.CENTER
                                                                 : SWT.TRAIL;
  
public voidinitializeAsGraphic(int iPosition, int iWidth)

    setPosition(iPosition);
    setWidth(iWidth);
    setType(TYPE_GRAPHIC);
    setRefreshInterval(INTERVAL_GRAPHIC);
    setAlignment(TableColumn.ALIGN_CENTER);