Java Code Examples for org.eclipse.swt.widgets.Combo#deselectAll()

The following examples show how to use org.eclipse.swt.widgets.Combo#deselectAll() . 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: ParameterDialog.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
private void setExpression( Combo chooser, String key )
{
	chooser.deselectAll( );
	key = StringUtil.trimString( key );
	if ( StringUtil.isBlank( key ) )
	{
		chooser.setText( "" ); //$NON-NLS-1$
		return;
	}

	IExpressionConverter converter = ExpressionButtonUtil.getCurrentExpressionConverter( chooser );
	for ( int i = 0; i < columnList.size( ); i++ )
	{
		if ( key.equals( ExpressionUtility.getExpression( columnList.get( i ),
				converter ) ) )
		{
			// chooser.select( i );
			chooser.setText( ( (ResultSetColumnHandle) columnList.get( i ) ).getColumnName( ) );
			return;
		}
	}
	chooser.setText( key );
}
 
Example 2
Source File: GroupDialog.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
private void setKeyExpression( Combo chooser, String key )
{
	chooser.deselectAll( );
	key = StringUtil.trimString( key );
	if ( StringUtil.isBlank( key ) )
	{
		chooser.setText( "" ); //$NON-NLS-1$
		return;
	}

	IExpressionConverter converter = ExpressionButtonUtil.getCurrentExpressionConverter( chooser );
	for ( int i = 0; i < columnList.size( ); i++ )
	{
		if ( key.equals( ExpressionUtility.getExpression( columnList.get( i ),
				converter ) ) )
		{
			// chooser.select( i );
			chooser.setText( ( (ComputedColumnHandle) columnList.get( i ) ).getName( ) );
			return;
		}
	}
	chooser.setText( key );
}
 
Example 3
Source File: SWTAtdl4jInputAndFilterDataPanel.java    From atdl4j with MIT License 5 votes vote down vote up
/**
 * @param aDropDown
 * @param aItem
 */
public static void selectDropDownItem( Combo aDropDown, String aItem )
{
	if ( aItem != null )
	{
		aDropDown.setText( aItem );
	}
	else
	{
		aDropDown.deselectAll();
	}
}