com.extjs.gxt.ui.client.widget
Class Layer

java.lang.Object
  extended by com.extjs.gxt.ui.client.core.El
      extended by com.extjs.gxt.ui.client.widget.Layer

public class Layer
extends El

An extended El object that supports a shadow and shim, constrain to viewport and automatic maintaining of shadow/shim positions.


Nested Class Summary
static class Layer.ShadowPosition
           
 
Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.core.El
El.VisMode
 
Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.core.El
dom
 
Constructor Summary
Layer()
          Creates a new layer instance.
Layer(com.google.gwt.user.client.Element element)
          Creates a new layer instance wrapping the specified element.
 
Method Summary
 void disableShadow()
          Disables the shadow.
 void disableShim()
          Disables the shim.
 void disableUnders()
          Disables the shim and the shadow.
 void enableShadow()
          Enables the shadow.
 void enableShim()
          Enables the shim.
 El getShadow()
          Returns the layer's shadow.
 int getShadowOffset()
          Returns the shadow offset.
 Layer.ShadowPosition getShadowPosition()
          Returns the shadow position.
 El getShim()
          Returns the layer's shim.
 void hideShadow()
          Hides the layer's shadow.
 void hideShim()
          Hides the shim.
 void hideUnders()
          Hides the shim and the shadow.
 boolean isShadow()
           
 boolean isShim()
           
 El remove()
          Removes this element from the DOM
 El setHeight(int height, boolean adjust)
          Sets the elements height.
 El setHeight(java.lang.String height)
          Sets the elements height.
 El setLeft(int left)
          Sets the element's left position directly using CSS style (instead of El.setX(int)).
 void setShadowOffset(int shadowOffset)
          Sets the shadow offset (defaults to 4).
 void setShadowPosition(Layer.ShadowPosition shadowPosition)
          Sets the shadow position (defaults to SIDES).
 El setTop(int top)
          Sets the element's top position directly using CSS style (instead of El.setY(int)).
 El setVisibility(boolean visible)
          Sets the elements css 'visibility' property.
 El setVisible(boolean visible)
          Sets the visibility of the element (see details).
 El setWidth(int width, boolean adjust)
          Sets the elements's width.
 El setWidth(java.lang.String width)
          Sets the element's width.
 El setZIndex(int zIndex)
          Sets the element's z-index.
 El sync(boolean show)
          Syncs the shadow and shim.
 
Methods inherited from class com.extjs.gxt.ui.client.core.El
addEventsSunk, addStyleName, addUnits, adjustForConstraints, alignTo, appendChild, applyStyles, blink, blur, boxWrap, center, center, center, child, childElement, childNode, clearOpacity, click, clip, cloneNode, createChild, createChild, disable, disableContextMenu, disableTextSelection, down, enable, enableDisplayMode, equals, fadeIn, fadeOut, fadeToggle, findParent, findParentElement, firstChild, fly, fly, fly, fly, focus, getAlignToXY, getAlignToXY, getAnchorXY, getBorderWidth, getBottom, getBounds, getBounds, getBounds, getChild, getChildElement, getChildIndex, getClientHeight, getClientWidth, getComputedHeight, getComputedWidth, getConstrainToXY, getFrameSize, getFrameWidth, getHeight, getHeight, getId, getInnerHtml, getIntStyleAttribute, getLayoutBounds, getLeft, getLeft, getMargins, getOffsetsTo, getOuterHtml, getPadding, getParent, getRegion, getRight, getScroll, getScrollLeft, getScrollTop, getSize, getSize, getStyleAttribute, getStyleAttribute, getStyleHeight, getStyleName, getStyleSize, getStyleSize, getStyleWidth, getSubChild, getTextWidth, getTop, getTop, getValue, getWidth, getWidth, getX, getXY, getY, getZIndex, hasStyleName, hide, insertBefore, insertBefore, insertBefore, insertChild, insertChild, insertFirst, insertFirst, insertFirst, insertHtml, insertInto, insertInto, insertLast, insertSibling, insertSibling, is, isBorderBox, isBorderBox, isConnected, isMasked, isOrHasChild, isScrollable, isScrollableX, isScrollableY, isStyleAttribute, isStyleAttribute, isVisibility, isVisible, isVisible, lastChild, load, makePositionable, makePositionable, mask, mask, mask, nextSibling, previousSibling, removeChild, removeChildren, removeFromParent, removeStyleName, removeStyleName, repaint, replaceStyleName, scrollIntoView, scrollIntoView, scrollTo, scrollTo, select, selectNode, setBorders, setBounds, setBounds, setBounds, setBounds, setDisplayed, setDisplayed, setElementAttribute, setElementAttribute, setElementAttribute, setEnabled, setFocus, setHeight, setIconStyle, setId, setInnerHtml, setIntElementProperty, setLeftTop, setMargins, setPadding, setPagePosition, setScrollLeft, setScrollTop, setSize, setSize, setSize, setSize, setStyleAttribute, setStyleName, setStyleName, setStyleSize, setTabIndex, setTitle, setValue, setVisibilityMode, setWidth, setX, setXY, setXY, setXY, setY, show, slideIn, slideOut, subChild, toggleStyleName, toString, translatePoints, unclip, unmask, unwrap, update, updateZIndex, wrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Layer

