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


Java Control.dispose方法代码示例

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


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

示例1: removeSelectedRows

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
public void removeSelectedRows(){
	List<Control> removedRows = new LinkedList<>();
	for(Control row : textGrid){
		//rows.dispose();
		for(Control column : ((Composite)row).getChildren()){
			if(column instanceof Button){
				if(((Button)column).getSelection()){
					row.dispose();
					removedRows.add(row);
					break;
				}
			}				
		}
	}
	
	for(Control removedRow: removedRows){
		textGrid.remove(removedRow);
	}
	
	refresh();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:22,代码来源:TextGrid.java

示例2: initIdTableEditor

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
private void initIdTableEditor(TableItem item) {

        Control oldEditor = _IdTableEditor.getEditor();
        if (oldEditor != null) {
            oldEditor.dispose();
        }

        if (item == null) {
            return;
        }

        Table table = getTable();

        Text newEditor = new Text(table, SWT.SINGLE);

        newEditor.setText(item.getText(TABLE_COLUMN_ID));
        newEditor.addModifyListener(new ModifyListener() {

            @Override
            public void modifyText(ModifyEvent e) {
                Text editor = (Text) _IdTableEditor.getEditor();
                _IdTableEditor.getItem().setText(TABLE_COLUMN_ID, editor.getText());

                fireOrchestrationChange();
            }
        });

        _IdTableEditor.setEditor(newEditor, item, TABLE_COLUMN_ID);
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:30,代码来源:ZnodeAclComposite.java

示例3: removeItems

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
private void removeItems(TableItem[] items) {

        Table table = getTable();
        table.setRedraw(false);
        try {

            for (TableItem item : items) {

                Control schemeTableEditorControl = _SchemeTableEditor.getEditor();
                if (schemeTableEditorControl != null) {
                    schemeTableEditorControl.dispose();
                }

                _SchemeTableEditor.setEditor(null, item, 0);

                Control idTableEditorControl = _IdTableEditor.getEditor();
                if (idTableEditorControl != null) {
                    idTableEditorControl.dispose();
                }

                _IdTableEditor.setEditor(null, item, 1);

                for (int perm : PERMS) {
                    TableEditor tableEditor = getItemPermTableEditor(item, perm);
                    Button checkBox = (Button) tableEditor.getEditor();
                    tableEditor.dispose();
                    checkBox.dispose();
                }

                item.dispose();
            }
        }
        finally {
            table.setRedraw(true);
        }
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:37,代码来源:ZnodeAclComposite.java

示例4: deactivateNode

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
private void deactivateNode ()
{
    for ( final Control control : this.mainArea.getChildren () )
    {
        control.dispose ();
    }
    this.currentNode = null;
    this.currentPage = null;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:PageManager.java

示例5: dispose

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
@Override
public void dispose ()
{
    for ( final Control control : this.controls )
    {
        control.dispose ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:TrackingVisibleComponent.java

示例6: buildTBoxComposite

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
private void buildTBoxComposite(){
	// remove all of the old children from the composite.
	Control[] cList = tboxComp.getChildren();
	for(int i=0; i<cList.length; i++){
		Control c = cList[i];
		if(c instanceof ParamComp){
			((ParamComp)c).removeParamListener();
		}
		c.dispose();
	}
	
	// setup the composite for rowLayout.
	GridLayout gl = new GridLayout();
	gl.numColumns = 1;
	gl.marginWidth = 2;		
	gl.marginHeight = 2;
	gl.verticalSpacing = 1;
	gl.horizontalSpacing = 0;
	tboxComp.setLayout(gl);
	
	//
	// TODO: sort all tools alphabetically
	LinkedList<MenuetElement> mElements = AvoGlobal.menuet.menuetElements[AvoGlobal.menuet.currentToolMode];
	for(int i=0; i<mElements.size(); i++){
		MenuetElement me = mElements.get(i);
		if(me.isStoredInToolbox){
			MTToolComposite cnew = new MTToolComposite(tboxComp, SWT.BORDER, me);				
			GridData gd = new GridData();
			gd.grabExcessHorizontalSpace = true;
			gd.widthHint = 300;
			cnew.setLayoutData(gd);
		}
	}	
	tboxComp.pack();		
       spComp.setMinSize(tboxComp.computeSize(spComp.getClientArea().width-10, SWT.DEFAULT));
}
 
开发者ID:avoCADo-3d,项目名称:avoCADo,代码行数:37,代码来源:MenuetToolboxDialog.java

示例7: clear

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
public void clear() {
	// TODO Auto-generated method stub
	for(Control row : textGrid){
		row.dispose();
	}
	
	textGrid.clear();
	refresh();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:TextGrid.java

示例8: clearControls

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
protected void clearControls() {
	for (Control child : composite.getChildren()) {
		child.dispose();
	}
	for (Map.Entry<AvroAttribute<?>, AttributeControl<?>> entry : attributeControlMap.entrySet()) {
		entry.getValue().dispose();
	}
	attributeControlMap.clear();
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:10,代码来源:AttributeViewer.java

示例9: disposeContent

import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
private void disposeContent() {
	for (Control child : popupContent.getChildren())
		child.dispose();
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:5,代码来源:InfoPopup.java


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