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
.
This widget will only work in quirks mode in most cases. Specifically, setting the height or width of the DecoratorPanel will result in rendering issues.
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.
If you set the width or height of the DecoratorPanel
, you need to
set the height and width of the middleCenter cell to 100% so that the
middleCenter cell takes up all of the available space. If you do not set the
width and height of the DecoratorPanel
, it will wrap its contents
tightly.
.gwt-DecoratorPanel .middleCenter { height: 100%; width: 100%; }
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
widget
eventsToSink
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR
Constructor and Description |
---|
DecoratorPanel()
Create a new
DecoratorPanel . |
DecoratorPanel(java.lang.String[] rowStyles,
int containerIndex)
Creates a new panel using the specified style names to apply to each row.
|
Modifier and Type | Method and Description |
---|---|
(package private) static Element |
createTR(java.lang.String styleName)
Create a new row with a specific style name.
|
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.
|
add, getWidget, iterator, remove, setWidget, setWidget
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
public DecoratorPanel()
DecoratorPanel
.DecoratorPanel(java.lang.String[] rowStyles, int containerIndex)
Widget
.rowStyles
- an array of style names to apply to each rowcontainerIndex
- the index of the container rowstatic Element createTR(java.lang.String styleName)
styleName
- the style nameElement
protected Element getCellElement(int row, int cell)
row
- the row indexcell
- the cell indexprotected Element getContainerElement()
SimplePanel
Element
class defined in the
User
module to maintain backwards compatibility.getContainerElement
in class SimplePanel