Search in sources :

Example 11 with NoteFigure

use of org.jkiss.dbeaver.erd.ui.figures.NoteFigure in project dbeaver by dbeaver.

the class NotePart method refreshVisuals.

/**
 * Reset the layout constraint, and revalidate the content pane
 */
@Override
protected void refreshVisuals() {
    NoteFigure notefigure = (NoteFigure) getFigure();
    Point location = notefigure.getLocation();
    DiagramPart parent = (DiagramPart) getParent();
    Rectangle constraint = new Rectangle(location.x, location.y, -1, -1);
    parent.setLayoutConstraint(this, notefigure, constraint);
}
Also used : NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure) Rectangle(org.eclipse.draw2d.geometry.Rectangle) Point(org.eclipse.draw2d.geometry.Point)

Example 12 with NoteFigure

use of org.jkiss.dbeaver.erd.ui.figures.NoteFigure in project dbeaver by serge-rider.

the class NotePart method handleNameChange.

public void handleNameChange(String value) {
    NoteFigure noteFigure = (NoteFigure) getFigure();
    noteFigure.setVisible(false);
    refreshVisuals();
}
Also used : NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure)

Example 13 with NoteFigure

use of org.jkiss.dbeaver.erd.ui.figures.NoteFigure in project dbeaver by serge-rider.

the class NotePart method commitNameChange.

/**
 * Handles change in name when committing a direct edit
 */
@Override
protected void commitNameChange(PropertyChangeEvent evt) {
    NoteFigure noteFigure = (NoteFigure) getFigure();
    noteFigure.setText(getNote().getObject());
    noteFigure.setVisible(true);
    refreshVisuals();
}
Also used : NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure)

Example 14 with NoteFigure

use of org.jkiss.dbeaver.erd.ui.figures.NoteFigure in project dbeaver by serge-rider.

the class NotePart method refreshVisuals.

/**
 * Reset the layout constraint, and revalidate the content pane
 */
@Override
protected void refreshVisuals() {
    NoteFigure notefigure = (NoteFigure) getFigure();
    Point location = notefigure.getLocation();
    DiagramPart parent = (DiagramPart) getParent();
    Rectangle constraint = new Rectangle(location.x, location.y, -1, -1);
    parent.setLayoutConstraint(this, notefigure, constraint);
}
Also used : NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure) Rectangle(org.eclipse.draw2d.geometry.Rectangle) Point(org.eclipse.draw2d.geometry.Point)

Aggregations

NoteFigure (org.jkiss.dbeaver.erd.ui.figures.NoteFigure)14 Rectangle (org.eclipse.draw2d.geometry.Rectangle)6 Dimension (org.eclipse.draw2d.geometry.Dimension)4 Point (org.eclipse.draw2d.geometry.Point)4 EntityDiagram (org.jkiss.dbeaver.erd.ui.model.EntityDiagram)4 PropertyChangeEvent (java.beans.PropertyChangeEvent)2 ChopboxAnchor (org.eclipse.draw2d.ChopboxAnchor)2 ConnectionAnchor (org.eclipse.draw2d.ConnectionAnchor)2 org.eclipse.gef (org.eclipse.gef)2 Command (org.eclipse.gef.commands.Command)2 DirectEditRequest (org.eclipse.gef.requests.DirectEditRequest)2 DirectEditManager (org.eclipse.gef.tools.DirectEditManager)2 ERDElement (org.jkiss.dbeaver.erd.model.ERDElement)2 ERDNote (org.jkiss.dbeaver.erd.model.ERDNote)2 ERDUIConstants (org.jkiss.dbeaver.erd.ui.ERDUIConstants)2 ExtendedDirectEditManager (org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager)2 FigureEditorLocator (org.jkiss.dbeaver.erd.ui.directedit.FigureEditorLocator)2 EntityConnectionEditPolicy (org.jkiss.dbeaver.erd.ui.policy.EntityConnectionEditPolicy)2 NoteDirectEditPolicy (org.jkiss.dbeaver.erd.ui.policy.NoteDirectEditPolicy)2 NoteEditPolicy (org.jkiss.dbeaver.erd.ui.policy.NoteEditPolicy)2