本文整理汇总了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();
}
示例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);
}
示例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);
}
}
示例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;
}
示例5: dispose
import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
@Override
public void dispose ()
{
for ( final Control control : this.controls )
{
control.dispose ();
}
}
示例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));
}
示例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();
}
示例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();
}
示例9: disposeContent
import org.eclipse.swt.widgets.Control; //导入方法依赖的package包/类
private void disposeContent() {
for (Control child : popupContent.getChildren())
child.dispose();
}