本文整理汇总了Java中org.insightech.er.editor.view.figure.table.TableFigure类的典型用法代码示例。如果您正苦于以下问题:Java TableFigure类的具体用法?Java TableFigure怎么用?Java TableFigure使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TableFigure类属于org.insightech.er.editor.view.figure.table包,在下文中一共展示了TableFigure类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRefreshVisuals
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
@Override
public void doRefreshVisuals() {
final TableFigure tableFigure = (TableFigure) getFigure();
final TableView tableView = (TableView) getModel();
tableFigure.create(tableView.getColor());
final ERDiagram diagram = getDiagram();
tableFigure.setName(getTableViewName(tableView, diagram));
UpdatedNodeElement updated = null;
if (diagram.getChangeTrackingList().isCalculated()) {
updated = diagram.getChangeTrackingList().getUpdatedNodeElement(tableView);
}
for (final Object child : getChildren()) {
final ColumnEditPart part = (ColumnEditPart) child;
part.refreshTableColumns(updated);
}
if (updated != null) {
showRemovedColumns(diagram, tableFigure, updated.getRemovedColumns(), true);
}
}
示例2: addColumnFigure
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
public static void addColumnFigure(final ERDiagram diagram, final TableFigure tableFigure, final NormalColumnFigure columnFigure, final NormalColumn normalColumn, final boolean isSelectedReferenced, final boolean isSelectedForeignKey, final boolean isAdded, final boolean isUpdated, final boolean isRemoved) {
final int notationLevel = diagram.getDiagramContents().getSettings().getNotationLevel();
final String type = diagram.filter(Format.formatType(normalColumn.getType(), normalColumn.getTypeData(), diagram.getDatabase(), true));
boolean displayKey = true;
if (notationLevel == Settings.NOTATION_LEVLE_COLUMN) {
displayKey = false;
}
boolean displayDetail = false;
if (notationLevel == Settings.NOTATION_LEVLE_KEY || notationLevel == Settings.NOTATION_LEVLE_EXCLUDE_TYPE || notationLevel == Settings.NOTATION_LEVLE_DETAIL) {
displayDetail = true;
}
boolean displayType = false;
if (notationLevel == Settings.NOTATION_LEVLE_DETAIL) {
displayType = true;
}
tableFigure.addColumn(columnFigure, diagram.getDiagramContents().getSettings().getViewMode(), diagram.filter(normalColumn.getPhysicalName()), diagram.filter(normalColumn.getLogicalName()), type, normalColumn.isPrimaryKey(), normalColumn.isForeignKey(), normalColumn.isNotNull(), normalColumn.isUniqueKey(), displayKey, displayDetail, displayType, isSelectedReferenced, isSelectedForeignKey, isAdded, isUpdated, isRemoved);
}
示例3: doRefreshVisuals
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
@Override
public void doRefreshVisuals() {
TableFigure tableFigure = (TableFigure) this.getFigure();
TableView tableView = (TableView) this.getModel();
tableFigure.create(tableView.getColor());
ERDiagram diagram = this.getDiagram();
tableFigure.setName(getTableViewName(tableView, diagram));
UpdatedNodeElement updated = null;
if (diagram.getChangeTrackingList().isCalculated()) {
updated = diagram.getChangeTrackingList().getUpdatedNodeElement(
tableView);
}
for (Object child : this.getChildren()) {
ColumnEditPart part = (ColumnEditPart) child;
part.refreshTableColumns(updated);
}
if (updated != null) {
showRemovedColumns(diagram, tableFigure,
updated.getRemovedColumns(), true);
}
}
示例4: init
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void init(final TableFigure tableFigure) {
tableFigure.setCornerDimensions(new Dimension(20, 20));
tableFigure.setForegroundColor(ColorConstants.black);
tableFigure.setBorder(null);
}
示例5: init
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void init(final TableFigure tableFigure) {
border = new ImageFrameBorder();
border.setFont(tableFigure.getFont());
tableFigure.setBorder(border);
}
示例6: createFigure
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected IFigure createFigure() {
final ERDiagram diagram = getDiagram();
final Settings settings = diagram.getDiagramContents().getSettings();
final TableFigure figure = new TableFigure(settings.getTableStyle());
this.changeFont(figure);
return figure;
}
示例7: refreshVisuals
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@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);
}
}
示例8: changeSettings
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void changeSettings(final Settings settings) {
final TableFigure figure = (TableFigure) getFigure();
figure.setTableStyle(settings.getTableStyle());
super.changeSettings(settings);
}
示例9: getContentPane
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public IFigure getContentPane() {
final TableFigure figure = (TableFigure) super.getContentPane();
return figure.getColumns();
}
示例10: refreshSettings
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void refreshSettings(final Settings settings) {
final TableFigure figure = (TableFigure) getFigure();
figure.setTableStyle(settings.getTableStyle());
super.refreshSettings(settings);
}
示例11: refreshTableColumns
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
@Override
public void refreshTableColumns(final UpdatedNodeElement updated) {
final ERDiagram diagram = getDiagram();
final GroupColumnFigure columnFigure = (GroupColumnFigure) getFigure();
final TableViewEditPart parent = (TableViewEditPart) getParent();
parent.getContentPane().add(figure);
final int notationLevel = diagram.getDiagramContents().getSettings().getNotationLevel();
final Column column = (Column) getModel();
if (notationLevel != Settings.NOTATION_LEVLE_TITLE) {
final TableFigure tableFigure = (TableFigure) parent.getFigure();
boolean isAdded = false;
boolean isUpdated = false;
if (updated != null) {
isAdded = updated.isAdded(column);
isUpdated = updated.isUpdated(column);
}
if ((notationLevel == Settings.NOTATION_LEVLE_KEY)) {
columnFigure.clearLabel();
return;
}
addGroupColumnFigure(diagram, tableFigure, columnFigure, column, isAdded, isUpdated, false);
if (selected) {
columnFigure.setBackgroundColor(ColorConstants.titleBackground);
columnFigure.setForegroundColor(ColorConstants.titleForeground);
}
} else {
columnFigure.clearLabel();
return;
}
}
示例12: init
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void init(TableFigure tableFigure) {
tableFigure.setCornerDimensions(new Dimension(20, 20));
tableFigure.setForegroundColor(ColorConstants.black);
tableFigure.setBorder(null);
}
示例13: init
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void init(TableFigure tableFigure) {
this.border = new ImageFrameBorder();
this.border.setFont(tableFigure.getFont());
tableFigure.setBorder(this.border);
}
示例14: createFigure
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected IFigure createFigure() {
ERDiagram diagram = this.getDiagram();
Settings settings = diagram.getDiagramContents().getSettings();
TableFigure figure = new TableFigure(settings.getTableStyle());
this.changeFont(figure);
return figure;
}
示例15: refreshVisuals
import org.insightech.er.editor.view.figure.table.TableFigure; //导入依赖的package包/类
/**
* {@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);
}
}