FileDocCategorySizeDatePackage
BufferedLabel.javaAPI DocAzureus 3.0.3.42703Mon May 30 11:27:14 BST 2005org.gudy.azureus2.ui.swt.components

BufferedLabel

public class BufferedLabel extends BufferedWidget
author
parg

Fields Summary
protected org.eclipse.swt.widgets.Label
label
protected String
value
Constructors Summary
public BufferedLabel(org.eclipse.swt.widgets.Composite composite, int attrs)

	
	
	
				
					 
	
		super( new Label( composite, attrs ));
		
		label = (Label)getWidget();
	
Methods Summary
public voidaddMouseListener(org.eclipse.swt.events.MouseListener listener)

    label.addMouseListener(listener);
  
public java.lang.StringgetText()

    return value==null?"":value;
  
public booleanisDisposed()

		return( label.isDisposed());
	
public voidsetCursor(org.eclipse.swt.graphics.Cursor cursor)

    label.setCursor(cursor);
  
public voidsetForeground(org.eclipse.swt.graphics.Color color)

    label.setForeground(color);
  
public voidsetLayoutData(org.eclipse.swt.layout.GridData gd)

		label.setLayoutData( gd );
	
public voidsetLayoutData(org.eclipse.swt.layout.FormData gd)

		label.setLayoutData( gd );
	
public voidsetText(java.lang.String new_value)

		if ( label.isDisposed()){
			return;
		}
				
		if ( new_value == value ){
			
			return;
		}
		
		if (	new_value != null && 
				value != null &&
				new_value.equals( value )){
					
			return;
		}
		
		value = new_value;
		
			// '&' chars that occur in the text are treated as accelerators and, for example,
			// cause the nect character to be underlined on Windows. This is generally NOT
			// the desired behaviour of a label in Azureus so by default we escape them
		
		label.setText( value==null?"":value.replaceAll("&", "&&" ));	
	
public voidsetToolTipText(java.lang.String toolTipText)

    label.setToolTipText(toolTipText);