本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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);
}
示例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));
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
}
示例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));
}