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


Java ExpandItem类代码示例

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


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

示例1: removeItems

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void removeItems() {
    ExpandItem[] items = bar.getItems();
    for (int i = items.length - 1; i >= 0; i--)
    {
        items[i].getControl().dispose();
        items[i].dispose();
    }
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:9,代码来源:ComponentExplorerComposite.java

示例2: refresh

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void refresh() {
    //Display.getDefault().timerExec(1, new Runnable()
	Display.getDefault().asyncExec(new Runnable()
    {
        @Override
        public void run()
        {
			for (ExpandItem expandItem : bar.getItems()) {
				Point size = expandItem.getControl().getSize();
				Point size2 = expandItem.getControl().computeSize(size.x,SWT.DEFAULT);
				expandItem.setHeight(size2.y);
			}
        	
			Rectangle r = scrolledComposite.getClientArea();
			scrolledComposite.setMinSize(bar.computeSize(r.width, SWT.DEFAULT));
        	scrolledComposite.layout(true, true);
        }
    });
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:ComponentExplorerComposite.java

示例3: checkIfSchemaIsBlank

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private boolean checkIfSchemaIsBlank(List<FilterProperties> filterProperties) {
	if(filterProperties.isEmpty())
	{
		
		transformMapping.getOutputFieldList().clear();
		for(MappingSheetRow mappingSheetRow:transformMapping.getMappingSheetRows())
		{
			mappingSheetRow.getOutputList().clear();
		}
		for(ExpandItem item:expandBar.getItems())
		{
			
			TableViewer tableViewer=(TableViewer)item.getData(OUTPUT_TABLE_VIEWER);
			if(tableViewer!=null)
			tableViewer.refresh();
		}
		transformMapping.getMapAndPassthroughField().clear();
		mappingTableViewer.refresh();
		finalSortedList.clear();
		outputFieldViewer.refresh();
		
	}
	return filterProperties.isEmpty();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:25,代码来源:TransformDialog.java

示例4: removeItem

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
/**
 * Removes the item from the view, performing necessary
 * cleanup.
 * 
 * @param item
 */
private void removeItem(ExpandItem item)
{
    // remove the source viewer's control from the
    // font listener since it no longer needs to be
    // notified of font changes.
    fontListener.removeControl(((SourceViewer) viewers.get(item)).getControl());

    // retrieve the id for the item
    // the id is stored in the item's data, which should be a marker,
    // as set in the updateItem method
    final Object data = item.getData(KEY);
    items.remove(Integer.parseInt(data.toString()));

    item.getControl().dispose();
    item.dispose();
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:23,代码来源:ObligationsView.java

示例5: attachListenerOnSwitchToClassButton

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void attachListenerOnSwitchToClassButton(
			final ExpandItem expandItem,
			final OperationClassComposite operationClassComposite,
			final AbstractExpressionComposite expressionComposite) {
		expressionComposite.getSwitchToClassButton().addSelectionListener(new SelectionAdapter() {
 			@Override
 			public void widgetSelected(SelectionEvent e) 
 			{
 				Button toggleButton=(Button)e.widget;
 				if(toggleButton.getSelection())
 				{
 					toggleButton.setSelection(false);
 					expandItem.setControl(operationClassComposite);
 					expandItem.setText(operationClassComposite.getOperationIdTextBox().getText());
 					MappingSheetRow mappingSheetRowForExpressionClass=(MappingSheetRow)expressionComposite.getData(Messages.MAPPING_SHEET);
 					MappingSheetRow mappingSheetRowForOperationClass=
 							(MappingSheetRow)operationClassComposite.getBrowseButton().getData(Messages.MAPPING_SHEET);
 					removeExpressionOrOperationOutputFieldFromOutputList(mappingSheetRowForExpressionClass);
 					transformMapping.getOutputFieldList().addAll(mappingSheetRowForOperationClass.getOutputList());
 					mappingSheetRowForExpressionClass.setActive(false);
 					mappingSheetRowForOperationClass.setActive(true);
 					operationClassComposite.getSwitchToClassButton().setSelection(true);
 					expressionComposite.setVisible(false);
 					operationClassComposite.setVisible(true);
 					setDuplicateOperationInputFieldMap(mappingSheetRowForOperationClass);
 					refreshOutputTable();
 					showHideValidationMessage();
 					if(Constants.AGGREGATE.equalsIgnoreCase(component.getComponentName())||
 		    	     	   Constants.TRANSFORM.equalsIgnoreCase(component.getComponentName()) ||
 		    	     	 Constants.GROUP_COMBINE.equalsIgnoreCase(component.getComponentName()))
 		    	     	{
// 		    	     		expandItem.setHeight(220);
// 		    	     		middleSashForm.setWeights(new int[] {54, 59, 25});
 		    	     		scrolledComposite.setMinSize(expandBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
 		    	     	}
    				}	
 			}
 		});
	}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:40,代码来源:TransformDialog.java

示例6: attachModifyListenerToIdTextBox

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void attachModifyListenerToIdTextBox(
		final MappingSheetRow mappingSheetRow,Text operationIDTextBox) {
	operationIDTextBox.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			Text textBox = (Text) e.widget;

			ExpandItem expandItem = (ExpandItem) textBox.getData();

			expandItem.setText(textBox.getText());
			mappingSheetRow.setOperationID(textBox.getText());
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:16,代码来源:TransformDialog.java

示例7: syncTransformFieldsWithSchema

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void syncTransformFieldsWithSchema() {
	
	List<FilterProperties> filterProperties = convertSchemaToFilterProperty();
	if(checkIfSchemaIsBlank(filterProperties))
	{
	return;
	} 	
	SchemaSyncUtility.INSTANCE.removeOpFields(filterProperties, transformMapping,
			transformMapping.getMappingSheetRows(),component.getComponentName());
	Schema schema = (Schema) component.getProperties().get(Constants.SCHEMA_PROPERTY_NAME);
	List<NameValueProperty> outputFileds= SchemaSyncUtility.INSTANCE.getComponentSchemaAsProperty(schema.getGridRow());
	SchemaSyncUtility.INSTANCE.filterCommonMapFields(outputFileds, transformMapping);
	Map<Integer,FilterProperties> indexValueParameterMap=SchemaSyncUtility.INSTANCE.retainIndexAndValueOfParameterFields
			(transformMapping.getOutputFieldList());
	transformMapping.getOutputFieldList().clear();
	SchemaSyncUtility.INSTANCE.addOperationFieldAndMapPassthroughfieldToOutputField(transformMapping);
	List<FilterProperties> finalSortedList=SchemaSyncUtility.INSTANCE.
			sortOutputFieldToMatchSchemaSequence(filterProperties,transformMapping);
	transformMapping.getOutputFieldList().clear();
	transformMapping.getOutputFieldList().addAll(finalSortedList);
	SchemaSyncUtility.INSTANCE.addParamtereFieldsToSameIndexAsBeforePull(indexValueParameterMap,transformMapping);
	refreshOutputTable();
	for(ExpandItem item:expandBar.getItems())
	{
		TableViewer tableViewer=(TableViewer)item.getData(OUTPUT_TABLE_VIEWER);
		if(tableViewer!=null)
		tableViewer.refresh();
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:30,代码来源:TransformDialog.java

示例8: refresh

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
public void refresh(){
	for(ExpandItem expandItem:expandBar.getItems()){
		expandItem.setExpanded(false);
		expandItem.dispose();
	}
	isAllPassthrougButton.setSelection(transformMapping.isAllInputFieldsArePassthrough());
	loadExpressionAndOperationData();		
	mappingTableViewer.refresh();
	refreshOutputTable();
	showHideValidationMessage();
	
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:14,代码来源:TransformDialog.java

示例9: initExpandItmes

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void initExpandItmes() {
		ExpandItem item1 = new ExpandItem (bar, SWT.NONE, 0);
		item1.setText("Structure");
		item1.setHeight(structureGroup.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
		item1.setControl(structureGroup);		
		item1.setExpanded(true);
		
//		ExpandItem item3 = new ExpandItem (bar, SWT.NONE, 2);
//		item3.setText("Text-Style");
//		item3.setHeight(textStyleWidget.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
//		item3.setControl(textStyleWidget);
//		item3.setExpanded(true);
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:14,代码来源:StructuralMetadataWidget.java

示例10: ObligationsView

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
public ObligationsView()
{
    items = new HashMap<Integer, ExpandItem>();
    viewers = new HashMap<ExpandItem, SourceViewer>();
    fontListener = new FontPreferenceChangeListener(null, JFaceResources.TEXT_FONT);
    JFaceResources.getFontRegistry().addListener(fontListener);
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:8,代码来源:ObligationsView.java

示例11: setPluginName

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void setPluginName(ExpandItem expandItem, String name, boolean isInstalled) {
  if (isInstalled) {
    expandItem.setText(BaseMessages.getString(MARKET_PKG, "Marketplaces.Dialog.PluginInstalled.message", name));
  } else {
    expandItem.setText(BaseMessages.getString(MARKET_PKG, "Marketplaces.Dialog.PluginNotInstalled.message", name));
  }
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:8,代码来源:MarketplaceDialog.java

示例12: expandAtdl4jWidgetParentStrategyPanel

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
/**
 * Navigates through aWidget's getParent() looking for ExpandBar with ExpandItems not-yet-expanded and expands those
 * @param aWidget
 * @return boolean indicating whether any ExpandBar ExpandItems were adjusted
 */
public boolean expandAtdl4jWidgetParentStrategyPanel( Atdl4jWidget<?> aWidget )
{
	boolean tempAdjustedFlag = false;
	if ( ( aWidget.getParent() != null ) && ( aWidget.getParent() instanceof Composite ) )
	{
		Composite tempParent = (Composite) aWidget.getParent();
		
		while ( tempParent != null ) 
		{
			// -- Expand if necessary --
			if ( tempParent instanceof ExpandBar )
			{
				ExpandBar tempExpandBar = (ExpandBar) tempParent;
				for ( ExpandItem tempExpandItem : tempExpandBar.getItems() )
				{
					if ( ! tempExpandItem.getExpanded() )
					{
						tempExpandItem.setExpanded( true );
						// -- (relayoutParents=false) --
						relayoutExpandBar( tempExpandBar, false );
						tempAdjustedFlag = true;
					}
				}
			}

			// -- Iterate to next parent --
			if ( ( tempParent.getParent() != null ) && ( ( tempParent.getParent() instanceof Composite ) ) )
			{
				tempParent = (Composite) tempParent.getParent();
			}
			else
			{
				break;
			}
		}
	}

	return tempAdjustedFlag;
}
 
开发者ID:atdl4j,项目名称:atdl4j,代码行数:45,代码来源:SWTStrategyPanelHelper.java

示例13: createInputFieldExpandBarSection

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void createInputFieldExpandBarSection(Composite composite) {
	Composite composite_1 = new Composite(composite, SWT.NONE);
	GridLayout gl_composite_1 = new GridLayout(1, false);
	gl_composite_1.horizontalSpacing = 0;
	gl_composite_1.verticalSpacing = 0;
	gl_composite_1.marginWidth = 0;
	gl_composite_1.marginHeight = 0;
	composite_1.setLayout(gl_composite_1);
	GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true,
			1, 1);
	gd_composite_1.widthHint = 276;
	composite_1.setLayoutData(gd_composite_1);
	composite_1.setBounds(0, 0, 64, 64);

	final ScrolledComposite scrolledComposite_1 = new ScrolledComposite(
			composite_1, SWT.BORDER | SWT.V_SCROLL );
	scrolledComposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
			true, true, 1, 1));
	scrolledComposite_1.setExpandHorizontal(true);
	scrolledComposite_1.setExpandVertical(true);
	
	Composite composite_7 = new Composite(scrolledComposite_1, SWT.NONE);
	composite_7.setLayout(new GridLayout(1, false));

	final ExpandBar expandBar = new ExpandBar(composite_7, SWT.H_SCROLL);
	expandBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
			1));
	
	expandBar.setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 240, 240, 240));
	populateInputFieldExpandBarSection(expandBar);

	expandBar.getItem(0).setExpanded(true);

	scrolledComposite_1.setContent(composite_7);
	scrolledComposite_1.setMinSize(composite_7.computeSize(SWT.DEFAULT,
			SWT.DEFAULT));
	
	
	composite_7.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			
			for(ExpandItem expandItem:expandBar.getItems()){
				((TableColumn)expandItem.getData("TableColumn")).setWidth(scrolledComposite_1.getSize().x);
			}
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:49,代码来源:JoinMapDialog.java

示例14: okPressed

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
@Override
protected void okPressed() {
	for (ExpandItem expandItem : expandBar.getItems()) {
		
		for (Object object : checkboxTableViewer.getCheckedElements()) {
			if (expandItem.getText().equals(object.toString())) {
				expandItem.setExpanded(false);
				for (int i = 0; i < mappingSheetRowList.size(); i++) {
					if (mappingSheetRowList.get(i).getOperationID().equals(object.toString())) 
					{
					for(FilterProperties filterProperties:mappingSheetRowList.get(i).getOutputList())
						{	
						int index=-1;	
						for(int j=0;j<outerOutputList.size();j++)
						{
							if(outerOutputList.get(j)==filterProperties)
							{
								index=j;
								break;
							}	
						}
						if(index!=-1)
						outerOutputList.remove(index);
						}
						
						if(mappingSheetRowList.get(i).isExpression())
						{
							mappingSheetRowList.remove(i);
							mappingSheetRowList.remove(i-1);
							
						}
						else
						{
							mappingSheetRowList.remove(i+1);
							mappingSheetRowList.remove(i);
						}
					
					break;
					}
				}
				expandItem.dispose();
                   break;
			}
		}
	}
	super.okPressed();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:48,代码来源:OperationClassDeleteDialog.java

示例15: addExpandItem

import org.eclipse.swt.widgets.ExpandItem; //导入依赖的package包/类
private void addExpandItem(final ScrolledComposite scrollBarComposite) 
{
	final ExpandItem expandItem = new ExpandItem(expandBar, SWT.V_SCROLL);
	expandItem.setExpanded(true);
	if (OSValidator.isMac()) {
		if (Constants.AGGREGATE.equalsIgnoreCase(component.getComponentName())
				|| Constants.CUMULATE.equalsIgnoreCase(component.getComponentName())) {
			expandItem.setHeight(415);
		} else if (Constants.GROUP_COMBINE.equalsIgnoreCase(component.getComponentName())) {
			expandItem.setHeight(460);
		} else {
			expandItem.setHeight(362);
		}
	} else if (Constants.AGGREGATE.equalsIgnoreCase(component.getComponentName())
			|| Constants.CUMULATE.equalsIgnoreCase(component.getComponentName())) {
		expandItem.setHeight(409);
	} else if (Constants.GROUP_COMBINE.equalsIgnoreCase(component.getComponentName())) {
		expandItem.setHeight(450);
	} else {
		expandItem.setHeight(350);
	}
	expandBar.addListener(SWT.MouseUp, new Listener() {

		@Override
		public void handleEvent(Event event) {
			scrollBarComposite.setMinSize(expandBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		}
	});
	final OperationClassComposite operationClassComposite = createOperationClassComposite(expandItem);
	final AbstractExpressionComposite expressionComposite = createExpressionComposite(expandItem,
			operationClassComposite);
	if (mappingSheetRowForExpression.isActive()) {
		expandItem.setControl(expressionComposite);
		expandItem.setText(mappingSheetRowForExpression.getOperationID());
	} else if (mappingSheetRowForOperationClass.isActive()) {
		expandItem.setControl(operationClassComposite);
		expandItem.setText(mappingSheetRowForOperationClass.getOperationID());

	}
	if (!Constants.NORMALIZE.equalsIgnoreCase(component.getComponentName())) {
		attachListenerOnSwitchToClassButton(expandItem, operationClassComposite, expressionComposite);
		attachListenerOnSwitchToExpressiomButton(expandItem, operationClassComposite, expressionComposite);
	}
	showHideValidationMessage();
	scrollBarComposite.setContent(expandBar);
	scrollBarComposite.setMinSize(expandBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:48,代码来源:TransformDialog.java


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