public class ContentPane extends Component implements Pane, PaneContainer
ContentPane component: a high-level container/layout object which fills a region and optionally provides the
capability to add FloatingPanes (e.g. WindowPanes) above that content. A ContentPane is
often suitable for use as a base class to extend when creating a composite (pane) component. May contain at most one non-
FloatingPane component as a child. May contain zero or more FloatingPane components as children.
A ContentPane may only be added to a Component which implements PaneContainer.
At most one Component that does NOT implement FloatingPane may be added to a ContentPane.
Any number of FloatingPanes may be added as children.
| Modifier and Type | Field and Description |
|---|---|
static int |
OVERFLOW_AUTO |
static int |
OVERFLOW_HIDDEN |
static int |
OVERFLOW_SCROLL |
static java.lang.String |
PROPERTY_BACKGROUND_IMAGE |
static java.lang.String |
PROPERTY_HORIZONTAL_SCROLL |
static java.lang.String |
PROPERTY_INSETS |
static java.lang.String |
PROPERTY_OVERFLOW |
static java.lang.String |
PROPERTY_VERTICAL_SCROLL |
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 |
|---|
ContentPane()
Creates a new
ContentPane. |
| Modifier and Type | Method and Description |
|---|---|
FillImage |
getBackgroundImage()
Returns the background image.
|
Extent |
getHorizontalScroll()
Returns the horizontal scrollbar position.
|
Insets |
getInsets()
Returns the inset margin of the content.
|
int |
getOverflow()
Returns the overflow state, describing how the pane will behave when
the content is larger than display area.
|
Extent |
getVerticalScroll()
Returns the vertical scrollbar position.
|
boolean |
isValidChild(Component child)
Determines if a given
Component is valid to be added as a
child to this Component. |
boolean |
isValidParent(Component parent)
Determines if this
Component is valid to be added as a
child of the given parent Component. |
void |
processInput(java.lang.String inputName,
java.lang.Object inputValue)
Processes client input specific to the
Component
received from the UpdateManager. |
void |
setBackgroundImage(FillImage newValue)
Sets the background image.
|
void |
setHorizontalScroll(Extent newValue)
Sets the horizontal scrollbar position.
|
void |
setInsets(Insets newValue)
Sets the inset margin of the content.
|
void |
setOverflow(int newValue)
Sets the overflow state, describing how the pane will behave when
the content is larger than display area.
|
void |
setVerticalScroll(Extent newValue)
Sets the vertical scrollbar position.
|
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, isVisible, 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_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_HORIZONTAL_SCROLL
public static final java.lang.String PROPERTY_INSETS
public static final java.lang.String PROPERTY_OVERFLOW
public static final java.lang.String PROPERTY_VERTICAL_SCROLL
public static final int OVERFLOW_AUTO
public static final int OVERFLOW_HIDDEN
public static final int OVERFLOW_SCROLL
public FillImage getBackgroundImage()
public Extent getHorizontalScroll()
public int getOverflow()
OVERFLOW_AUTO: provide scrollbars as necessaryOVERFLOW_HIDDEN: never display scrollbars, hide overflow contentOVERFLOW_SCROLL: always display scrollbarspublic Insets getInsets()
FloatingPanes, such as
WindowPanes, will NOT be constrained by
this margin.
Values may only be specified in pixel-based units.public Extent getVerticalScroll()
public boolean isValidChild(Component child)
ComponentComponent is valid to be added as a
child to this Component. Default implementation always
returns true, may be overridden to provide specific behavior.isValidChild in class Componentchild - the Component to evaluate as a childComponent is a valid childComponent.isValidChild(nextapp.echo.app.Component)public boolean isValidParent(Component parent)
ComponentComponent is valid to be added as a
child of the given parent Component. Default
implementation always returns true, may be overridden to provide specific
behavior.isValidParent in class Componentparent - the Component to evaluate as a parentComponent is a valid parentComponent.isValidParent(nextapp.echo.app.Component)public void processInput(java.lang.String inputName,
java.lang.Object inputValue)
ComponentComponent
received from the UpdateManager.
Derivative implementations should take care to invoke
super.processInput().
Security note: Because input to this method is
likely from a remote client, it should be treated as potentially hostile.
All input to this method should be carefully verified.
For example, directly invoking set() method with the
provided input would constitute a security hole.processInput in class ComponentinputName - the name of the inputinputValue - the value of the inputComponent.processInput(java.lang.String, java.lang.Object)public void setBackgroundImage(FillImage newValue)
newValue - the new background imagepublic void setHorizontalScroll(Extent newValue)
newValue - the new horizontal scrollbar positionpublic void setInsets(Insets newValue)
FloatingPanes, such as
WindowPanes, will NOT be constrained by
this margin.
Values may only be specified in pixel-based units.newValue - the new inset marginpublic void setOverflow(int newValue)
newValue - the overflow state, one of the following values:
OVERFLOW_AUTO: provide scrollbars as necessaryOVERFLOW_HIDDEN: never display scrollbars, hide overflow contentOVERFLOW_SCROLL: always display scrollbarspublic void setVerticalScroll(Extent newValue)
newValue - the new vertical scrollbar position