Search in sources :

Example 1 with NodeResizeCommand

use of com.cubrid.cubridmanager.ui.mondashboard.editor.command.NodeResizeCommand in project cubrid-manager by CUBRID.

the class DashboardLayoutEditPolicy method createChangeConstraintCommand.

/**
	 * Create command when figure's constraint change
	 * 
	 * @param child the figure's editpart
	 * @param constraint constraint of figure
	 * @return command which controls figure's size.
	 */
protected Command createChangeConstraintCommand(EditPart child, Object constraint) {
    if (child instanceof HANodePart) {
        NodeResizeCommand cmd = new NodeResizeCommand();
        cmd.setNode((HANode) child.getModel());
        cmd.setNewRect((Rectangle) constraint);
        return cmd;
    }
    return null;
}
Also used : NodeResizeCommand(com.cubrid.cubridmanager.ui.mondashboard.editor.command.NodeResizeCommand) HANodePart(com.cubrid.cubridmanager.ui.mondashboard.editor.parts.HANodePart)

Aggregations

NodeResizeCommand (com.cubrid.cubridmanager.ui.mondashboard.editor.command.NodeResizeCommand)1 HANodePart (com.cubrid.cubridmanager.ui.mondashboard.editor.parts.HANodePart)1