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


Java ExpandableComposite.setExpanded方法代码示例

本文整理汇总了Java中org.eclipse.ui.forms.widgets.ExpandableComposite.setExpanded方法的典型用法代码示例。如果您正苦于以下问题:Java ExpandableComposite.setExpanded方法的具体用法?Java ExpandableComposite.setExpanded怎么用?Java ExpandableComposite.setExpanded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.forms.widgets.ExpandableComposite的用法示例。


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

示例1: initAdditionalParametersUi

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initAdditionalParametersUi() {
		ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
		exp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
		
		additonalParameters = new Text(exp, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	    additonalParameters.setLayoutData(new GridData(GridData.FILL_BOTH));
		additonalParameters.setToolTipText("Advanced parameters for Text2Image - use key=value format in each line!");
//		advancedParameters.setText("hyphen=null\n");
		
//		advancedPropertiesTable = buildPropertyTable(exp, true);
		
		exp.setClient(additonalParameters);
		exp.setText("Additional Parameters");
//		Fonts.setBoldFont(exp);
		exp.setExpanded(true);
		exp.addExpansionListener(new ExpansionAdapter() {
			public void expansionStateChanged(ExpansionEvent e) {
				layout();
			}
		});
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:22,代码来源:Text2ImageConfComposite.java

示例2: initRecogTools

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initRecogTools() {
	ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
	exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	trComp = new TextRecognitionComposite(exp, 0);
	trComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
	
	exp.setClient(trComp);
	exp.setText("Text Recognition");
	Fonts.setBoldFont(exp);
	exp.setExpanded(true);
	exp.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			layout();
		}
	});
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:18,代码来源:ToolsWidget.java

