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


Java Settings.clone方法代码示例

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


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

示例1: doExecute

import org.insightech.er.editor.model.settings.Settings; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void doExecute() {
	// ERDiagramEditPart.setUpdateable(false);
	
	Settings settings = ((TableView) source.getModel()).getDiagram().getDiagramContents().getSettings();
	this.oldSettings = settings.clone();

	this.relation.setSource((TableView) source.getModel());

	for (Category category : settings.getCategorySetting().getAllCategories()) {
		this.relation.removeCategory(category);
		this.relation.addCategory(category);
	}

	// ERDiagramEditPart.setUpdateable(true);

	this.relation.setTargetTableView((TableView) target.getModel(),
			this.foreignKeyColumnList);

	this.getTargetModel().refresh();
	this.getSourceModel().refreshSourceConnections();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:26,代码来源:CreateRelationCommand.java

示例2: doExecute

import org.insightech.er.editor.model.settings.Settings; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void doExecute() {
	
	Settings settings = diagram.getDiagramContents().getSettings();
	this.oldSettings = settings.clone();
	
	this.connection.setSource(this.getSourceModel());
	this.connection.setTarget(this.getTargetModel());

	for (Category category : settings.getCategorySetting().getAllCategories()) {
		connection.removeCategory(category);
		connection.addCategory(category);
	}

	this.getTargetModel().refreshTargetConnections();
	this.getSourceModel().refreshSourceConnections();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:CreateConnectionCommand.java

示例3: doExecute

import org.insightech.er.editor.model.settings.Settings; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void doExecute() {
	// ERDiagramEditPart.setUpdateable(false);

	this.init();

	Settings settings = diagram.getDiagramContents().getSettings();
	this.oldSettings = settings.clone();

	this.diagram.addNewContent(this.relatedTable);
	this.addToCategory(this.relatedTable);

	this.relation1.setSource((ERTable) this.source.getModel());
	this.relation1.setTargetTableView(this.relatedTable);

	this.relation2.setSource((ERTable) this.target.getModel());
	this.relation2.setTargetTableView(this.relatedTable);

	for (Category category : settings.getCategorySetting().getAllCategories()) {
		this.relation1.removeCategory(category);
		this.relation1.addCategory(category);
		this.relation2.removeCategory(category);
		this.relation2.addCategory(category);
	}

	this.diagram.refreshChildren();
	this.getTargetModel().refresh();
	this.getSourceModel().refresh();

	if (this.category != null) {
		this.category.refresh();
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:37,代码来源:CreateRelatedTableCommand.java

示例4: doExecute

import org.insightech.er.editor.model.settings.Settings; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void doExecute() {
	ERTable sourceTable = (ERTable) this.source.getModel();
	TableView targetTable = (TableView) this.target.getModel();
	
	Settings settings = sourceTable.getDiagram().getDiagramContents().getSettings();
	this.oldSettings = settings.clone();

	this.relation.setSource(sourceTable);
	this.relation.setTargetWithoutForeignKey(targetTable);

	for (Category category : settings.getCategorySetting().getAllCategories()) {
		this.relation.removeCategory(category);
		this.relation.addCategory(category);
	}

	for (int i = 0; i < foreignKeyColumnList.size(); i++) {
		NormalColumn foreignKeyColumn = foreignKeyColumnList.get(i);

		this.wordList.add(foreignKeyColumn.getWord());

		sourceTable.getDiagram().getDiagramContents().getDictionary()
				.remove(foreignKeyColumn);

		foreignKeyColumn.addReference(referencedColumnList.get(i),
				this.relation);
		foreignKeyColumn.setWord(null);

		foreignKeyColumn.setNotNull(this.notNull);
	}

	this.relation.getSource().refreshSourceConnections();
	this.relation.getTarget().refresh();

	// targetTable.setDirty();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:40,代码来源:CreateRelationByExistingColumnsCommand.java

示例5: doExecute

import org.insightech.er.editor.model.settings.Settings; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void doExecute() {
	// ERDiagramEditPart.setUpdateable(false);

	boolean anotherSelfRelation = false;

	ERTable sourceTable = (ERTable) this.source.getModel();
	this.diagram = sourceTable.getDiagram();
	this.targetCategory = diagram.getCurrentCategory();

	for (Relation otherRelation : sourceTable.getOutgoingRelations()) {
		if (otherRelation.getSource() == otherRelation.getTarget()) {
			anotherSelfRelation = true;
			break;
		}
	}

	int rate = 0;

	if (anotherSelfRelation) {
		rate = 50;

	} else {
		rate = 100;
	}

	Bendpoint bendpoint0 = new Bendpoint(rate, rate);
	bendpoint0.setRelative(true);

	int xp = 100 - (rate / 2);
	int yp = 100 - (rate / 2);

	relation.setSourceLocationp(targetCategory, 100, yp);
	relation.setTargetLocationp(targetCategory, xp, 100);

	relation.addBendpoint(targetCategory, 0, bendpoint0);

	relation.setSource((ERTable) sourceTable);

	// ERDiagramEditPart.setUpdateable(true);

	relation.setTargetTableView((ERTable) this.target.getModel());

	// sourceTable.setDirty();

	Settings settings = this.diagram.getDiagramContents().getSettings();
	this.oldSettings = settings.clone();

	for (Category category : settings.getCategorySetting().getAllCategories()) {
		this.relation.removeCategory(category);
		this.relation.addCategory(category);
	}

	this.getTargetModel().refresh();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:59,代码来源:CreateSelfRelationCommand.java


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