Closes a window using the DockingWindow.close method.
In a GUI, you would typically use CloseWithAbortWindowAction instead of this class.