Portlet API 2

org.apache.jetspeed.portlet
Interface PortletWindow


public interface PortletWindow

The PortletWindow represents the window that encloses a portlet. The portlet window can send events on manipulation of its various window controls, like the "minimize" or "close" buttons. But a portlet also interrogate the portlet window about its current visibility state. For example, a portlet may render its content differently depending on whether its window is maximized or not.


Method Summary
 void addWindowListener(WindowListener listener)
          Adds the given listener to receive window events from this portlet window.
 boolean isClosed()
          Returns whether this portlet window is currently closed.
 boolean isMaximized()
          Returns whether this portlet window is currently maximized.
 boolean isMinimized()
          Returns whether this portlet window is currently minimized.
 void removeWindowListener(WindowListener listener)
          Removes the given listener from receiving window events from this portlet window.
 void setClosed(boolean aFlag)
          Sets this window to be closed.
 void setMinimized(boolean aFlag)
          Sets this window to be minimized.
 void setTitle(PortletTitle title)
          Sets the given title to be the title of this window.
 

Method Detail

addWindowListener

public void addWindowListener(WindowListener listener)
Adds the given listener to receive window events from this portlet window.

If the given listener is null, this method does nothing.

Parameters:
listener - the listener to be added

removeWindowListener

public void removeWindowListener(WindowListener listener)
Removes the given listener from receiving window events from this portlet window.

If the given listener is null, this method does nothing.

Parameters:
listener - the listener to be removed

setTitle

public void setTitle(PortletTitle title)
Sets the given title to be the title of this window. This method should only be called if a dynamic title is required. Otherwise, the portlet container uses the title from the portlet configuration.
Parameters:
title - the portlet title

isMaximized

public boolean isMaximized()
Returns whether this portlet window is currently maximized.
Returns:
true if this window is maximized,
false otherwise

isMinimized

public boolean isMinimized()
Returns whether this portlet window is currently minimized.
Returns:
true if this window is minimized,
false otherwise

isClosed

public boolean isClosed()
Returns whether this portlet window is currently closed.
Returns:
true if this window is closed,
false otherwise

setMinimized

public void setMinimized(boolean aFlag)
Sets this window to be minimized.
Parameters:
aFlag - a flag whether or not to minimize this window

setClosed

public void setClosed(boolean aFlag)
Sets this window to be closed.
Returns:
true if this window is closed,
false otherwise

Portlet API 2