SizeAgent
From Documentation
With SizeAgent , we can mimic to maximize, minimize, and resize a window or a panel. There are two flags in a window (or a panel) to represent maximized and minimized state respectively. When they are both "false", it represents "original size". When
ComponentAgent window = desktopAgent.query("window");
//maximize
window.as(SizeAgent.class).maximize(true);
//restore to original size
window.as(SizeAgent.class).maximize(false);
//minimize
window.as(SizeAgent.class).minimize(true);
//restore to original size
window.as(SizeAgent.class).minimize(false);