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


Java GraphicalViewer.getSelectedEditParts方法代码示例

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


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

示例1: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
@Override
protected boolean calculateEnabled() {
    final GraphicalViewer viewer = getGraphicalViewer();

    for (final Object object : viewer.getSelectedEditParts()) {
        if (object instanceof ConnectionEditPart) {
            return true;

        } else if (object instanceof NodeElementEditPart) {
            final NodeElementEditPart nodeElementEditPart = (NodeElementEditPart) object;

            if (!nodeElementEditPart.getSourceConnections().isEmpty()) {
                return true;
            }
        }
    }

    return false;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:DefaultLineAction.java

示例2: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected boolean calculateEnabled() {
    final GraphicalViewer viewer = getGraphicalViewer();

    for (final Object object : viewer.getSelectedEditParts()) {
        if (object instanceof ConnectionEditPart) {
            return true;

        } else if (object instanceof NodeElementEditPart) {
            final NodeElementEditPart nodeElementEditPart = (NodeElementEditPart) object;

            if (!nodeElementEditPart.getSourceConnections().isEmpty()) {
                return true;
            }
        }
    }

    return false;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:RightAngleLineAction.java

示例3: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected boolean calculateEnabled() {
    final GraphicalViewer viewer = getGraphicalViewer();

    for (final Object object : viewer.getSelectedEditParts()) {
        if (object instanceof NodeElementEditPart) {
            final NodeElementEditPart nodeElementEditPart = (NodeElementEditPart) object;

            if (nodeElementEditPart instanceof ERTableEditPart || nodeElementEditPart instanceof NoteEditPart) {
                return true;
            }
        }
    }

    return false;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:ResizeModelAction.java

示例4: execute

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
protected void execute(final Event event) {
    final GraphicalViewer viewer = getGraphicalViewer();

    final List<Command> commandList = new ArrayList<Command>();

    for (final Object object : viewer.getSelectedEditParts()) {
        final List<Command> subCommandList = getCommand((EditPart) object, event);
        commandList.addAll(subCommandList);
    }

    if (!commandList.isEmpty()) {
        final CompoundCommand compoundCommand = new CompoundCommand();
        for (final Command command : commandList) {
            compoundCommand.add(command);
        }

        this.execute(compoundCommand);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:AbstractBaseSelectionAction.java

示例5: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
@Override
protected boolean calculateEnabled() {
	GraphicalViewer viewer = this.getGraphicalViewer();

	for (Object object : viewer.getSelectedEditParts()) {
		if (object instanceof ConnectionEditPart) {
			return true;

		} else if (object instanceof NodeElementEditPart) {
			NodeElementEditPart nodeElementEditPart = (NodeElementEditPart) object;

			if (!nodeElementEditPart.getSourceConnections().isEmpty()) {
				return true;
			}
		}
	}

	return false;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:DefaultLineAction.java

示例6: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected boolean calculateEnabled() {
	GraphicalViewer viewer = this.getGraphicalViewer();

	for (Object object : viewer.getSelectedEditParts()) {
		if (object instanceof ConnectionEditPart) {
			return true;

		} else if (object instanceof NodeElementEditPart) {
			NodeElementEditPart nodeElementEditPart = (NodeElementEditPart) object;

			if (!nodeElementEditPart.getSourceConnections().isEmpty()) {
				return true;
			}
		}
	}

	return false;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:23,代码来源:RightAngleLineAction.java

示例7: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected boolean calculateEnabled() {
	GraphicalViewer viewer = this.getGraphicalViewer();

	for (Object object : viewer.getSelectedEditParts()) {
		if (object instanceof NodeElementEditPart) {
			NodeElementEditPart nodeElementEditPart = (NodeElementEditPart) object;

			if (nodeElementEditPart instanceof ERTableEditPart
					|| nodeElementEditPart instanceof NoteEditPart) {
				return true;
			}
		}
	}

	return false;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:ResizeModelAction.java

示例8: execute

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
protected void execute(Event event) {
	GraphicalViewer viewer = this.getGraphicalViewer();

	List<Command> commandList = new ArrayList<Command>();

	for (Object object : viewer.getSelectedEditParts()) {
		List<Command> subCommandList = this.getCommand((EditPart) object,
				event);
		commandList.addAll(subCommandList);
	}

	if (!commandList.isEmpty()) {
		CompoundCommand compoundCommand = new CompoundCommand();
		for (Command command : commandList) {
			compoundCommand.add(command);
		}

		this.execute(compoundCommand);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:AbstractBaseSelectionAction.java

示例9: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
@Override
protected boolean calculateEnabled() {
    final GraphicalViewer viewer = getGraphicalViewer();

    for (final Object object : viewer.getSelectedEditParts()) {
        if (object instanceof ConnectionEditPart) {
            return true;

        } else if (object instanceof DiagramWalkerEditPart) {
            final DiagramWalkerEditPart nodeElementEditPart = (DiagramWalkerEditPart) object;

            if (!nodeElementEditPart.getSourceConnections().isEmpty()) {
                return true;
            }
        }
    }

    return false;
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:20,代码来源:DefaultLineAction.java

示例10: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
@Override
protected boolean calculateEnabled() {
    final GraphicalViewer viewer = getGraphicalViewer();

    for (final Object object : viewer.getSelectedEditParts()) {
        if (object instanceof DiagramWalkerEditPart) {
            final DiagramWalkerEditPart nodeElementEditPart = (DiagramWalkerEditPart) object;

            if (nodeElementEditPart instanceof ERTableEditPart || nodeElementEditPart instanceof WalkerNoteEditPart) {
                return true;
            }
        }
    }

    return false;
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:17,代码来源:ResizeModelAction.java

示例11: execute

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
protected void execute(Event event) {
    final GraphicalViewer viewer = getGraphicalViewer();

    final List<Command> commandList = new ArrayList<>();

    for (final Object object : viewer.getSelectedEditParts()) {
        final List<Command> subCommandList = getCommand((EditPart) object, event);
        commandList.addAll(subCommandList);
    }

    if (!commandList.isEmpty()) {
        final CompoundCommand compoundCommand = new CompoundCommand();
        for (final Command command : commandList) {
            compoundCommand.add(command);
        }

        execute(compoundCommand);
    }
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:20,代码来源:AbstractBaseSelectionAction.java

示例12: calculateEnabled

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
@Override
protected boolean calculateEnabled() {
    final GraphicalViewer viewer = getGraphicalViewer();
    for (final Object object : viewer.getSelectedEditParts()) {
        if (object instanceof ConnectionEditPart) {
            return true;
        } else if (object instanceof DiagramWalkerEditPart) {
            final DiagramWalkerEditPart nodeElementEditPart = (DiagramWalkerEditPart) object;
            if (!nodeElementEditPart.getSourceConnections().isEmpty()) {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:16,代码来源:RightAngleLineAction.java


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