public void actionPerformed(ActionEvent evt)
{
if (_desktop != null && _app.getDesktopStyle().isInternalFrameStyle())
{
Dimension cs = null; // Size to set child windows to.
CascadeInternalFramePositioner pos =
new CascadeInternalFramePositioner();
IWidget[] widgets =
WidgetUtils.getOpenNonToolWindows(_desktop.getAllWidgets());
for (int i = widgets.length - 1; i >= 0; --i)
{
JInternalFrame child = widgets[i].getInternalFrame();
if (cs == null && child.getParent() != null)
{
cs = child.getParent().getSize();
// Cast to int required as Dimension::setSize(double,double)
// doesn't appear to do anything in JDK1.2.2.
cs.setSize(
(int) (cs.width * 0.8d),
(int) (cs.height * 0.8d));
}
if (cs != null)
{
child.setSize(cs);
pos.positionInternalFrame(child);
}
}
}
}