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


Java ExpansionAdapter类代码示例

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


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

示例1: initAdditionalParametersUi

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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.events.ExpansionAdapter; //导入依赖的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: createStyleSection

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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

示例4: createStyleSection

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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

示例5: createProblemCategory

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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

示例6: createDiffViewer

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
/**
 * Creates an individual diff viewer in the given composite.
 */
private void createDiffViewer(final FormToolkit toolkit, Composite composite,
    final TaskAttribute diffTaskAttribute) {

  int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
      | ExpandableComposite.COMPACT;
  ExpandableComposite diffComposite = toolkit.createExpandableComposite(composite, style);
  diffComposite.clientVerticalSpacing = 0;
  diffComposite.setLayout(new GridLayout());
  diffComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  diffComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
  diffComposite.setText(calculateDiffChangeHeader(diffTaskAttribute));

  final Composite diffViewerComposite = toolkit.createComposite(diffComposite);
  diffComposite.setClient(diffViewerComposite);
  diffViewerComposite.setLayout(
      new FillWidthLayout(EditorUtil.getLayoutAdvisor(getTaskEditorPage()), 15, 0, 0, 3));

  diffComposite.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent event) {
      expandCollapseDiff(toolkit, diffViewerComposite, diffTaskAttribute, event.getState());
    }
  });
  GridDataFactory.fillDefaults().grab(true, false).applyTo(diffComposite);
}
 
开发者ID:google,项目名称:git-appraise-eclipse,代码行数:29,代码来源:AppraiseDiffViewerPart.java

示例7: createStyleSection

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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

示例8: createSecondSection

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
private void createSecondSection( ScrolledForm form, FormToolkit toolkit) {
	ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(), 
		     ExpandableComposite.TREE_NODE|
		     ExpandableComposite.CLIENT_INDENT);
		 ec.setText("Expandable Composite title");
		 String ctext = "We will now create a somewhat long text so that "+
		 "we can use it as content for the expandable composite. "+
		 "Expandable composite is used to hide or show the text using the " +
		 "toggle control";
		 Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
		 ec.setClient(client);
		 TableWrapData  td = new TableWrapData();
		 td.colspan = 2;
		 ec.setLayoutData(td);
		 ec.addExpansionListener(new ExpansionAdapter() {
		  @Override
		public void expansionStateChanged(ExpansionEvent e) {
		   form.reflow(true);
		  }
		 });

	
}
 
开发者ID:vogellacompany,项目名称:codeexamples-eclipse,代码行数:24,代码来源:FormsPart.java

示例9: createAdvancedSection

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
private void createAdvancedSection() {
  createExpandableComposite();
  final Composite bucketComposite = createBucketSection(expandableComposite);

  expandableComposite.setClient(bucketComposite);
  expandableComposite.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent event) {
      layoutChangedHandler.run();
    }
  });
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:13,代码来源:AppEngineDeployPreferencesPanel.java

示例10: initWerGroup

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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

示例11: postInitExpandable

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的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

示例12: configExpandable

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
private void configExpandable(ExpandableComposite exp, Composite client, String text, final Composite container, boolean expand) {
	exp.setClient(client);
	exp.setText(text);
	exp.addExpansionListener(new ExpansionAdapter() {
	      public void expansionStateChanged(ExpansionEvent e) {
	    	  container.layout();		    	  
	      }
	    });
	exp.setExpanded(expand);
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:11,代码来源:ServerWidget.java

示例13: initOtherTools

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
private void initOtherTools() {
	ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
	exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	Composite c = new Composite(exp, SWT.SHADOW_ETCHED_IN);
	c.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	c.setLayout(new GridLayout(1, true));
	
	otherToolsPagesSelector = new CurrentTranscriptOrCurrentDocPagesSelector(c, SWT.NONE, true);
	otherToolsPagesSelector.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	polygon2baselinesBtn = new Button(c, SWT.PUSH);
	polygon2baselinesBtn.setText("Add Baselines to Polygons");
	polygon2baselinesBtn.setToolTipText("Creates baselines for all surrounding polygons - warning: existing baselines will be lost (text is retained however!)");
	polygon2baselinesBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	baseline2PolygonBtn = new Button(c, SWT.PUSH);
	baseline2PolygonBtn.setText("Add Polygons to Baselines");
	baseline2PolygonBtn.setToolTipText("Creates polygons for all baselines - warning: existing polygons will be lost (text is retained however!)");
	baseline2PolygonBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
			
	exp.setClient(c);
	new Label(c, SWT.NONE);
	exp.setText("Other Tools");
	Fonts.setBoldFont(exp);
	exp.setExpanded(true);
	exp.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			layout();
		}
	});
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:32,代码来源:ToolsWidget.java

示例14: initWerGroup

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
private void initWerGroup() {
		werExp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
		werExp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		werGroup = new Composite(werExp, SWT.SHADOW_ETCHED_IN);
		werGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
//		metadatagroup.setText("Document metadata");
		werGroup.setLayout(new GridLayout(2, false));
		
		refVersionChooser = new TranscriptVersionChooser("Reference:\n(Correct Text) ", werGroup, 0);
		refVersionChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
		
		hypVersionChooser = new TranscriptVersionChooser("Hypothesis:\n(HTR Text) ", werGroup, 0);
		hypVersionChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));		
				
		Label emptyLabel = new Label(werGroup,0);
		computeWerBtn = new Button(werGroup, SWT.PUSH);
		computeWerBtn.setText("Compare");
		computeWerBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2, 1));
		computeWerBtn.setToolTipText("Compares the two selected transcripts and computes word error rate and character error rate.");
//		computeWerBtn.pack();
		
		compareVersionsBtn = new Button(werGroup, SWT.PUSH);
		compareVersionsBtn.setText("Compare Versions in Textfile");
		compareVersionsBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2, 1));
		compareVersionsBtn.setToolTipText("Shows the difference of the two selected versions");
		
		werExp.setClient(werGroup);
		werExp.setText("Compute Accuracy");
		Fonts.setBoldFont(werExp);
		werExp.setExpanded(true);
		werExp.addExpansionListener(new ExpansionAdapter() {
			public void expansionStateChanged(ExpansionEvent e) {
				layout();
			}
		});
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:37,代码来源:ToolsWidget.java

示例15: getExpansionListener

import org.eclipse.ui.forms.events.ExpansionAdapter; //导入依赖的package包/类
public IExpansionListener getExpansionListener()
{
    if (this.formRebuildingListener == null)
    {
        this.formRebuildingListener = new ExpansionAdapter() {
            public void expansionStateChanged(ExpansionEvent e)
            {
                getManagedForm().reflow(true);
            }
        };
    }
    return this.formRebuildingListener;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:14,代码来源:BasicFormPage.java


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