|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.Component
echoxul.view.ViewComponent
This component serves as a base class for implementing components which are derived from a View. Children should NOT be added to this component explicitly.
During the time between construction and initialization, the subclass or the user of the component must specify the resource location used to lookup the concrete View instance from the ViewCache. Setting the resource location multiple times prior to init() being called results in only the last setting being honored. This allows a subclass to specify a default during construction which can be overriden by the user of the component prior to init().
There are several ways to set the resource location:
Subclass init() methods must always call super.init() as their first step. After the base class init() method has been called, the call to getViewContext() will be guaranteed to succeed and allows access to the virtual component hierarchy.
Field Summary |
Fields inherited from class nextapp.echo.Component |
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY |
Constructor Summary | |
ViewComponent()
Default "do-nothing" constructor |
|
ViewComponent(java.lang.String resourcePath)
Construct a ViewComponent with a default resourcePath |
Method Summary | |
ViewContext |
getViewContext()
Return the ViewContext that this instance is wrapping. |
protected void |
init()
|
void |
setResourcePath(java.lang.String resourcePath)
|
void |
setView(View view)
|
void |
setViewContext(ViewContext viewContext)
|
Methods inherited from class nextapp.echo.Component |
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewComponent()
public ViewComponent(java.lang.String resourcePath)
resourcePath
- Method Detail |
public void setResourcePath(java.lang.String resourcePath)
public void setViewContext(ViewContext viewContext)
public void setView(View view)
protected void init()
public ViewContext getViewContext()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |