@classmethod
def move_command(cls, component, new_position, previous_position=None, **traits
    ):
    """ Factory that creates a ResizeCommand implementing a move operation

        This allows a MoveTool to create move commands that can be easily
        merged with resize commands.

        """
    bounds = tuple(component.bounds)
    new_rectangle = new_position + bounds
    if previous_position is not None:
        previous_rectangle = previous_position + bounds
    else:
        previous_rectangle = None
    return cls(component=component, new_rectangle=new_rectangle,
        previous_rectangle=previous_rectangle, **traits)