示例3: selectOption

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
public void selectOption(Key key) {
	Control control = findControl(key);
	if (control != null) {
		if (!fExpandedComposites.isEmpty()) {
			ExpandableComposite expandable = getParentExpandableComposite(control);
			if (expandable != null) {
				for (int i = 0; i < fExpandedComposites.size(); i++) {
					ExpandableComposite curr = (ExpandableComposite) fExpandedComposites.get(i);
					curr.setExpanded(curr == expandable);
				}
				expandedStateChanged(expandable);
			}
		}
		control.setFocus();
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:17,代码来源:OptionsConfigurationBlock.java

示例4: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
	ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE,
			ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	fExpandedComposites.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:17,代码来源:OptionsConfigurationBlock.java

示例5: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
	ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE
			| ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		@Override
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	expandedComposites.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:18,代码来源:OptionsConfigurationBlock.java

示例6: createProblemCategory

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private Composite createProblemCategory(Composite parent, String label) {
  // Expandable panel for each category of problems
  ExpandableComposite expandPanel = new ExpandableComposite(parent, SWT.NONE,
      ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
  expandPanel.setText(label);
  expandPanel.setExpanded(false);
  expandPanel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
  expandPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
  expandPanel.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent e) {
      topPanel.layout(true, true);
      scrollPanel.setMinSize(topPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    }
  });

  // Create panel to store the actual problems
  Composite categoryPanel = new Composite(expandPanel, SWT.NONE);
  categoryPanel.setLayout(new GridLayout(2, false));
  expandPanel.setClient(categoryPanel);

  return categoryPanel;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:24,代码来源:ErrorsWarningsPage.java

示例7: createControls

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
	super.createControls(parent, tabbedPropertySheetPage);
	String anchorNameProperty = getAnchorNameProperty();
	String bookmarkLevelProperty = getBookmarkLevelProperty();
	if (bookmarkLevelProperty != null || anchorNameProperty != null){
		parent = getWidgetFactory().createSection(parent, Messages.BookmarkSection_bookmarkSectionTitle, true, 2);
		section = (ExpandableComposite)parent.getParent();
		parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		if (anchorNameProperty != null) {
			ASPropertyWidget exp = createWidget4Property(parent, anchorNameProperty, true);  
			exp.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		}
		if (bookmarkLevelProperty != null){
			createWidget4Property(parent,bookmarkLevelProperty, true);  
			section.setExpanded(false);
		}
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:BookmarkSection.java

示例8: selectOption

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
public void selectOption(Key key) {
	Control control= findControl(key);
	if (control != null) {
		if (!fExpandableComposites.isEmpty()) {
			ExpandableComposite expandable= getParentExpandableComposite(control);
			if (expandable != null) {
				for (int i= 0; i < fExpandableComposites.size(); i++) {
					ExpandableComposite curr= fExpandableComposites.get(i);
					curr.setExpanded(curr == expandable);
				}
				expandedStateChanged(expandable);
			}
		}
		control.setFocus();
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:OptionsConfigurationBlock.java

示例9: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns, Key key) {
	ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	if (key != null) {
		excomposite.setData(key);
	}
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		@Override
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	fExpandableComposites.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:OptionsConfigurationBlock.java

示例10: showChild

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
public void showChild(Object childSource){
	
	if(childSource == null){
		return;
	}
	
	for(CompositeContainerChild child : getChilds()){
		if(childSource.equals(child.getSource())){
			Composite childComposite = child.getComposite();
			if(childComposite instanceof ExpandableComposite){
				ExpandableComposite ec = (ExpandableComposite)childComposite;
				ec.setExpanded(true);
				
				composite.layout();
				composite.redraw();
				composite.pack();
			}
			showControl(child.getComposite());
		}
	}
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:22,代码来源:CompositeContainer.java

示例11: setExpandedState

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void setExpandedState(ExpandableComposite ec, String field){
	String mode =
		CoreHub.userCfg.get(USERSETTINGS2_EXPANDABLE_COMPOSITES,
			USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_REMEMBER_STATE);
	if (mode.equals(USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_OPEN)) {
		ec.setExpanded(true);
	} else if (mode.equals(USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED)) {
		ec.setExpanded(false);
	} else {
		String state =
			CoreHub.userCfg.get(USERSETTINGS2_EXPANDABLE_COMPOSITES_STATES + field,
				USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED);
		if (state.equals(USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED)) {
			ec.setExpanded(false);
		} else {
			ec.setExpanded(true);
		}
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:20,代码来源:RechnungsBlatt.java

示例12: setExpandedState

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
 * Set the state of an expandable Composite to the previously saved state.
 * 
 * @param ec
 *            the expandable Composite to expand or collapse
 * @param field
 *            the unique name
 * @since 3.0.0 extracted from UserSettings2
 */
public static void setExpandedState(final ExpandableComposite ec, final String field){
	String mode =
		CoreHub.userCfg.get(USERSETTINGS2_EXPANDABLE_COMPOSITES,
			USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_REMEMBER_STATE);
	if (mode.equals(USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_OPEN)) {
		ec.setExpanded(true);
	} else if (mode.equals(USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED)) {
		ec.setExpanded(false);
	} else {
		String state =
			CoreHub.userCfg.get(USERSETTINGS2_EXPANDABLE_COMPOSITES_STATES + field,
				USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED);
		if (state.equals(USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED)) {
			ec.setExpanded(false);
		} else {
			ec.setExpanded(true);
		}
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:29,代码来源:UserSettings.java

示例13: createExpandableComposite

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void createExpandableComposite() {
  expandableComposite = new ExpandableComposite(this, SWT.NONE, ExpandableComposite.TWISTIE);
  FontUtil.convertFontToBold(expandableComposite);
  expandableComposite.setText(Messages.getString("settings.advanced"));
  expandableComposite.setExpanded(false);
  GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
  gridData.horizontalSpan = 2;
  expandableComposite.setLayoutData(gridData);

  formToolkit.adapt(expandableComposite, true, true);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:12,代码来源:AppEngineDeployPreferencesPanel.java

示例14: initWerGroup

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initWerGroup() {
		ExpandableComposite werExp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
		Composite werGroup = new Composite(werExp, SWT.SHADOW_ETCHED_IN);
		werGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
//		metadatagroup.setText("Document metadata");
		werGroup.setLayout(new GridLayout(2, false));
		
		Label refLabel = new Label(werGroup, 0);
		refLabel.setText("Reference:");
		refVersionCombo = new Combo(werGroup, SWT.READ_ONLY);
		
		Label hypLabel = new Label(werGroup, 0);
		hypLabel.setText("Hypothesis:");
		hypVersionCombo = new Combo(werGroup, SWT.READ_ONLY);
		
		Label emptyLabel = new Label(werGroup,0);
		computeWerBtn = new Button(werGroup, SWT.PUSH);
		computeWerBtn.setText("Compare");
		computeWerBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
		computeWerBtn.setToolTipText("Compares the two selected transcripts and computes word error rate and character error rate.");
		computeWerBtn.pack();
		
		werExp.setClient(werGroup);
		werExp.setText("Compute WER");
		werExp.setExpanded(true);
		werExp.addExpansionListener(new ExpansionAdapter() {
			public void expansionStateChanged(ExpansionEvent e) {
				layout();
			}
		});
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:32,代码来源:AnalyticsWidget.java

示例15: postInitExpandable

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void postInitExpandable(ExpandableComposite exp, Composite c, String title) {
	exp.setClient(c);
	exp.setText("OCR");
	exp.setExpanded(true);
	exp.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			layout();
		}
	});
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:11,代码来源:AnalyticsWidget.java


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