Search in sources :

Example 6 with EditableLabel

use of org.jkiss.dbeaver.ext.erd.figures.EditableLabel 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();
}
Also used : EditableLabel(org.jkiss.dbeaver.ext.erd.figures.EditableLabel) EntityFigure(org.jkiss.dbeaver.ext.erd.figures.EntityFigure)

Example 7 with EditableLabel

use of org.jkiss.dbeaver.ext.erd.figures.EditableLabel 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();
}
Also used : EditableLabel(org.jkiss.dbeaver.ext.erd.figures.EditableLabel) EntityFigure(org.jkiss.dbeaver.ext.erd.figures.EntityFigure) ExtendedDirectEditManager(org.jkiss.dbeaver.ext.erd.directedit.ExtendedDirectEditManager) LabelCellEditorLocator(org.jkiss.dbeaver.ext.erd.directedit.LabelCellEditorLocator) ValidationMessageHandler(org.jkiss.dbeaver.ext.erd.directedit.ValidationMessageHandler) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor) TableNameCellEditorValidator(org.jkiss.dbeaver.ext.erd.directedit.TableNameCellEditorValidator) ERDGraphicalViewer(org.jkiss.dbeaver.ext.erd.editor.ERDGraphicalViewer)

Aggregations

EditableLabel (org.jkiss.dbeaver.ext.erd.figures.EditableLabel)7 EntityFigure (org.jkiss.dbeaver.ext.erd.figures.EntityFigure)5 TextCellEditor (org.eclipse.jface.viewers.TextCellEditor)1 ExtendedDirectEditManager (org.jkiss.dbeaver.ext.erd.directedit.ExtendedDirectEditManager)1 LabelCellEditorLocator (org.jkiss.dbeaver.ext.erd.directedit.LabelCellEditorLocator)1 TableNameCellEditorValidator (org.jkiss.dbeaver.ext.erd.directedit.TableNameCellEditorValidator)1 ValidationMessageHandler (org.jkiss.dbeaver.ext.erd.directedit.ValidationMessageHandler)1 ERDGraphicalViewer (org.jkiss.dbeaver.ext.erd.editor.ERDGraphicalViewer)1 ERDEntity (org.jkiss.dbeaver.ext.erd.model.ERDEntity)1