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


Java CopyManager类代码示例

本文整理汇总了Java中org.insightech.er.editor.model.edit.CopyManager的典型用法代码示例。如果您正苦于以下问题:Java CopyManager类的具体用法?Java CopyManager怎么用?Java CopyManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CopyManager类属于org.insightech.er.editor.model.edit包,在下文中一共展示了CopyManager类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copy

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
private void copy() {
    if (!calculateEnabled()) {
        return;
    }

    CopyManager.clear();

    final NodeSet nodeElementList = new NodeSet();

    for (final Object object : getSelectedObjects()) {
        if (object instanceof NodeElementEditPart) {
            final NodeElementEditPart editPart = (NodeElementEditPart) object;

            final NodeElement nodeElement = (NodeElement) editPart.getModel();
            nodeElementList.addNodeElement(nodeElement);
        }
    }

    CopyManager.copy(nodeElementList);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:CopyAction.java

示例2: copy

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
private void copy() {
	if (!calculateEnabled()) {
		return;
	}

	CopyManager.clear();

	NodeSet nodeElementList = new NodeSet();

	for (Object object : this.getSelectedObjects()) {
		if (object instanceof NodeElementEditPart) {
			NodeElementEditPart editPart = (NodeElementEditPart) object;

			NodeElement nodeElement = (NodeElement) editPart.getModel();
			nodeElementList.addNodeElement(nodeElement);
		}
	}

	CopyManager.copy(nodeElementList);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:CopyAction.java

示例3: EditAllAttributesDialog

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
public EditAllAttributesDialog(final Shell parentShell, final ERDiagram diagram) {
    super(parentShell);
    this.diagram = diagram;

    final CopyManager copyManager = new CopyManager(null);

    copyContents = copyManager.copy(this.diagram.getDiagramContents());
    columnList = new ArrayList<Column>();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:10,代码来源:EditAllAttributesDialog.java

示例4: createCommand

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
private Command createCommand() {

        if (!calculateEnabled()) {
            return null;
        }

        final EditPart editPart = editor.getGraphicalViewer().getContents();
        final ERDiagram diagram = (ERDiagram) editPart.getModel();

        final NodeSet pasteList = CopyManager.paste(diagram);

        final int numberOfCopy = CopyManager.getNumberOfCopy();

        boolean first = true;
        int x = 0;
        int y = 0;

        for (final NodeElement nodeElement : pasteList) {
            if (first || x > nodeElement.getX()) {
                x = nodeElement.getX();
            }
            if (first || y > nodeElement.getY()) {
                y = nodeElement.getY();
            }

            first = false;
        }

        final Command command = new PasteCommand(editor, pasteList, diagram.mousePoint.x - x + (numberOfCopy - 1) * 20, diagram.mousePoint.y - y + (numberOfCopy - 1) * 20);

        return command;
    }
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:33,代码来源:PasteAction.java

示例5: EditAllAttributesDialog

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
public EditAllAttributesDialog(Shell parentShell, ERDiagram diagram) {
	super(parentShell);
	this.diagram = diagram;

	CopyManager copyManager = new CopyManager(null);

	this.copyContents = copyManager.copy(this.diagram.getDiagramContents());
	this.columnList = new ArrayList<Column>();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:10,代码来源:EditAllAttributesDialog.java

示例6: createCommand

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
private Command createCommand() {

		if (!calculateEnabled()) {
			return null;
		}

		EditPart editPart = this.editor.getGraphicalViewer().getContents();
		ERDiagram diagram = (ERDiagram) editPart.getModel();

		NodeSet pasteList = CopyManager.paste(diagram);

		int numberOfCopy = CopyManager.getNumberOfCopy();

		boolean first = true;
		int x = 0;
		int y = 0;

		Category category = diagram.getCurrentCategory();
		for (NodeElement nodeElement : pasteList) {
			if (first || x > nodeElement.getX(category)) {
				x = nodeElement.getX(category);
			}
			if (first || y > nodeElement.getY(category)) {
				y = nodeElement.getY(category);
			}

			first = false;
		}


		Command command = new PasteCommand(editor, pasteList,
				diagram.mousePoint.x - x + (numberOfCopy - 1) * 20,
				diagram.mousePoint.y - y + (numberOfCopy - 1) * 20);

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

示例7: createCommand

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
private Command createCommand() {

		if (!calculateEnabled()) {
			return null;
		}

		EditPart editPart = this.editor.getGraphicalViewer().getContents();
		ERDiagram diagram = (ERDiagram) editPart.getModel();

		NodeSet pasteList = CopyManager.paste(diagram);

		int numberOfCopy = CopyManager.getNumberOfCopy();

		boolean first = true;
		int x = 0;
		int y = 0;

		for (NodeElement nodeElement : pasteList) {
			if (first || x > nodeElement.getX()) {
				x = nodeElement.getX();
			}
			if (first || y > nodeElement.getY()) {
				y = nodeElement.getY();
			}

			first = false;
		}


		Command command = new PasteCommand(editor, pasteList,
				diagram.mousePoint.x - x + (numberOfCopy - 1) * 20,
				diagram.mousePoint.y - y + (numberOfCopy - 1) * 20);

		return command;
	}
 
开发者ID:justinkwony,项目名称:ermaster-nhit,代码行数:36,代码来源:PasteAction.java

示例8: calculateEnabled

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected boolean calculateEnabled() {
    return CopyManager.canCopy();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:8,代码来源:PasteAction.java

示例9: ChangeTracking

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
public ChangeTracking(final DiagramContents diagramContents) {
    final CopyManager copyManager = new CopyManager(null);

    this.diagramContents = copyManager.copy(diagramContents);
    updatedDate = new Date();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:7,代码来源:ChangeTracking.java

示例10: calculateEnabled

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected boolean calculateEnabled() {
	return CopyManager.canCopy();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:PasteAction.java

示例11: ChangeTracking

import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
public ChangeTracking(DiagramContents diagramContents) {
	CopyManager copyManager = new CopyManager(null);

	this.diagramContents = copyManager.copy(diagramContents);
	this.updatedDate = new Date();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:7,代码来源:ChangeTracking.java


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