use of org.jkiss.dbeaver.erd.ui.figures.EntityFigure in project dbeaver by serge-rider.
the class EntityPart method createFigure.
// ******************* Layout related methods *********************/
/**
* Creates a figure which represents the table
*/
@Override
protected EntityFigure createFigure() {
final EntityDiagram diagram = getDiagram();
final EntityFigure figure = createFigureImpl();
EntityDiagram.NodeVisualInfo visualInfo = diagram.getVisualInfo(getEntity().getObject());
if (visualInfo != null) {
if (visualInfo.initBounds != null) {
figure.setLocation(visualInfo.initBounds.getLocation());
}
if (visualInfo.bgColor != null) {
figure.setBackgroundColor(visualInfo.bgColor);
}
if (getEntity().getAttributeVisibility() == null && visualInfo.attributeVisibility != null) {
getEntity().setAttributeVisibility(visualInfo.attributeVisibility);
}
}
return figure;
}
use of org.jkiss.dbeaver.erd.ui.figures.EntityFigure in project dbeaver by serge-rider.
the class EntityPart method performDirectEdit.
protected void performDirectEdit() {
if (manager == null) {
ERDGraphicalViewer viewer = getViewer();
ValidationMessageHandler handler = viewer.getValidationHandler();
EntityFigure figure = getFigure();
EditableLabel nameLabel = figure.getNameLabel();
manager = new ExtendedDirectEditManager(this, TextCellEditor.class, new LabelCellEditorLocator(nameLabel), nameLabel, new TableNameCellEditorValidator(handler));
}
manager.show();
}
use of org.jkiss.dbeaver.erd.ui.figures.EntityFigure in project dbeaver by serge-rider.
the class EntityPart method refreshVisuals.
/**
* Reset the layout constraint, and revalidate the content pane
*/
@Override
protected void refreshVisuals() {
EntityFigure entityFigure = getFigure();
Point location = entityFigure.getLocation();
Rectangle constraint = new Rectangle(location.x, location.y, -1, -1);
getDiagramPart().setLayoutConstraint(this, entityFigure, constraint);
}
Aggregations