use of org.jkiss.dbeaver.ext.erd.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();
DiagramPart parent = (DiagramPart) getParent();
Rectangle constraint = new Rectangle(location.x, location.y, -1, -1);
parent.setLayoutConstraint(this, entityFigure, constraint);
}
use of org.jkiss.dbeaver.ext.erd.figures.EntityFigure in project dbeaver by serge-rider.
the class EntityPart method commitNameChange.
//******************* Listener related methods *********************/
/**
* Handles change in name when committing a direct edit
*/
@Override
protected void commitNameChange(PropertyChangeEvent evt) {
EntityFigure entityFigure = getFigure();
EditableLabel label = entityFigure.getNameLabel();
label.setText(getTable().getObject().getName());
label.setVisible(true);
refreshVisuals();
}
use of org.jkiss.dbeaver.ext.erd.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.ext.erd.figures.EntityFigure in project dbeaver by serge-rider.
the class EntityPart method setSelected.
/**
* Sets the width of the line when selected
*/
@Override
public void setSelected(int value) {
super.setSelected(value);
EntityFigure entityFigure = getFigure();
if (value != EditPart.SELECTED_NONE)
entityFigure.setSelected(true);
else
entityFigure.setSelected(false);
entityFigure.repaint();
}
Aggregations