當前位置: 首頁>>代碼示例>>Java>>正文


Java TableEditor.getEditor方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.TableEditor.getEditor方法的典型用法代碼示例。如果您正苦於以下問題:Java TableEditor.getEditor方法的具體用法?Java TableEditor.getEditor怎麽用?Java TableEditor.getEditor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.TableEditor的用法示例。


在下文中一共展示了TableEditor.getEditor方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getSelectedColumn

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private NormalColumn getSelectedColumn(final TableEditor tableEditor) {
    final Combo foreignKeyCombo = (Combo) tableEditor.getEditor();
    final int foreignKeyComboIndex = foreignKeyCombo.getSelectionIndex();
    int startIndex = 1;

    NormalColumn foreignKeyColumn = null;

    final List<NormalColumn> foreignKeyList = editorReferencedMap.get(tableEditor);
    if (foreignKeyList != null) {
        if (foreignKeyComboIndex <= foreignKeyList.size()) {
            foreignKeyColumn = foreignKeyList.get(foreignKeyComboIndex - startIndex);
        } else {
            startIndex += foreignKeyList.size();
        }
    }

    if (foreignKeyColumn == null) {
        foreignKeyColumn = candidateForeignKeyColumns.get(foreignKeyComboIndex - startIndex);
    }

    return foreignKeyColumn;
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:23,代碼來源:RelationByExistingColumnsDialog.java

示例2: getErrorMessage

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
@Override
protected String getErrorMessage() {
    final Set<NormalColumn> selectedColumns = new HashSet<NormalColumn>();

    for (final TableEditor tableEditor : tableEditorList) {
        final Combo foreignKeyCombo = (Combo) tableEditor.getEditor();
        final int index = foreignKeyCombo.getSelectionIndex();

        if (index == 0) {
            return "error.foreign.key.not.selected";
        }

        final NormalColumn selectedColumn = getSelectedColumn(tableEditor);
        if (selectedColumns.contains(selectedColumn)) {
            return "error.foreign.key.must.be.different";
        }

        selectedColumns.add(selectedColumn);
    }

    if (existForeignKeySet(selectedColumns)) {
        return "error.foreign.key.already.exist";
    }

    return null;
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:27,代碼來源:RelationByExistingColumnsDialog.java

示例3: getSelectedColumn

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private NormalColumn getSelectedColumn(TableEditor tableEditor) {
	Combo foreignKeyCombo = (Combo) tableEditor.getEditor();
	int foreignKeyComboIndex = foreignKeyCombo.getSelectionIndex();
	int startIndex = 1;

	NormalColumn foreignKeyColumn = null;

	List<NormalColumn> foreignKeyList = this.editorReferencedMap
			.get(tableEditor);
	if (foreignKeyList != null) {
		if (foreignKeyComboIndex <= foreignKeyList.size()) {
			foreignKeyColumn = foreignKeyList.get(foreignKeyComboIndex
					- startIndex);
		} else {
			startIndex += foreignKeyList.size();
		}
	}

	if (foreignKeyColumn == null) {
		foreignKeyColumn = this.candidateForeignKeyColumns
				.get(foreignKeyComboIndex - startIndex);
	}

	return foreignKeyColumn;
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:26,代碼來源:RelationByExistingColumnsDialog.java

示例4: getErrorMessage

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
@Override
protected String getErrorMessage() {
	Set<NormalColumn> selectedColumns = new HashSet<NormalColumn>();

	for (TableEditor tableEditor : this.tableEditorList) {
		Combo foreignKeyCombo = (Combo) tableEditor.getEditor();
		int index = foreignKeyCombo.getSelectionIndex();

		if (index == 0) {
			return "error.foreign.key.not.selected";
		}

		NormalColumn selectedColumn = this.getSelectedColumn(tableEditor);
		if (selectedColumns.contains(selectedColumn)) {
			return "error.foreign.key.must.be.different";
		}

		selectedColumns.add(selectedColumn);
	}

	if (this.existForeignKeySet(selectedColumns)) {
		return "error.foreign.key.already.exist";
	}

	return null;
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:27,代碼來源:RelationByExistingColumnsDialog.java

示例5: findSelectedColumn

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private NormalColumn findSelectedColumn(TableEditor tableEditor) { // not null
    final Combo foreignKeySelector = (Combo) tableEditor.getEditor();
    final int selectionIndex = foreignKeySelector.getSelectionIndex();
    int startIndex = 1;
    NormalColumn foreignKeyColumn = null;
    final List<NormalColumn> foreignKeyList = mapperEditorToReferredColumnsMap.get(tableEditor);
    if (foreignKeyList != null) {
        if (selectionIndex <= foreignKeyList.size()) {
            foreignKeyColumn = foreignKeyList.get(selectionIndex - startIndex);
        } else {
            startIndex += foreignKeyList.size();
        }
    }
    if (foreignKeyColumn == null) {
        foreignKeyColumn = candidateForeignKeyColumns.get(selectionIndex - startIndex);
    }
    return foreignKeyColumn;
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:19,代碼來源:RelationshipByExistingColumnsDialog.java

示例6: checkSelectedKey

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void checkSelectedKey() {
    final int index = compoundUniqueKeyCombo.getSelectionIndex();
    CompoundUniqueKey complexUniqueKey = null;
    String name = null;
    if (index != -1) {
        complexUniqueKey = table.getCompoundUniqueKeyList().get(index);
        name = complexUniqueKey.getUniqueKeyName();
        setUpdateDeleteButtonStatus(true);
    } else {
        setUpdateDeleteButtonStatus(false);
    }
    uniqueKeyNameText.setText(Format.null2blank(name));
    for (final TableEditor tableEditor : tableEditorList) {
        final Button checkbox = (Button) tableEditor.getEditor();
        final NormalColumn column = editorColumnMap.get(tableEditor);
        if (complexUniqueKey != null && complexUniqueKey.getColumnList().contains(column)) {
            checkbox.setSelection(true);
        } else {
            checkbox.setSelection(false);
        }
    }
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:23,代碼來源:CompoundUniqueKeyTabWrapper.java

示例7: removeItems

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的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

示例8: checkSelectedKey

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void checkSelectedKey() {
    final int index = complexUniqueKeyCombo.getSelectionIndex();

    ComplexUniqueKey complexUniqueKey = null;
    String name = null;

    if (index != -1) {
        complexUniqueKey = copyData.getComplexUniqueKeyList().get(index);
        name = complexUniqueKey.getUniqueKeyName();

        setButtonStatus(true);

    } else {
        setButtonStatus(false);
    }

    nameText.setText(Format.null2blank(name));

    for (final TableEditor tableEditor : tableEditorList) {
        final Button checkbox = (Button) tableEditor.getEditor();

        final NormalColumn column = editorColumnMap.get(tableEditor);
        if (complexUniqueKey != null && complexUniqueKey.getColumnList().contains(column)) {
            checkbox.setSelection(true);
        } else {
            checkbox.setSelection(false);
        }
    }
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:30,代碼來源:ComplexUniqueKeyTabWrapper.java

示例9: disposeCheckBox

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void disposeCheckBox(final Column column) {
    final TableEditor oldEditor = columnCheckMap.get(column);

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

    columnCheckMap.remove(column);
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:13,代碼來源:IndexDialog.java

示例10: disposeCheckBox

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void disposeCheckBox(final Column column) {
    final TableEditor[] oldEditors = columnNotNullCheckMap.get(column);

    if (oldEditors != null) {
        for (final TableEditor oldEditor : oldEditors) {
            if (oldEditor.getEditor() != null) {
                oldEditor.getEditor().dispose();
                oldEditor.dispose();
            }
        }

        columnNotNullCheckMap.remove(column);
    }
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:15,代碼來源:ERTableComposite.java

示例11: checkSelectedKey

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void checkSelectedKey() {
	int index = complexUniqueKeyCombo.getSelectionIndex();

	ComplexUniqueKey complexUniqueKey = null;
	String name = null;

	if (index != -1) {
		complexUniqueKey = copyData.getComplexUniqueKeyList().get(index);
		name = complexUniqueKey.getUniqueKeyName();

		setButtonStatus(true);

	} else {
		setButtonStatus(false);
	}

	nameText.setText(Format.null2blank(name));

	for (TableEditor tableEditor : tableEditorList) {
		Button checkbox = (Button) tableEditor.getEditor();

		NormalColumn column = editorColumnMap.get(tableEditor);
		if (complexUniqueKey != null
				&& complexUniqueKey.getColumnList().contains(column)) {
			checkbox.setSelection(true);
		} else {
			checkbox.setSelection(false);
		}
	}
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:31,代碼來源:ComplexUniqueKeyTabWrapper.java

示例12: disposeCheckBox

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void disposeCheckBox(Column column) {
	TableEditor oldEditor = this.columnCheckMap.get(column);

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

	this.columnCheckMap.remove(column);
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:13,代碼來源:IndexDialog.java

示例13: disposeCheckBox

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void disposeCheckBox(Column column) {
	TableEditor[] oldEditors = this.columnNotNullCheckMap.get(column);

	if (oldEditors != null) {
		for (TableEditor oldEditor : oldEditors) {
			if (oldEditor.getEditor() != null) {
				oldEditor.getEditor().dispose();
				oldEditor.dispose();
			}
		}

		this.columnNotNullCheckMap.remove(column);
	}
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:15,代碼來源:ERTableComposite.java

示例14: disposeCheckBox

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void disposeCheckBox(ERColumn column) {
    final TableEditor[] oldEditors = columnNotNullCheckMap.get(column);

    if (oldEditors != null) {
        for (final TableEditor oldEditor : oldEditors) {
            if (oldEditor.getEditor() != null) {
                oldEditor.getEditor().dispose();
                oldEditor.dispose();
            }
        }

        columnNotNullCheckMap.remove(column);
    }
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:15,代碼來源:ERTableComposite.java

示例15: disposeCheckBox

import org.eclipse.swt.custom.TableEditor; //導入方法依賴的package包/類
private void disposeCheckBox(ERColumn column) {
    final TableEditor oldEditor = columnCheckMap.get(column);
    if (oldEditor != null) {
        if (oldEditor.getEditor() != null) {
            oldEditor.getEditor().dispose();
        }
        oldEditor.dispose();
    }
    columnCheckMap.remove(column);
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:11,代碼來源:IndexDialog.java


注:本文中的org.eclipse.swt.custom.TableEditor.getEditor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。