org.hackystat.projectbrowser.page.contextsensitive
Class ContextSensitiveMenu

java.lang.Object
  extended by org.hackystat.projectbrowser.page.contextsensitive.ContextSensitiveMenu
All Implemented Interfaces:
java.io.Serializable

public class ContextSensitiveMenu
extends java.lang.Object
implements java.io.Serializable

Provides state information for an individual label/menu pair that appears within a ContextSensitivePanel.

Author:
Philip Johnson
See Also:
Serialized Form

Constructor Summary
ContextSensitiveMenu(java.lang.String name, java.lang.String defaultValue, java.util.List<java.lang.String> values, boolean isVisible)
          Creates this context sensitive menu.
 
Method Summary
 java.lang.String getName()
          Returns the name of this label/menu pair.
 java.lang.String getSelectedValue()
          Returns the currently selected value of this menu, or null if none selected.
 java.util.List<java.lang.String> getValues()
          Returns the list of strings to be displayed in the menu.
 boolean isVisible()
          True if this label/menu pair should be displayed.
 void setSelectedValue(java.lang.String value)
          Sets the selected value associated with this menu.
 void setVisible(boolean visibility)
          Sets whether this label/menu pair should be displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextSensitiveMenu

public ContextSensitiveMenu(java.lang.String name,
                            java.lang.String defaultValue,
                            java.util.List<java.lang.String> values,
                            boolean isVisible)
Creates this context sensitive menu.

Parameters:
defaultValue - The initial selected value, or else null for no selected value.
values - The list of values to appear.
name - The label to be associated with this pane. This label is also used to identify the menu, so it should be unique within the enclosing ContextSensitivePanel.
isVisible - True if this pane should start out being visible or not visible.
Method Detail

getSelectedValue

public java.lang.String getSelectedValue()
Returns the currently selected value of this menu, or null if none selected.

Returns:
The selected value.

setSelectedValue

public void setSelectedValue(java.lang.String value)
Sets the selected value associated with this menu.

Parameters:
value - The new selected value.

getValues

public java.util.List<java.lang.String> getValues()
Returns the list of strings to be displayed in the menu.

Returns:
The values list.

isVisible

public boolean isVisible()
True if this label/menu pair should be displayed.

Returns:
True if displayed.

setVisible

public void setVisible(boolean visibility)
Sets whether this label/menu pair should be displayed.

Parameters:
visibility - True if displayed.

getName

public java.lang.String getName()
Returns the name of this label/menu pair. Should be unique within a panel.

Returns:
The name.