Package jakarta.portlet
Class WindowState
- java.lang.Object
-
- jakarta.portlet.WindowState
-
public class WindowState extends Object
TheWindowStateclass represents the possible window states that a portlet window can assume.This class defines a standard set of the most basic portlet window states. Additional window states may be defined by calling the constructor of this class. If a portal/portlet-container does not support a custom window state defined in the portlet application deployment descriptor, the custom window state will be ignored by the portal/portlet container.
-
-
Field Summary
Fields Modifier and Type Field Description static WindowStateMAXIMIZEDTheMAXIMIZEDwindow state is an indication that a portlet may be the only portlet being rendered in the portal page, or that the portlet has more space compared to other portlets in the portal page.static WindowStateMINIMIZEDWhen a portlet is inMINIMIZEDwindow state, the portlet should only render minimal output or no output at all.static WindowStateNORMALTheNORMALwindow state indicates that a portlet may be sharing the page with other portlets.static WindowStateUNDEFINEDThe window stateUNDEFINEDis returned by thegetWindowStatemethod when the window state is not available.
-
Constructor Summary
Constructors Constructor Description WindowState()No-arg constructor to make object proxyableWindowState(String name)Creates a new window state with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Compares the specified object with this window state for equality.inthashCode()Returns the hash code value for this window state.StringtoString()Returns a String representation of this window state.
-
-
-
Field Detail
-
UNDEFINED
public static final WindowState UNDEFINED
The window stateUNDEFINEDis returned by thegetWindowStatemethod when the window state is not available.This mode may not be used to set the window state in the
setWindowStatemethod.The string value for this mode is
"undefined".- Since:
- 3.0
-
NORMAL
public static final WindowState NORMAL
TheNORMALwindow state indicates that a portlet may be sharing the page with other portlets. It may also indicate that the target device has limited display capabilities. Therefore, a portlet should restrict the size of its rendered output in this window state.The string value for this state is
"normal".
-
MAXIMIZED
public static final WindowState MAXIMIZED
TheMAXIMIZEDwindow state is an indication that a portlet may be the only portlet being rendered in the portal page, or that the portlet has more space compared to other portlets in the portal page. A portlet may generate richer content when its window state isMAXIMIZED.The string value for this state is
"maximized".
-
MINIMIZED
public static final WindowState MINIMIZED
When a portlet is inMINIMIZEDwindow state, the portlet should only render minimal output or no output at all.The string value for this state is
"minimized".
-
-
Constructor Detail
-
WindowState
public WindowState()
No-arg constructor to make object proxyable- Since:
- 3.0
-
WindowState
public WindowState(String name)
Creates a new window state with the given name.Upper case letters in the name are converted to lower case letters.
- Parameters:
name- The name of the window state
-
-
Method Detail
-
toString
public String toString()
Returns a String representation of this window state. Window state names are always lower case names.
-
hashCode
public int hashCode()
Returns the hash code value for this window state. The hash code is constructed by producing the hash value of the String value of this window state.
-
equals
public boolean equals(Object object)
Compares the specified object with this window state for equality. Returnstrueif the Stringsequalsmethod for the String representing the two window states returnstrue.
-
-