本文整理汇总了Java中org.eclipse.swt.widgets.Button.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java Button.dispose方法的具体用法?Java Button.dispose怎么用?Java Button.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Button
的用法示例。
在下文中一共展示了Button.dispose方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeItems
import org.eclipse.swt.widgets.Button; //导入方法依赖的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);
}
}
示例2: removeTester
import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
public void removeTester ( final Button button )
{
button.dispose ();
if ( this.dialog != null )
{
this.dialog.layout ();
}
checkDisposeDialog ();
}
示例3: update
import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
public void update(String currentPageId) {
if (composite == null || composite.isDisposed())
return;
GC metricsGC = new GC(composite);
FontMetrics metrics = metricsGC.getFontMetrics();
metricsGC.dispose();
List buttons = (List) buttonMap.get(currentPageId);
Control[] children = composite.getChildren();
int visibleChildren = 0;
Button closeButton = getButton(IDialogConstants.CLOSE_ID);
for (int i = 0; i < children.length; i++) {
Control control = children[i];
if (closeButton == control)
closeButton.dispose();
else {
control.setVisible(false);
setButtonLayoutData(metrics, control, false);
}
}
if (buttons != null) {
for (int i = 0; i < buttons.size(); i++) {
Button button = (Button) buttons.get(i);
button.setVisible(true);
setButtonLayoutData(metrics, button, true);
GridData data = (GridData) button.getLayoutData();
data.exclude = false;
visibleChildren++;
}
}
GridLayout compositeLayout = (GridLayout) composite.getLayout();
compositeLayout.numColumns = visibleChildren;
composite.layout(true);
}