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


Java Settings.VIEW_MODE_PHYSICAL属性代码示例

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


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

示例1: 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

示例2: 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

示例3: getColumnText

protected String getColumnText(final int viewMode, final String physicalName, final String logicalName, final String type, final boolean isNotNull, final boolean uniqueKey, final boolean detail, final boolean displayType) {
    final 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:roundrop,项目名称:ermasterr,代码行数:38,代码来源:AbstractStyleSupport.java

示例4: execute

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

    final ChangeOutlineViewModeCommand command = new ChangeOutlineViewModeCommand(diagram, Settings.VIEW_MODE_PHYSICAL);

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

示例5: execute

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

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

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

示例6: 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

示例7: refreshVisuals

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

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

        figure.create(null);

        final ERDiagram diagram = getDiagram();

        final 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()));
        }

        refreshTableColumns(figure);

        super.refreshVisuals();

    } catch (final Exception e) {
        ERDiagramActivator.showExceptionDialog(e);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:35,代码来源:RemovedERTableEditPart.java

示例8: 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

示例9: execute

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

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

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

示例10: execute

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

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

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

示例11: 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

示例12: 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

示例13: getViewMode

@Override
protected int getViewMode() {
    return Settings.VIEW_MODE_PHYSICAL;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:4,代码来源:ChangeViewToPhysicalAction.java

示例14: refreshOutlineVisuals

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

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

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

    String name = null;

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

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

        } else {
            name = "";
        }

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

        } else {
            name = "";
        }

        name += "/";

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

        }
    }

    setWidgetText(diagram.filter(name));

    setWidgetImage(ERDiagramActivator.getImage(ImageKey.WORD));
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:48,代码来源:WordOutlineEditPart.java

示例15: refreshOutlineVisuals

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

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

    String name = null;

    final 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();

        }
    }

    setWidgetText(diagram.filter(name));
    setWidgetImage(ERDiagramActivator.getImage(ImageKey.VIEW));
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:48,代码来源:ViewOutlineEditPart.java


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