use of org.jkiss.dbeaver.erd.ui.figures.EditableLabel in project dbeaver by dbeaver.
the class AttributePart method handleNameChange.
public void handleNameChange(String textValue) {
EditableLabel label = getFigure().getLabel();
label.setVisible(false);
setSelected(EditPart.SELECTED_NONE);
label.revalidate();
}
use of org.jkiss.dbeaver.erd.ui.figures.EditableLabel in project dbeaver by dbeaver.
the class AttributePart method setSelected.
/**
* Sets the width of the line when selected
*/
@Override
public void setSelected(int value) {
super.setSelected(value);
EditableLabel columnLabel = getFigure().getLabel();
if (value != EditPart.SELECTED_NONE)
columnLabel.setSelected(true);
else
columnLabel.setSelected(false);
columnLabel.repaint();
}
use of org.jkiss.dbeaver.erd.ui.figures.EditableLabel in project dbeaver by dbeaver.
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(getEntity().getObject().getName());
label.setVisible(true);
refreshVisuals();
entityFigure.refreshColors();
}
use of org.jkiss.dbeaver.erd.ui.figures.EditableLabel 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);
}
use of org.jkiss.dbeaver.erd.ui.figures.EditableLabel 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 = getEntity();
label.setText(entity.getObject().getName());
label.setVisible(true);
refreshVisuals();
}
Aggregations