use of org.jkiss.dbeaver.ext.erd.figures.EntityFigure in project dbeaver by dbeaver.
the class EntityPart method revertNameChange.
/**
* Reverts to existing name in model when exiting from a direct edit
* (possibly before a commit which will result in a change in the label
* value)
*/
public void revertNameChange() {
EntityFigure entityFigure = getFigure();
EditableLabel label = entityFigure.getNameLabel();
ERDEntity entity = getTable();
label.setText(entity.getObject().getName());
label.setVisible(true);
refreshVisuals();
}
use of org.jkiss.dbeaver.ext.erd.figures.EntityFigure in project dbeaver by dbeaver.
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.ext.erd.figures.EntityFigure in project dbeaver by dbeaver.
the class EntityPart method directEditHitTest.
private boolean directEditHitTest(Point requestLoc) {
EntityFigure figure = getFigure();
EditableLabel nameLabel = figure.getNameLabel();
nameLabel.translateToRelative(requestLoc);
return nameLabel.containsPoint(requestLoc);
}
Aggregations