public class Panel extends Composite implements PaneContainer
Panel component: a single child container. Provides a configurable border, margin, background image, and dimensions.
May contain at most one child. May contain Pane components, and may be used as a means to add Pane
components to containers which do not allow Pane components as children. In such a case it may be necessary to
manually set the height property of the Panel itself.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_ALIGNMENT |
static java.lang.String |
PROPERTY_BACKGROUND_IMAGE |
static java.lang.String |
PROPERTY_BORDER |
static java.lang.String |
PROPERTY_HEIGHT |
static java.lang.String |
PROPERTY_IMAGE_BORDER |
static java.lang.String |
PROPERTY_INSETS |
static java.lang.String |
PROPERTY_WIDTH |
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 and Description |
|---|
Panel() |
| Modifier and Type | Method and Description |
|---|---|
Alignment |
getAlignment()
Returns the
Alignment describing how the child component is aligned within the Panel. |
FillImage |
getBackgroundImage()
Returns the background image.
|
Border |
getBorder()
Returns the
Border that encloses the entire Panel. |
Extent |
getHeight()
Returns the height of the panel.
|
FillImageBorder |
getImageBorder()
Returns the
FillImageBorder that encloses the entire Panel. |
Insets |
getInsets()
Returns the default inset between the border and cells of the
Panel. |
Extent |
getWidth()
Returns the width.
|
void |
setAlignment(Alignment newValue)
Sets the
Alignment describing how the child component is aligned within the Panel. |
void |
setBackgroundImage(FillImage newValue)
Sets the background image.
|
void |
setBorder(Border newValue)
Sets the
Border that encloses the entire Panel. |
void |
setHeight(Extent newValue)
Sets the height.
|
void |
setImageBorder(FillImageBorder newValue)
Sets the
FillImageBorder that encloses the entire Panel. |
void |
setInsets(Insets newValue)
Sets the inset between the border and cells of the
Panel. |
void |
setWidth(Extent newValue)
Sets the width.
|
isValidChildadd, 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, isValidParent, 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, visibleIndexOfpublic static final java.lang.String PROPERTY_ALIGNMENT
public static final java.lang.String PROPERTY_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_BORDER
public static final java.lang.String PROPERTY_IMAGE_BORDER
public static final java.lang.String PROPERTY_INSETS
public static final java.lang.String PROPERTY_WIDTH
public static final java.lang.String PROPERTY_HEIGHT
public FillImage getBackgroundImage()
public Alignment getAlignment()
Alignment describing how the child component is aligned within the Panel.public Border getBorder()
Border that encloses the entire Panel.public FillImageBorder getImageBorder()
FillImageBorder that encloses the entire Panel.public Extent getHeight()
Panel will be sized by the height of its content, unless it contains a Pane
component of indeterminate size.
This property only supports Extents with fixed (i.e., not percent) units.public Insets getInsets()
Panel.public Extent getWidth()
Panel will expand to the width of its container.public void setAlignment(Alignment newValue)
Alignment describing how the child component is aligned within the Panel.newValue - the new alignmentpublic void setBackgroundImage(FillImage newValue)
newValue - the new background imagepublic void setBorder(Border newValue)
Border that encloses the entire Panel.newValue - the new borderpublic void setHeight(Extent newValue)
Panel will be sized by the height of its content, unless it contains a Pane
component of indeterminate size.
This property only supports Extents with fixed (i.e., not percent) units.newValue - the new heightpublic void setImageBorder(FillImageBorder newValue)
FillImageBorder that encloses the entire Panel.newValue - the new image borderpublic void setInsets(Insets newValue)
Panel.newValue - the new insetpublic void setWidth(Extent newValue)
Panel will expand to the width of its container.newValue - the new width