EchoPoint API - 3.0.0b5
App Webcontainer

echopoint
Class LightBox

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.LightBox
All Implemented Interfaces:
Serializable, Pane, RenderIdSupport

public class LightBox
extends Component
implements Pane

The LightBox is a component that covers all visible content with a translucent image. This can be used to give a visual clue to the user that content cannot be interacted with. LightBox supports child components that may be used to present visually modal content to the user. LightBox components are designed to be added as the only child of WindowPane or SplitPane components.

Version:
$Id: LightBox.java 143 2009-03-28 03:11:59Z sptrakesh $
Author:
Brad Baker, Rakesh 2009-03-06
See Also:
Serialized Form

Field Summary
static String PROPERTY_HIDDEN
          The property used to toggle the display status of the light box.
static String PROPERTY_PARENT_ONLY
          The property used to indicate whether the light box should cover the entire browser window or just the pane (windowpane, split pane...).
static String PROPERTY_TRANSLUCENT_IMAGE
          The property for the image to use as the translucent overlay.
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
LightBox()
           
 
Method Summary
 boolean getHidden()
          Return the visiable status of the light box.
 boolean getParentOnly()
          Return the indicator that specifies whether the light box will cover the entire browser window or just its container pane.
 ImageReference getTranslucentImage()
          Return the image that is used as the overlay to hide content.
 boolean isValidParent(Component component)
          Over-ridden to allow only PaneContainers as parents.
 void setHidden(boolean hidden)
          Set the visible status of the light box.
 void setParentOnly(boolean parentOnly)
          Set the indicator that specified whether the light box covers the entire browser window or just its parent container pane.
 void setTranslucentImage(ImageReference image)
          Sets the image to be used as the background of the light box.
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_TRANSLUCENT_IMAGE

public static final String PROPERTY_TRANSLUCENT_IMAGE
The property for the image to use as the translucent overlay.

See Also:
Constant Field Values

PROPERTY_HIDDEN

public static final String PROPERTY_HIDDEN
The property used to toggle the display status of the light box.

See Also:
Constant Field Values

PROPERTY_PARENT_ONLY

public static final String PROPERTY_PARENT_ONLY
The property used to indicate whether the light box should cover the entire browser window or just the pane (windowpane, split pane...).

See Also:
Constant Field Values
Constructor Detail

LightBox

public LightBox()
Method Detail

getTranslucentImage

public ImageReference getTranslucentImage()
Return the image that is used as the overlay to hide content.

Returns:
The overlay image.

setTranslucentImage

public void setTranslucentImage(ImageReference image)
Sets the image to be used as the background of the light box. This image should be a translucent image such as a PNG and it will be used to cover any current content on the client when the lightbox is shown.

Parameters:
image - The image to use as the over lay.

getHidden

public boolean getHidden()
Return the visiable status of the light box.

Returns:
Return true if the light box will be visible when added to the component hierarchy.

setHidden

public void setHidden(boolean hidden)
Set the visible status of the light box. Use in event listeners to display or hide the light box. The usual action is to hide the light box after some processing, but may also be used to re-display a previously hidden light box (reuse the same light box).

Parameters:
hidden - The visible status indicator to set.

getParentOnly

public boolean getParentOnly()
Return the indicator that specifies whether the light box will cover the entire browser window or just its container pane.

Returns:
Return true if only the container pane is covered.

setParentOnly

public void setParentOnly(boolean parentOnly)
Set the indicator that specified whether the light box covers the entire browser window or just its parent container pane.

Parameters:
parentOnly - The indicator to set.

isValidParent

public boolean isValidParent(Component component)
Over-ridden to allow only PaneContainers as parents.

Overrides:
isValidParent in class Component
Parameters:
component - The component to test.
Returns:
Return true if the component is a pane container.

EchoPoint API - 3.0.0b5
App Webcontainer