SPT Core API

com.sptci.echo
Class AbstractFrame<H extends AbstractHeader>

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by nextapp.echo.app.ContentPane
          extended by com.sptci.echo.AbstractFrame<H>
Type Parameters:
H - The header component to display adjacent to the logo.
All Implemented Interfaces:
View, Serializable, Pane, PaneContainer, RenderIdSupport
Direct Known Subclasses:
Frame, MenuFrame

public abstract class AbstractFrame<H extends AbstractHeader>
extends ContentPane
implements View

A standard content pane that displays a AbstractHeader component at the top. Note that in general it is not easy to over-ride the init() method of this component due to the over-ridden add(nextapp.echo.app.Component) methods.

Note: Style properties are based on the class name of Frame for simplicity and backwards compatibility with original Frame only implementation.

© Copyright 2009 Sans Pareil Technologies, Inc.

Version:
$Id: AbstractFrame.java 4853 2009-08-10 21:10:14Z rakesh $
Author:
Rakesh 2009-06-17
See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.app.ContentPane
OVERFLOW_AUTO, OVERFLOW_HIDDEN, OVERFLOW_SCROLL, PROPERTY_BACKGROUND_IMAGE, PROPERTY_HORIZONTAL_SCROLL, PROPERTY_INSETS, PROPERTY_OVERFLOW, PROPERTY_VERTICAL_SCROLL
 
Fields inherited from class nextapp.echo.app.Component
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 Summary
AbstractFrame()
           
 
Method Summary
 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.
 Component getContent()
          Return the main content component displayed in this content pane.
abstract  H getHeader()
           
 void init()
          Life-cycle method invoked when the content pane is added to the view hierarcy.
 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.
 
Methods inherited from class nextapp.echo.app.ContentPane
getBackgroundImage, getHorizontalScroll, getInsets, getOverflow, getVerticalScroll, isValidChild, isValidParent, processInput, setBackgroundImage, setHorizontalScroll, setInsets, setOverflow, setVerticalScroll
 
Methods inherited from class nextapp.echo.app.Component
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, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isVisible, remove, remove, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFrame

public AbstractFrame()
Method Detail

init

public void init()
Life-cycle method invoked when the content pane is added to the view hierarcy. Sets up the child components.

Overrides:
init in class Component

add

public void add(Component component)
Over-ridden to replace content with the new component specified. Unlike the super-class this class allows multiple child components.

Overrides:
add in class Component
Parameters:
component - The content to add to this component.
See Also:
setContent(nextapp.echo.app.Component)

add

public void add(Component component,
                int index)
Over-ridden to add the specified component to content container. If the specified component is an instance of FloatingPane, then delegates to the super class Component.add(nextapp.echo.app.Component) method.

Overrides:
add in class Component
Parameters:
component - The content to add to this component.
index - The index at which this child component is to be added.

removeAll

public void removeAll()
Over-ridden to remove only the children of content from the view. In addition it removes any FloatingPane components that have been added to this content pane.

Overrides:
removeAll in class Component

getContent

public Component getContent()
Return the main content component displayed in this content pane. The main content is displayed in the bottom section of the content pane.

Returns:
The main content displayed in this pane.

setContent

public void setContent(Component content)
Set the primary content to be displayed in this pane.

Parameters:
content - The content to display.

getHeader

public abstract H getHeader()
Returns:
The header component to display adjacent to the logo.

SPT Core API