public Layer()
Creates a new layer instance.


Layer

public Layer(com.google.gwt.user.client.Element element)
Creates a new layer instance wrapping the specified element.

Parameters:
element - the element
Method Detail

disableShadow

public void disableShadow()
Disables the shadow.


disableShim

public void disableShim()
Disables the shim.


disableUnders

public void disableUnders()
Disables the shim and the shadow.


enableShadow

public void enableShadow()
Enables the shadow.


enableShim

public void enableShim()
Enables the shim.


getShadow

public El getShadow()
Returns the layer's shadow.

Returns:
the shadow or null

getShadowOffset

public int getShadowOffset()
Returns the shadow offset.

Returns:
the shadow offset

getShadowPosition

public Layer.ShadowPosition getShadowPosition()
Returns the shadow position.

Returns:
the shadow position

getShim

public El getShim()
Returns the layer's shim.

Returns:
the shim

hideShadow

public void hideShadow()
Hides the layer's shadow.


hideShim

public void hideShim()
Hides the shim.


hideUnders

public void hideUnders()
Hides the shim and the shadow.


isShadow

public boolean isShadow()

isShim

public boolean isShim()

remove

public El remove()
Description copied from class: El
Removes this element from the DOM

Overrides:
remove in class El

setHeight

public El setHeight(int height,
                    boolean adjust)
Description copied from class: El
Sets the elements height.

Overrides:
setHeight in class El
Parameters:
height - the height
adjust - true to adjust for box model issues
Returns:
this

setHeight

public El setHeight(java.lang.String height)
Description copied from class: El
Sets the elements height.

Overrides:
setHeight in class El
Parameters:
height - the height
Returns:
this

setLeft

public El setLeft(int left)
Description copied from class: El
Sets the element's left position directly using CSS style (instead of El.setX(int)).

Overrides:
setLeft in class El
Parameters:
left - the left value
Returns:
this

setShadowOffset

public void setShadowOffset(int shadowOffset)
Sets the shadow offset (defaults to 4).

Parameters:
shadowOffset - the offset

setShadowPosition

public void setShadowPosition(Layer.ShadowPosition shadowPosition)
Sets the shadow position (defaults to SIDES).

Parameters:
shadowPosition - the position

setTop

public El setTop(int top)
Description copied from class: El
Sets the element's top position directly using CSS style (instead of El.setY(int)).

Overrides:
setTop in class El
Parameters:
top - the top value
Returns:
this

setVisibility

public El setVisibility(boolean visible)
Description copied from class: El
Sets the elements css 'visibility' property. Behavior is different than using the 'display' property.

Overrides:
setVisibility in class El
Parameters:
visible - true to show, false to hide
Returns:
this

setVisible

public El setVisible(boolean visible)
Description copied from class: El
Sets the visibility of the element (see details). If the vis mode is set to DISPLAY, it will use the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the DISPLAY property.

Overrides:
setVisible in class El
Parameters:
visible - whether the element is visible
Returns:
this

setWidth

public El setWidth(int width,
                   boolean adjust)
Description copied from class: El
Sets the elements's width.

Overrides:
setWidth in class El
Parameters:
width - the new width
adjust - true to adjust for box model issues
Returns:
this

setWidth

public El setWidth(java.lang.String width)
Description copied from class: El
Sets the element's width.

Overrides:
setWidth in class El
Parameters:
width - the new width
Returns:
this

setZIndex

public El setZIndex(int zIndex)
Description copied from class: El
Sets the element's z-index.

Overrides:
setZIndex in class El
Parameters:
zIndex - the z-index value
Returns:
this

sync

public El sync(boolean show)
Syncs the shadow and shim.

Overrides:
sync in class El
Parameters:
show - true to show