本文整理匯總了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();
}