Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client.ui
Class DecoratorPanel

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.google.gwt.user.client.ui.Panel
                  com.google.gwt.user.client.ui.SimplePanel
                      com.google.gwt.user.client.ui.DecoratorPanel

All Implemented Interfaces:
  EventListener, HasWidgets, java.lang.Iterable<Widget>

    public class DecoratorPanel

extends SimplePanel

A `SimplePanel` that wraps its contents in stylized boxes, which can be used to add rounded corners to a `Widget`.

Wrapping a `Widget` in a "9-box" allows users to specify images in each of the corners and along the four borders. This method allows the content within the `DecoratorPanel` to resize without disrupting the look of the border. In addition, rounded corners can generally be combined into a single image file, which reduces the number of downloaded files at startup. This class also simplifies the process of using AlphaImageLoaders to support 8-bit transparencies (anti-aliasing and shadows) in ie6, which does not support them normally.

### CSS Style Rules

- .gwt-DecoratorPanel { the panel }
- .gwt-DecoratorPanel .top { the top row }
- .gwt-DecoratorPanel .topLeft { the top left cell }
- .gwt-DecoratorPanel .topLeftInner { the inner element of the cell }
- .gwt-DecoratorPanel .topCenter { the top center cell }
- .gwt-DecoratorPanel .topCenterInner { the inner element of the cell }
- .gwt-DecoratorPanel .topRight { the top right cell }
- .gwt-DecoratorPanel .topRightInner { the inner element of the cell }
- .gwt-DecoratorPanel .middle { the middle row }
- .gwt-DecoratorPanel .middleLeft { the middle left cell }
- .gwt-DecoratorPanel .middleLeftInner { the inner element of the cell }
- .gwt-DecoratorPanel .middleCenter { the middle center cell }
- .gwt-DecoratorPanel .middleCenterInner { the inner element of the cell }
- .gwt-DecoratorPanel .middleRight { the middle right cell }
- .gwt-DecoratorPanel .middleRightInner { the inner element of the cell }
- .gwt-DecoratorPanel .bottom { the bottom row }
- .gwt-DecoratorPanel .bottomLeft { the bottom left cell }
- .gwt-DecoratorPanel .bottomLeftInner { the inner element of the cell }
- .gwt-DecoratorPanel .bottomCenter { the bottom center cell }
- .gwt-DecoratorPanel .bottomCenterInner { the inner element of the cell }
- .gwt-DecoratorPanel .bottomRight { the bottom right cell }
- .gwt-DecoratorPanel .bottomRightInner { the inner element of the cell }

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

Field Summary

Fields inherited from class com.google.gwt.user.client.ui.UIObject
`DEBUG_ID_PREFIX`

Constructor Summary
`DecoratorPanel()` Create a new `DecoratorPanel`.

Method Summary
`protected Element` | `getCellElement(int row, int cell)` Get a specific Element from the panel.
`protected Element` | `getContainerElement()` Override this method to specify that an element other than the root element be the container for the panel's child widget.

Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
`add, getWidget, iterator, remove, setWidget`

Methods inherited from class com.google.gwt.user.client.ui.Panel
`adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`getParent, isAttached, onAttach, onBrowserEvent, onDetach, removeFromParent`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DecoratorPanel

    public DecoratorPanel()

  Create a new `DecoratorPanel`.

Method Detail

### getCellElement

    protected Element getCellElement(int row,
                                     int cell)

  Get a specific Element from the panel.

  Parameters:
    `row` - the row index
    `cell` - the cell index
  Returns:
    the Element at the given row and cell

### getContainerElement

    protected Element getContainerElement()

  Description copied from class: `SimplePanel`
  Override this method to specify that an element other than the root element be the container for the panel's child widget. This can be useful when you want to create a simple panel that decorates its contents. Note that this method continues to return the `Element` class defined in the `User` module to maintain backwards compatibility.

  Overrides:
    `getContainerElement` in class `SimplePanel`
  Returns:
    the element to be used as the panel's container

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD