本文整理汇总了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);
}
示例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);
}
示例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>();
}
示例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;
}
示例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>();
}
示例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;
}
示例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;
}
示例8: calculateEnabled
import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected boolean calculateEnabled() {
return CopyManager.canCopy();
}
示例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();
}
示例10: calculateEnabled
import org.insightech.er.editor.model.edit.CopyManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected boolean calculateEnabled() {
return CopyManager.canCopy();
}
示例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();
}