public class ContentPane extends ContentPane implements View
ContentPane for use with
applications. Displays the Header and contains space for
a MenuBar component. This content pane may be
used to create applications that follow the standard SPT layout for
an application.
The only child of this component is a SplitPane that may be styled through a style name
com.sptci.epng.ContentPane.splitPane. A default style
is enforced through the ContentPaneSplitPane
class in StyleSheet.addSplitPaneStyles()
method.
The Header and MenuBar
components displayed in the top part of the SplitPane are contained within a Column component. The column may be styled using
a com.sptci.epng.ContentPane.top name. A default style
is enforced through the ContentPaneTopColumn
class.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Modifier and Type | Field and Description |
|---|---|
protected Component |
content
The main view component that fills the main content area of this
content pane.
|
protected MenuBar |
menuBar
The menu bar for the content pane (application)
|
PROPERTY_BACKGROUND_IMAGE, PROPERTY_HORIZONTAL_SCROLL, PROPERTY_INSETS, PROPERTY_VERTICAL_SCROLLCHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_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() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component component)
Over-ridden to replace
content with the new component
specified. |
void |
add(Component component,
int index)
Over-ridden to add the specified component to
content container. |
protected Component |
createTop()
|
Component |
getContent()
Return the main content component displayed in this pane.
|
MenuBar |
getMenuBar()
Return the menu bar contained in this content pane.
|
void |
init()
Life-cycle method invoked when the component is added for the first time
to the component hierarchy.
|
void |
removeAll()
Over-ridden to remove only the children of
content from the
view. |
void |
setContent(Component content)
Set the primary content to be displayed in this pane.
|
void |
setMenuBar(MenuBar menuBar)
Set the menu bar to be contained in this content pane.
|
getBackgroundImage, getHorizontalScroll, getInsets, getVerticalScroll, isValidChild, isValidParent, processInput, setBackgroundImage, setHorizontalScroll, setInsets, setVerticalScrolladdPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isVisible, remove, remove, removePropertyChangeListener, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOfprotected MenuBar menuBar
public void init()
super.init unless they
wish to perform all the initialisation work.protected Component createTop()
Header
and menuBar. The menuBar is contained within a
Row component, so it is possible to add
components adjacent to the menu bar if so desired (by invoking
getMenuBar().getParent()).public MenuBar getMenuBar()
menuBar.public void setMenuBar(MenuBar menuBar)
menuBar - The component to set as the menu bar.public Component getContent()
public void setContent(Component content)
content - The content to display.public void removeAll()
content from the
view. In addition it removes any FloatingPane
components that have been added to this content pane.public void add(Component component)
content with the new component
specified. In keeping with the contract of a ContentPane, this allows only one child content.
Unlike the super-class this class does not throw an exception, just
replaces content with the new component specified.public void add(Component component, int index)
content container.
If the specified component is an instance of FloatingPane, then delegates to the super class
Component.add(nextapp.echo2.app.Component) method.