当前位置: 首页>>代码示例>>Java>>正文


Java CascadingParameterGroupHandle类代码示例

本文整理汇总了Java中org.eclipse.birt.report.model.api.CascadingParameterGroupHandle的典型用法代码示例。如果您正苦于以下问题:Java CascadingParameterGroupHandle类的具体用法?Java CascadingParameterGroupHandle怎么用?Java CascadingParameterGroupHandle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CascadingParameterGroupHandle类属于org.eclipse.birt.report.model.api包,在下文中一共展示了CascadingParameterGroupHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test_regression_120292

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
/**
 * @throws DesignFileException
 * @throws SemanticException
 */
public void test_regression_120292( ) throws DesignFileException, SemanticException
{
	openDesign( filename );
	designHandle.includeLibrary( libraryname, "Lib" ); //$NON-NLS-1$

	libraryHandle = designHandle.getLibrary( "Lib" ); //$NON-NLS-1$
	CascadingParameterGroupHandle paramGroup = libraryHandle
			.findCascadingParameterGroup( "ParamGroup" ); //$NON-NLS-1$
	CascadingParameterGroupHandle extendGroup = (CascadingParameterGroupHandle) designHandle
			.getElementFactory( ).newElementFrom( paramGroup,
					paramGroup.getName( ) );
	designHandle.getParameters( ).add( extendGroup );
	assertEquals( "ParamGroup", extendGroup.getName( ) ); //$NON-NLS-1$
	assertEquals( "p1", extendGroup.getParameters( ).get( 0 ).getName( ) ); //$NON-NLS-1$
	assertEquals( "p2", extendGroup.getParameters( ).get( 1 ).getName( ) ); //$NON-NLS-1$
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:Regression_120292.java

示例2: test_regression_119386

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
/**
 * @throws DesignFileException
 * @throws ContentException
 * @throws NameException
 */

public void test_regression_119386( ) throws DesignFileException, ContentException,
		NameException
{
	openDesign( filename );

	CascadingParameterGroupHandle paramsgroup = designHandle
			.findCascadingParameterGroup( "ParameterGroup" ); //$NON-NLS-1$
	IDesignElement paramsgroup1 = paramsgroup.copy( );

	// Can't add a duplicated name group
	try
	{
		designHandle.getParameters( ).paste( paramsgroup1 );
		fail( );
	}
	catch ( NameException e )
	{
		assertNotNull( e );
	}

	designHandle
			.rename( paramsgroup1.getHandle( designHandle.getModule( ) ) );
	designHandle.getParameters( ).paste( paramsgroup1 );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:31,代码来源:Regression_119386.java

示例3: ParameterGroupFilter

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
public ParameterGroupFilter( Object[] keyValues,
		CascadingParameterGroupHandle parameterGroup )
{
	this.keyValues = keyValues;
	valueColumnNames = new String[keyValues.length];
	valueTypes = new String[keyValues.length];
	SlotHandle parameterSlots = parameterGroup.getParameters( );
	for ( int i = 0; i < keyValues.length; i++ )
	{
		ScalarParameterHandle tempParameter = (ScalarParameterHandle) parameterSlots
				.get( i );
		valueColumnNames[i] = ParameterHelper.getValueColumnName( tempParameter );
		valueTypes[i] = tempParameter.getDataType( );
	}

}
 
开发者ID:eclipse,项目名称:birt,代码行数:17,代码来源:GetParameterDefinitionTask.java

示例4: testAddCompoundElementFromHandle

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
/**
 * Test cases:
 * 
 * 1. If add an compound element to the design tree, names of nest elements
 * should also be added into the name space. This method creates new
 * elements by using factory.
 * 
 * @throws Exception
 *             if any error occurs
 * 
 */

public void testAddCompoundElementFromHandle( ) throws Exception
{
	CascadingParameterGroupHandle cascadingGroupHandle = factory
			.newCascadingParameterGroup( "cas1" ); //$NON-NLS-1$

	cascadingGroupHandle.getParameters( )
			.add(
					designHandle.getElementFactory( ).newScalarParameter(
							"param1" ) ); //$NON-NLS-1$

	cascadingGroupHandle.getParameters( )
			.add(
					designHandle.getElementFactory( ).newScalarParameter(
							"param2" ) ); //$NON-NLS-1$

	testCopyAndPasteCompoundElement( (CascadingParameterGroup) cascadingGroupHandle
			.getElement( ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:31,代码来源:ContentCommandTest.java

示例5: buildUI

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
public void buildUI( Composite parent  )
{
	super.buildUI( parent );
	container.setLayout( WidgetUtil.createGridLayout( 5 ,15) );

	buildsections( CascadingParameterGroupHandle.PROMPT_TEXT_ID_PROP,
			ReportDesignConstants.CASCADING_PARAMETER_GROUP_ELEMENT,
			I18N_I18N_PROMPT_TEXT,
			0 );
	buildsections( CascadingParameterGroupHandle.HELP_TEXT_KEY_PROP,
			ReportDesignConstants.CASCADING_PARAMETER_GROUP_ELEMENT,
			I18N_I18N_HELP_TEXT,
			1 );
	
	LabelSection labelSection = new LabelSection( MESSAGE_NOTE, container, true );
	labelSection.setGridPlaceholder( 3, true );
	labelSection.setWidth( 350 );
	labelSection.setFillLabel( true );
	addSection( PageSectionId.I18N_LABEL, labelSection );
	
	createSections( );
	layoutSections( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:CascadingParameterGroupI18nPage.java

示例6: update

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
public void update(Map<String, String[]> parameters, List<AbstractBirtType> parameterControls,
	IGetParameterDefinitionTask task)
{
	ScalarParameterHandle parameterHandle = (ScalarParameterHandle) scalarDef.getHandle();

	if( !(parameterHandle.getContainer() instanceof CascadingParameterGroupHandle && group != null) )
	{
		return;
	}

	int locIndex = parameterHandle.getContainerSlotHandle().findPosn(parameterHandle);
	if( locIndex == 0 )
	{
		return;
	}

	Object[] thingsBefore = new Object[locIndex];

	for( int j = 0; j < locIndex; j++ )
	{
		for( AbstractBirtType parameterControl : parameterControls )
		{
			if( parameterControl.getIndex() == j && group.getName().equals(parameterControl.getGroupname()) )
			{
				thingsBefore[j] = convertToParam(parameters.get(parameterControl.getName()), parameterControl);
				break;
			}
		}
	}

	task.getSelectionListForCascadingGroup(group.getName(), thingsBefore);
	setupControl(task, control);
}
 
开发者ID:equella,项目名称:Equella,代码行数:34,代码来源:AbstractBirtType.java

示例7: test_regression_137159

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
/**
 * 
 * @throws SemanticException
 */

public void test_regression_137159( ) throws SemanticException
{
	SessionHandle session = new DesignEngine( new DesignConfig( ) )
			.newSessionHandle( ULocale.ENGLISH );
	designHandle = session.createDesign( );
	ElementFactory factory = designHandle.getElementFactory( );
	CascadingParameterGroupHandle group = factory
			.newCascadingParameterGroup( "group" ); //$NON-NLS-1$
	group.setProperty( CascadingParameterGroup.PROMPT_TEXT_PROP,
			"prompttext" ); //$NON-NLS-1$
	assertEquals( "prompttext", group.getPromptText( ) ); //$NON-NLS-1$

}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:Regression_137159.java

示例8: visitCascadingParameterGroup

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
public void visitCascadingParameterGroup(
		CascadingParameterGroupHandle handle )
{
	// handleOnPrepare( handle );

	SlotHandle parameters = handle.getParameters( );
	int size = parameters.getCount( );
	for ( int n = 0; n < size; n++ )
	{
		apply( parameters.get( n ) );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:13,代码来源:ScriptedDesignVisitor.java

示例9: doGetSelectionTreeForCascadingGroup

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
private Collection doGetSelectionTreeForCascadingGroup(
		String parameterGroupName )
{
	CascadingParameterGroupHandle parameterGroup = getCascadingParameterGroup( parameterGroupName );
	if ( parameterGroup == null )
	{
		executionContext.addException( new EngineException(
				MessageConstants.PARAMETER_GROUP_ISNOT_FOUND_BY_GROUPNAME_EXCEPTION,
				parameterGroupName ) );
		return Collections.EMPTY_LIST;
	}
	SlotHandle parameters = parameterGroup.getParameters( );
	int parameterCount = parameters.getCount( );
	if ( DesignChoiceConstants.DATA_SET_MODE_SINGLE.equals( parameterGroup
			.getDataSetMode( ) ) )
	{
		// single dataSet
		IResultIterator resultIterator = getResultSetOfCascadingGroup( parameterGroup );
		if ( resultIterator == null )
		{
			return Collections.EMPTY_LIST;
		}
		Collection selectionTree = populateToSelectionTree( resultIterator,
				parameterGroup );
		close( resultIterator );
		return selectionTree;
	}
	else
	{
		ParameterHelper[] parameterHelpers = getParameterHelpers( parameterGroup );
		ChoiceListCache cache = new ChoiceListCache( parameterHelpers );
		assert( parameterCount > 0 );
		return getSelectionTree( parameters, parameterHelpers, cache,
				new Object[0] );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:37,代码来源:GetParameterDefinitionTask.java

示例10: populateToSelectionTree

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
private Collection populateToSelectionTree( IResultIterator iterator,
		CascadingParameterGroupHandle parameterGroup )
{
	assert iterator != null;
	ParameterHelper[] parameterHelpers = getParameterHelpers( parameterGroup );
	ChoiceListCache cache = new ChoiceListCache( parameterHelpers );
	int parameterCount = parameterHelpers.length;
	try
	{
		while ( iterator.next( ) )
		{
			Object[] values = new Object[parameterCount];
			for ( int i = 0; i < parameterCount; i++ )
			{
				ParameterHelper parameterHelper = parameterHelpers[i];
				CascadingParameterSelectionChoice choice = parameterHelper
						.createCascadingParameterSelectionChoice( iterator );
				values[i] = choice.getValue( );
				cache.getParent( values, i ).add( choice );
				choice.setChildren( cache.getChildren( values, i ) );
			}
		}
	}
	catch ( BirtException ex )
	{
		log.log( Level.WARNING, ex.getMessage( ), ex );
		executionContext.addException( parameterGroup, ex );
	}
	return cache.getRoot( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:31,代码来源:GetParameterDefinitionTask.java

示例11: getParameterHelpers

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
private ParameterHelper[] getParameterHelpers(
		CascadingParameterGroupHandle parameterGroup )
{
	SlotHandle parameters = parameterGroup.getParameters( );
	int parameterCount = parameters.getCount( );
	ParameterHelper[] parameterHelpers = new ParameterHelper[parameterCount];
	for ( int i = 0; i < parameterCount; i++ )
	{
		AbstractScalarParameterHandle parameter = (AbstractScalarParameterHandle) parameters
				.get( i );
		parameterHelpers[i] = new ParameterHelper( parameter, ulocale,
				timeZone );
	}
	return parameterHelpers;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:16,代码来源:GetParameterDefinitionTask.java

示例12: getCascadingParameterGroup

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
private CascadingParameterGroupHandle getCascadingParameterGroup(
		String name )
{
	ModuleHandle design = executionContext.getDesign( );

	return design.findCascadingParameterGroup( name );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:8,代码来源:GetParameterDefinitionTask.java

示例13: getCascadingGroup

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
private CascadingParameterGroupHandle getCascadingGroup( ParameterHandle parameter )
{
	DesignElementHandle handle = parameter.getContainer( );
	assert handle instanceof CascadingParameterGroupHandle;
	CascadingParameterGroupHandle parameterGroup = ( CascadingParameterGroupHandle ) handle;
	return parameterGroup;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:8,代码来源:GetParameterDefinitionTask.java

示例14: processInputElementAttributes

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
/**
 * 
 * @param attrs
 * @throws SemanticException
 */
private void processInputElementAttributes( InputElementAttributes attrs )
		throws SemanticException
{
	if ( attrs == null )
		return;

	// isRequired -- isOptional
	reportParam.setIsRequired( !attrs.isOptional( ) );

	// update conceal value
	reportParam.setConcealValue( attrs.isMasksValue( ) );

	// handle default values
	StaticValues values = attrs.getDefaultValues( );
	processStaticValues( values );

	// handle selection choices
	ScalarValueChoices choices = attrs.getStaticValueChoices( );
	processScalarValueChoices( choices );

	// update dynamic list
	DynamicValuesQuery valueQuery = attrs.getDynamicValueChoices( );
	AdapterUtil.updateROMDyanmicList( valueQuery, null, reportParam,
			setHandle );

	// update value type
	String valueType = DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC;
	if ( ( valueQuery != null && valueQuery.isEnabled( ) )
			|| ( reportParam.getContainer( ) != null && reportParam
					.getContainer( ) instanceof CascadingParameterGroupHandle ) )
		valueType = DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC;
			
	reportParam.setValueType( valueType );
	
	InputElementUIHints inputElementUIHints = attrs.getUiHints( );
	processInputElementUIHints( inputElementUIHints );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:43,代码来源:ReportParamUpdater.java

示例15: testGetPropertiesAndContents

import org.eclipse.birt.report.model.api.CascadingParameterGroupHandle; //导入依赖的package包/类
/**
 * Tests get properties and get contents.
 * 
 * @throws DesignFileException
 */

public void testGetPropertiesAndContents( ) throws DesignFileException,
		SemanticException
{
	openDesign( INPUT );
	CascadingParameterGroupHandle groupHandle = getGroupHandle( "Country-State-City" ); //$NON-NLS-1$
	assertEquals(
			"Group for Country-State-City", groupHandle.getDisplayName( ) ); //$NON-NLS-1$

	assertEquals( "actuate", groupHandle.getPromptText( ) );//$NON-NLS-1$

	groupHandle.setPromptText( "actuate shanghai" );//$NON-NLS-1$
	assertEquals( "actuate shanghai", groupHandle.getPromptText( ) );//$NON-NLS-1$

	assertEquals(
			"ResourceKey.Parameter.PromptText", groupHandle.getPromptTextKey( ) );//$NON-NLS-1$

	groupHandle.setPromptTextKey( "ResourceKey.Parameter.PromptTextValue" );//$NON-NLS-1$
	assertEquals(
			"ResourceKey.Parameter.PromptTextValue", groupHandle.getPromptTextKey( ) );//$NON-NLS-1$

	assertEquals( DesignChoiceConstants.DATA_SET_MODE_MULTIPLE, groupHandle
			.getDataSetMode( ) );

	SlotHandle parameters = groupHandle.getParameters( );
	assertEquals( 3, parameters.getCount( ) );

	ScalarParameterHandle p1 = (ScalarParameterHandle) parameters.get( 0 );

	assertEquals( "dynamic", p1.getValueType( ) ); //$NON-NLS-1$
	assertEquals( "Country", p1.getName( ) ); //$NON-NLS-1$
	assertEquals( "ds1", p1.getDataSetName( ) ); //$NON-NLS-1$
	assertEquals( "country", p1.getValueExpr( ) ); //$NON-NLS-1$
	assertEquals( "Enter country:", p1.getLabelExpr( ) ); //$NON-NLS-1$
}
 
开发者ID:eclipse,项目名称:birt,代码行数:41,代码来源:CascadingParameterGroupParserTest.java


注:本文中的org.eclipse.birt.report.model.api.CascadingParameterGroupHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。