{
return;
}
PortletMode mode2 = PortletMode.VIEW;
WindowState state = WindowState.NORMAL;
mode2 = nav.getMode(window);
state = nav.getState(window);
if (isMinimized(data))
{
nav.setState(window, WindowState.MINIMIZED);
nav.sync(context);
return;
}
String action = data.getAction();
boolean targeted = isTargeted(data, instance, action);
boolean syncRequired = false;
if (!targeted)
{
if (mode2 != null && mode2.equals(PortletMode.VIEW))
{
}
}
else
{
if (targeted && action.equals(J1_HELP_ACTION))
{
nav.setMode(window, PortletMode.HELP);
nav.sync(context);
return;
}
if (targeted && action.equals(J1_RESTORE_ACTION))
{
nav.setMode(window, PortletMode.VIEW);
nav.setState(window, WindowState.NORMAL);
nav.sync(context);
return;
}
if (targeted && action.equals(J1_EDIT_ACTION))
{
nav.setMode(window, PortletMode.EDIT);
nav.sync(context);
return;
}
switch (mode)
{
case JetspeedRunData.NORMAL:
if (!mode2.equals(PortletMode.VIEW))
{
nav.setMode(window, PortletMode.VIEW);
syncRequired = true;
}
if (!state.equals(WindowState.NORMAL))
{
nav.setState(window, WindowState.NORMAL);
syncRequired = true;
}
break;
case JetspeedRunData.MAXIMIZE:
if (!state.equals(WindowState.MAXIMIZED))
{
nav.setState(window, WindowState.MAXIMIZED);
syncRequired = true;
}
break;