FileDocCategorySizeDatePackage
ColumnRateUpDown.javaAPI DocAzureus 3.0.3.410786Sun Sep 16 15:19:04 BST 2007com.aelitis.azureus.ui.swt.columns.torrent

ColumnRateUpDown

public class ColumnRateUpDown extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellAddedListener
author
TuxPaper
created
Jun 16, 2006 TODO: Implement

Fields Summary
public static String
COLUMN_ID
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicRateMe
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicUp
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicDown
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicWait
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicRateMeButton
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicRateMeButtonEnabled
private static org.gudy.azureus2.ui.swt.pluginsimpl.UISWTGraphicImpl
graphicRateMeButtonDisabled
private static org.eclipse.swt.graphics.Rectangle
boundsRateMe
private static int
width
private boolean
useButton
private boolean
mouseIn
private boolean
disabled
Constructors Summary
public ColumnRateUpDown(String sTableID)


	 
		Image img = ImageLoaderFactory.getInstance().getImage("icon.rateme");
		graphicRateMe = new UISWTGraphicImpl(img);
		boundsRateMe = img.getBounds();
		width = boundsRateMe.width;

		img = ImageLoaderFactory.getInstance().getImage("icon.rateme-button");
		graphicRateMeButtonEnabled = new UISWTGraphicImpl(img);
		graphicRateMeButton = graphicRateMeButtonEnabled;
		width = Math.max(width, img.getBounds().width);

		img = ImageLoaderFactory.getInstance().getImage("icon.rateme-button-disabled");
		graphicRateMeButtonDisabled = new UISWTGraphicImpl(img);
		width = Math.max(width, img.getBounds().width);

		img = ImageLoaderFactory.getInstance().getImage("icon.rate.up");
		graphicUp = new UISWTGraphicImpl(img);
		width = Math.max(width, img.getBounds().width);

		img = ImageLoaderFactory.getInstance().getImage("icon.rate.down");
		graphicDown = new UISWTGraphicImpl(img);
		width = Math.max(width, img.getBounds().width);

		img = ImageLoaderFactory.getInstance().getImage("icon.rate.wait");
		graphicWait = new UISWTGraphicImpl(img);
		width = Math.max(width, img.getBounds().width);
	
		super(COLUMN_ID, sTableID);
		initializeAsGraphic(POSITION_LAST, width);
		setAlignment(ALIGN_CENTER);
		setWidthLimits(width, width);
	
Methods Summary
public voidcellAdded(TableCell cell)

		new Cell(cell);
	
public voidsetDisabled(boolean disabled)

		this.disabled  = disabled;
		graphicRateMeButton = disabled ? graphicRateMeButtonDisabled : graphicRateMeButtonEnabled;
		this.invalidateCells();
	
public voidsetUseButton(boolean useButton)

		this.useButton = useButton;
	
public booleanuseButton()

		return useButton;