use of org.jkiss.dbeaver.model.impl.admin.locks.LockGraphNode in project dbeaver by serge-rider.
the class LockGraphNodeEditPart method createFigure.
@Override
protected IFigure createFigure() {
LockGraphNode node = (LockGraphNode) getModel();
LockGraph graph = (LockGraph) getParent().getModel();
LockGraphNodeFigure nodeFigure = new LockGraphNodeFigure(node.getTitle(), (node == graph.getSelection()));
this.targetAnchor = new LockGraphConnectionAnchor(nodeFigure);
this.sourceAnchor = new LockGraphConnectionAnchor(nodeFigure);
return nodeFigure;
}
use of org.jkiss.dbeaver.model.impl.admin.locks.LockGraphNode in project dbeaver by dbeaver.
the class LockGraphNodeEditPart method refreshVisuals.
@Override
protected void refreshVisuals() {
LockGraphNode node = (LockGraphNode) getModel();
LockGraph lgraph = (LockGraph) ((LockGraphEditPart) getParent()).getModel();
LockGraphNodeFigure nodeFigure = (LockGraphNodeFigure) getFigure();
LockGraphEditPart graph = (LockGraphEditPart) getParent();
GridData gridData = new GridData(55, 30);
gridData.horizontalAlignment = GridData.CENTER;
gridData.verticalAlignment = GridData.CENTER;
gridData.verticalSpan = 10;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
int span = lgraph.getMaxWidth() / node.getSpan();
int spanMod = lgraph.getMaxWidth() % node.getSpan();
gridData.horizontalSpan = 0;
if (span > 1 && node.getLevelPosition() != LockGraphNode.LevelPosition.RIGHT) {
gridData.horizontalSpan = span;
} else if (spanMod > 0 && node.getLevelPosition() == LockGraphNode.LevelPosition.RIGHT) {
gridData.horizontalSpan = span + spanMod;
}
graph.setLayoutConstraint(this, nodeFigure, gridData);
}
use of org.jkiss.dbeaver.model.impl.admin.locks.LockGraphNode in project dbeaver by serge-rider.
the class LockGraphNodeEditPart method refreshVisuals.
@Override
protected void refreshVisuals() {
LockGraphNode node = (LockGraphNode) getModel();
LockGraph lgraph = (LockGraph) ((LockGraphEditPart) getParent()).getModel();
LockGraphNodeFigure nodeFigure = (LockGraphNodeFigure) getFigure();
LockGraphEditPart graph = (LockGraphEditPart) getParent();
GridData gridData = new GridData(55, 30);
gridData.horizontalAlignment = GridData.CENTER;
gridData.verticalAlignment = GridData.CENTER;
gridData.verticalSpan = 10;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
int span = lgraph.getMaxWidth() / node.getSpan();
int spanMod = lgraph.getMaxWidth() % node.getSpan();
gridData.horizontalSpan = 0;
if (span > 1 && node.getLevelPosition() != LockGraphNode.LevelPosition.RIGHT) {
gridData.horizontalSpan = span;
} else if (spanMod > 0 && node.getLevelPosition() == LockGraphNode.LevelPosition.RIGHT) {
gridData.horizontalSpan = span + spanMod;
}
graph.setLayoutConstraint(this, nodeFigure, gridData);
}
use of org.jkiss.dbeaver.model.impl.admin.locks.LockGraphNode in project dbeaver by dbeaver.
the class LockGraphNodeEditPart method createFigure.
@Override
protected IFigure createFigure() {
LockGraphNode node = (LockGraphNode) getModel();
LockGraph graph = (LockGraph) getParent().getModel();
LockGraphNodeFigure nodeFigure = new LockGraphNodeFigure(node.getTitle(), (node == graph.getSelection()));
this.targetAnchor = new LockGraphConnectionAnchor(nodeFigure);
this.sourceAnchor = new LockGraphConnectionAnchor(nodeFigure);
return nodeFigure;
}
Aggregations