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


Java Settings.VIEW_MODE_LOGICAL属性代码示例

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


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

示例1: getModelChildren

/**
 * {@inheritDoc}
 */
@Override
protected List getModelChildren() {
    final Dictionary dictionary = (Dictionary) getModel();
    final List<Word> list = dictionary.getWordList();

    if (getDiagram().getDiagramContents().getSettings().getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
        Collections.sort(list, Word.LOGICAL_NAME_COMPARATOR);

    } else {
        Collections.sort(list, Word.PHYSICAL_NAME_COMPARATOR);

    }

    return list;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:18,代码来源:DictionaryOutlineEditPart.java

示例2: getModelChildren

/**
 * {@inheritDoc}
 */
@Override
protected List getModelChildren() {
    final ViewSet viewSet = (ViewSet) getModel();

    final List<View> list = viewSet.getList();

    if (getDiagram().getDiagramContents().getSettings().getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
        Collections.sort(list, TableView.LOGICAL_NAME_COMPARATOR);

    } else {
        Collections.sort(list, TableView.PHYSICAL_NAME_COMPARATOR);

    }

    return list;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:ViewSetOutlineEditPart.java

示例3: getModelChildren

/**
 * {@inheritDoc}
 */
@Override
protected List getModelChildren() {
	TableSet tableSet = (TableSet) this.getModel();

	List<ERTable> list = new ArrayList<ERTable>();

	Category category = this.getCurrentCategory();
	for (ERTable table : tableSet) {
		if (category == null || category.contains(table)) {
			list.add(table);
		}
	}

	if (this.getDiagram().getDiagramContents().getSettings()
			.getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
		Collections.sort(list, TableView.LOGICAL_NAME_COMPARATOR);

	} else {
		Collections.sort(list, TableView.PHYSICAL_NAME_COMPARATOR);

	}

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

示例4: getModelChildren

/**
 * {@inheritDoc}
 */
@Override
protected List getModelChildren() {
    final TableSet tableSet = (TableSet) getModel();

    final List<ERTable> list = new ArrayList<ERTable>();

    final Category category = getCurrentCategory();
    for (final ERTable table : tableSet) {
        if (category == null || category.contains(table)) {
            list.add(table);
        }
    }

    if (getDiagram().getDiagramContents().getSettings().getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
        Collections.sort(list, TableView.LOGICAL_NAME_COMPARATOR);

    } else {
        Collections.sort(list, TableView.PHYSICAL_NAME_COMPARATOR);

    }

    return list;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:26,代码来源:TableSetOutlineEditPart.java

示例5: getTableViewName

public static String getTableViewName(final TableView tableView, final ERDiagram diagram) {
    String name = null;

    final int viewMode = diagram.getDiagramContents().getSettings().getViewMode();

    if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
        name = diagram.filter(tableView.getPhysicalName());

    } else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
        name = diagram.filter(tableView.getLogicalName());

    } else {
        name = diagram.filter(tableView.getLogicalName()) + "/" + diagram.filter(tableView.getPhysicalName());
    }

    return name;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:17,代码来源:TableViewEditPart.java

示例6: getTableViewName

public static String getTableViewName(TableView tableView, ERDiagram diagram) {
	String name = null;

	int viewMode = diagram.getDiagramContents().getSettings().getViewMode();

	if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
		name = diagram.filter(tableView.getPhysicalName());

	} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
		name = diagram.filter(tableView.getLogicalName());

	} else {
		name = diagram.filter(tableView.getLogicalName()) + "/"
				+ diagram.filter(tableView.getPhysicalName());
	}

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

示例7: getModelChildren

/**
 * {@inheritDoc}
 */
@Override
protected List getModelChildren() {
	ViewSet viewSet = (ViewSet) this.getModel();

	List<View> list = viewSet.getList();

	if (this.getDiagram().getDiagramContents().getSettings()
			.getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
		Collections.sort(list, TableView.LOGICAL_NAME_COMPARATOR);

	} else {
		Collections.sort(list, TableView.PHYSICAL_NAME_COMPARATOR);

	}

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

示例8: refreshOutlineVisuals

/**
 * {@inheritDoc}
 */
@Override
protected void refreshOutlineVisuals() {
	Relation model = (Relation) this.getModel();

	ERDiagram diagram = (ERDiagram) this.getRoot().getContents().getModel();

	int viewMode = diagram.getDiagramContents().getSettings()
			.getOutlineViewMode();

	boolean first = true;
	StringBuilder sb = new StringBuilder();

	for (NormalColumn foreignKeyColumn : model.getForeignKeyColumns()) {
		if (first) {
			first = false;
		} else {
			sb.append(", ");
		}

		if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
			sb.append(Format.null2blank(foreignKeyColumn.getPhysicalName()));

		} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
			sb.append(Format.null2blank(foreignKeyColumn.getLogicalName()));

		} else {
			sb.append(Format.null2blank(foreignKeyColumn.getLogicalName()));
			sb.append("/");
			sb.append(Format.null2blank(foreignKeyColumn.getPhysicalName()));
		}
	}

	this.setWidgetText(sb.toString());
	this.setWidgetImage(ERDiagramActivator.getImage(ImageKey.FOREIGN_KEY));
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:38,代码来源:RelationOutlineEditPart.java

示例9: execute

/**
 * {@inheritDoc}
 */
@Override
public void execute(final Event event) {
    final ERDiagram diagram = getDiagram();

    final ChangeOutlineViewOrderByCommand command = new ChangeOutlineViewOrderByCommand(diagram, Settings.VIEW_MODE_LOGICAL);

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

示例10: refreshOutlineVisuals

/**
 * {@inheritDoc}
 */
@Override
protected void refreshOutlineVisuals() {
    final Relation model = (Relation) getModel();

    final ERDiagram diagram = (ERDiagram) getRoot().getContents().getModel();

    final int viewMode = diagram.getDiagramContents().getSettings().getOutlineViewMode();

    boolean first = true;
    final StringBuilder sb = new StringBuilder();

    for (final NormalColumn foreignKeyColumn : model.getForeignKeyColumns()) {
        if (first) {
            first = false;
        } else {
            sb.append(", ");
        }

        if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
            sb.append(Format.null2blank(foreignKeyColumn.getPhysicalName()));

        } else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
            sb.append(Format.null2blank(foreignKeyColumn.getLogicalName()));

        } else {
            sb.append(Format.null2blank(foreignKeyColumn.getLogicalName()));
            sb.append("/");
            sb.append(Format.null2blank(foreignKeyColumn.getPhysicalName()));
        }
    }

    setWidgetText(sb.toString());
    setWidgetImage(ERDiagramActivator.getImage(ImageKey.FOREIGN_KEY));
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:37,代码来源:RelationOutlineEditPart.java

示例11: getColumnText

protected String getColumnText(int viewMode, String physicalName,
		String logicalName, String type, boolean isNotNull,
		boolean uniqueKey, boolean detail, boolean displayType) {
	StringBuilder text = new StringBuilder();

	String name = null;
	if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
		name = physicalName;

	} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
		name = logicalName;

	} else {
		name = logicalName + "/" + physicalName;
	}

	if (name != null) {
		text.append(name);
	}

	if (displayType) {
		text.append(" ");

		text.append(type);
	}

	if (detail) {
		if (isNotNull && uniqueKey) {
			text.append(" (UNN)");

		} else if (isNotNull) {
			text.append(" (NN)");

		} else if (uniqueKey) {
			text.append(" (U)");
		}
	}

	return text.toString();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:40,代码来源:AbstractStyleSupport.java

示例12: execute

/**
 * {@inheritDoc}
 */
@Override
public void execute(Event event) {
	ERDiagram diagram = this.getDiagram();

	ChangeOutlineViewModeCommand command = new ChangeOutlineViewModeCommand(
			diagram, Settings.VIEW_MODE_LOGICAL);

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

示例13: execute

/**
 * {@inheritDoc}
 */
@Override
public void execute(Event event) {
	ERDiagram diagram = this.getDiagram();

	ChangeOutlineViewOrderByCommand command = new ChangeOutlineViewOrderByCommand(
			diagram, Settings.VIEW_MODE_LOGICAL);

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

示例14: refreshVisuals

/**
 * {@inheritDoc}
 */
@Override
public void refreshVisuals() {
	try {
		TableFigure figure = (TableFigure) this.getFigure();

		RemovedERTable removedERTable = (RemovedERTable) this.getModel();
		ERTable table = (ERTable) removedERTable.getNodeElement();

		figure.create(null);

		ERDiagram diagram = this.getDiagram();

		int viewMode = diagram.getDiagramContents().getSettings()
				.getViewMode();

		if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
			figure.setName(diagram.filter(table.getPhysicalName()));

		} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
			figure.setName(diagram.filter(table.getLogicalName()));

		} else {
			figure.setName(diagram.filter(table.getLogicalName()) + "/"
					+ diagram.filter(table.getPhysicalName()));
		}

		this.refreshTableColumns(figure);

		super.refreshVisuals();

	} catch (Exception e) {
		ERDiagramActivator.showExceptionDialog(e);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:37,代码来源:RemovedERTableEditPart.java

示例15: refreshOutlineVisuals

/**
 * {@inheritDoc}
 */
@Override
protected void refreshOutlineVisuals() {
	View model = (View) this.getModel();

	ERDiagram diagram = (ERDiagram) this.getRoot().getContents().getModel();

	String name = null;

	int viewMode = diagram.getDiagramContents().getSettings()
			.getOutlineViewMode();

	if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
		if (model.getPhysicalName() != null) {
			name = model.getPhysicalName();

		} else {
			name = "";
		}

	} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
		if (model.getLogicalName() != null) {
			name = model.getLogicalName();

		} else {
			name = "";
		}

	} else {
		if (model.getLogicalName() != null) {
			name = model.getLogicalName();

		} else {
			name = "";
		}

		name += "/";

		if (model.getPhysicalName() != null) {
			name += model.getPhysicalName();

		}
	}

	this.setWidgetText(diagram.filter(name));
	this.setWidgetImage(ERDiagramActivator.getImage(ImageKey.VIEW));
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:49,代码来源:ViewOutlineEditPart.java


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