Java Code Examples for org.eclipse.swt.widgets.Item#setText()

The following examples show how to use org.eclipse.swt.widgets.Item#setText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseFolderImplementation.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
protected void useItem ( final Item item )
{
    if ( this.label != null )
    {
        item.setText ( this.label );
    }
    item.setImage ( getEmptyImage () );

    this.blinker = new StyleBlinker () {

        @Override
        public void update ( final CurrentStyle currentStyle )
        {
            if ( !item.isDisposed () )
            {
                updateItem ( item, currentStyle );
            }
        }
    };
    this.styler = new StateStyler ( this.blinker );
    this.styler.style ( new SummaryStateInformation ( this.summaryInformation ) );
}
 
Example 2
Source File: CTreeComboViewer.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
/** 
 * @see org.eclipse.jface.viewers.AbstractTreeViewer#disassociate(org.eclipse.swt.widgets.Item)
 */
protected void disassociate(Item item) {
	if (contentProviderIsLazy) {
		// avoid causing a callback:
		item.setText(" "); //$NON-NLS-1$
	}
	super.disassociate(item);
}