org.eclipse.swt.widgets.Composite#dispose ( )源码实例Demo

下面列出了org.eclipse.swt.widgets.Composite#dispose ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: tracecompass   文件: HistogramView.java
public PackedScrolledComposite(Composite parent, int style) {
    super(parent, style);
    Composite composite = new Composite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
    composite.setSize(1, 1);
    fScrollBarSize = composite.computeSize(0, 0);
    composite.dispose();
}
 
源代码2 项目: ldparteditor   文件: Composite3DModifier.java
/**
 * Displays a horizontal and vertical scale around the
 * {@linkplain Composite3D}.
 *
 * @param shown
 *            True if the scale should be shown
 */
public void showScale(boolean shown) {
    NLogger.debug(Composite3DModifier.class, "[Show scale]"); //$NON-NLS-1$
    if (shown) {
        new CompositeScale(c3d.getCompositeContainer(), c3d, SWT.NONE);
    } else {
        Composite oldScale = c3d.getParent();
        c3d.setParent(c3d.getCompositeContainer());
        // Important, since the FillLayout from the parent requires no LayoutData
        c3d.setLayoutData(null);
        oldScale.dispose();
    }
    c3d.getCompositeContainer().layout();
}
 
源代码3 项目: atdl4j   文件: SWTStrategyUIFactory.java
public static StrategyUI createStrategyUIAndContainer(SWTStrategiesUI aStrategiesUI, StrategyT aStrategy)
{
	// create composite
	Composite strategyParent = new Composite( aStrategiesUI.getStrategiesPanel(), SWT.NONE );
	
	GridLayout strategyParentLayout = new GridLayout( 2, false );
	strategyParentLayout.verticalSpacing = 0;
	strategyParent.setLayout( strategyParentLayout );
	
	StrategyUI ui;

	// build strategy and catch strategy-specific errors
	try 
	{
		ui = createStrategyUI( aStrategy, aStrategiesUI.getStrategies(), aStrategiesUI.getStrategiesRules(), strategyParent, aStrategiesUI.getAtdl4jOptions() );
		
		// -- add additional components to take up space on left and bottom --
		Label tempLabel = new Label( strategyParent, SWT.NONE );
		tempLabel.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );					
		Label tempLabel2 = new Label( strategyParent, SWT.NONE );
		tempLabel2.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );					
		Label tempLabel3 = new Label( strategyParent, SWT.NONE );
		tempLabel3.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );					
	} 
	catch (Throwable e) 
	{
		getAtdl4jUserMessageHandler().displayException( "Strategy Load Error",
				"Error in Strategy: " + Atdl4jHelper.getStrategyUiRepOrName( aStrategy ), e );

		// rollback changes
		strategyParent.dispose();

		// skip to next strategy
		return null;
	} 

	ui.setCxlReplaceMode( aStrategiesUI.getAtdl4jOptions().getInputAndFilterData().getInputCxlReplaceMode() );

	return ui;
}
 
private int computeScrollBarWidth() {
	Composite t= new Composite(fTable.getShell(), SWT.V_SCROLL);
	int result= t.computeTrim(0, 0, 0, 0).width;
	t.dispose();
	return result;
}
 
源代码5 项目: translationstudio8   文件: UpdateNoteDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
@Override
protected void createButtonsForButtonBar(Composite parent) {
	// super.createButtonsForButtonBar(parent);
	parent.dispose();
}
 
源代码7 项目: translationstudio8   文件: TMXValidatorDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	parent.dispose();
}
 
源代码8 项目: translationstudio8   文件: TBXMakerDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmpTemp = parent.getParent();
	parent.dispose();
	cmpTemp.layout();
}
 
源代码9 项目: translationstudio8   文件: AboutDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmpTemp = parent.getParent();
	parent.dispose();
	cmpTemp.layout();
}
 
源代码11 项目: translationstudio8   文件: RTFCleanerDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
源代码12 项目: translationstudio8   文件: PluginHelpDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
源代码13 项目: tmxeditor8   文件: PluginHelpDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
源代码14 项目: tmxeditor8   文件: JavaPropertiesViewerDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	// super.createButtonsForButtonBar(parent);
	parent.dispose();
}
 
源代码15 项目: tmxeditor8   文件: TMXValidatorDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	parent.dispose();
}
 
源代码16 项目: tmxeditor8   文件: TBXMakerDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmpTemp = parent.getParent();
	parent.dispose();
	cmpTemp.layout();
}
 
源代码17 项目: tmxeditor8   文件: AboutDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
源代码18 项目: tmxeditor8   文件: RTFCleanerDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
源代码19 项目: tmxeditor8   文件: PluginHelpDialog.java
@Override
protected void createButtonsForButtonBar(Composite parent) {
	Composite cmp = parent.getParent();
	parent.dispose();
	cmp.layout();
}
 
源代码20 项目: bonita-studio   文件: TabbedPropertySheetPage.java
/**
 * Disposes the TabContents objects passed to this method. If the
 * 'currentTab' is going to be disposed, then the caller should call
 * aboutToBeHidden() on the currentTab and set it to null before calling
 * this method. Also, the caller needs to ensure that descriptorToTab map
 * entries corresponding to the disposed TabContents objects are also
 * removed.
 *
 * @param tabs
 * @since 3.6
 */
protected void disposeTabs(Collection tabs) {
	for (Iterator<TabContents> iter = tabs.iterator(); iter.hasNext();) {
		TabContents tab = iter.next();
		Composite composite = tabToComposite.remove(tab);
		tab.dispose();
		if (composite != null) {
			composite.dispose();
		}
	}
}