Search in sources :

Example 1 with Node

use of org.eclipse.draw2d.graph.Node in project cubrid-manager by CUBRID.

the class ERGraphLayoutVisitor method setFigureBounds.

private void setFigureBounds(TablePart tablePart, int absStartX, int absStartY) {
    Node node = (Node) partNodesMap.get(tablePart);
    TableFigure tableFigure = (TableFigure) tablePart.getFigure();
    Rectangle bounds = new Rectangle(absStartX + node.x, absStartY + node.y, tableFigure.getPreferredSize().width, tableFigure.getPreferredSize().height);
    tableFigure.setBounds(bounds);
    for (int i = 0; i < tablePart.getSourceConnections().size(); i++) {
        RelationshipPart relationship = (RelationshipPart) tablePart.getSourceConnections().get(i);
        setFigureConstraint(relationship);
    }
}
Also used : TableFigure(com.cubrid.common.ui.er.figures.TableFigure) RelationshipPart(com.cubrid.common.ui.er.part.RelationshipPart) Node(org.eclipse.draw2d.graph.Node) Rectangle(org.eclipse.draw2d.geometry.Rectangle)

Aggregations

TableFigure (com.cubrid.common.ui.er.figures.TableFigure)1 RelationshipPart (com.cubrid.common.ui.er.part.RelationshipPart)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 Node (org.eclipse.draw2d.graph.Node)1