|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.barracuda.core.comp.AbstractBComponent
This class provides the abstract implementation for BComponent. Typically, however, you would extend from BComponent, not this class.
Field Summary | |
protected java.util.List |
children
|
protected java.lang.Object |
dvc
|
protected boolean |
isStepChild
|
protected static org.apache.log4j.Logger |
logger
|
protected BContainer |
parent
|
protected boolean |
preventCaching
|
protected StateMap |
statemap
|
protected java.util.List |
stepChildren
|
protected java.util.List |
tempViews
|
protected boolean |
validated
|
protected java.util.List |
views
|
Constructor Summary | |
AbstractBComponent()
|
Method Summary | |
void |
addChild(BContainer child)
Add a child container to this one |
void |
addStepChild(BContainer child)
Add a step child; step children are automatically removed after each render. |
void |
addStepChild(BContainer child,
boolean inheritParentAttrs)
Add a step child; step children are automatically removed after each render. |
void |
addTempView(View tview)
Add a temporary view; temp views are automatically removed after each render |
abstract void |
addView(View view)
|
void |
destroyCycle()
Destroy cycle. |
protected java.util.Map |
findComponentMap(java.lang.Class cl)
Look for a factory that can render either this class or its parent class. |
protected RendererFactory |
findRendererFactory(java.lang.Class cl,
java.util.Map domMap)
Look for a factory that can render either this class or its parent class. |
abstract java.lang.Object |
getAttr(java.lang.Object attr)
|
abstract java.util.Map |
getAttrMap()
|
BContainer |
getChild(int index)
Get a child container at a given index |
java.util.List |
getChildren()
Gets a list of all child BContainers. |
ViewContext |
getDefaultViewContext()
Get the default ViewContext. |
abstract java.lang.String |
getName()
|
BContainer |
getParent()
Get the parent container. |
boolean |
getPreventCaching()
Determine whether the root component is preventing DOM caching |
Renderer |
getRenderer(java.lang.Class domCl)
|
Renderer |
getRenderer(View view)
This method allows a component to get a reference to the appropriate renderer. |
AbstractBComponent |
getRootComponent()
|
java.lang.Object |
getState(java.lang.Object key)
get a property in this StateMap |
java.util.List |
getStateKeys()
get a list of the keys for this StateMap |
java.util.Map |
getStateValues()
get a copy of the underlying Map |
abstract java.util.List |
getViews()
|
boolean |
hasChildren()
Determine whether this container has any children |
boolean |
hasViews()
Determine whether the component has any views (either regular or temp) |
void |
initCycle()
Initialize cycle. |
static void |
installRendererFactory(RendererFactory rf,
java.lang.Class compCl,
java.lang.Class domCl)
This allows developers to install custom renderers for specific classes of components. |
void |
invalidate()
Invalidates the container and all parent containers above it. |
abstract boolean |
isEnabled()
|
boolean |
isStepChild()
Determine whether this component is a step child |
abstract boolean |
isVisible()
|
void |
printStackTrace(int depth,
org.apache.log4j.Logger logger)
|
protected void |
printStackTrace(int depth,
org.apache.log4j.Logger logger,
java.io.OutputStream out)
For debugging purposes. |
void |
printStackTrace(int depth,
java.io.OutputStream out)
|
void |
putState(java.lang.Object key,
java.lang.Object val)
set a property in this StateMap |
void |
removeAll()
Remove all child containers from this one |
void |
removeAllStepChildren()
Remove all step children |
abstract void |
removeAllViews()
|
BContainer |
removeChild(BContainer child)
Remove a child container from this one |
BContainer |
removeChild(int index)
Remove a child container for a given index |
java.lang.Object |
removeState(java.lang.Object key)
remove a property in this StateMap |
abstract boolean |
removeView(View view)
|
abstract void |
render(ViewContext vc)
|
abstract void |
setAttr(java.lang.Object attr,
java.lang.Object val)
|
void |
setDefaultViewContext(ViewContext idvc)
Set the default ViewContext. |
abstract void |
setEnabled(boolean val)
|
abstract void |
setEnabled(boolean val,
boolean recurse)
|
abstract void |
setName(java.lang.String iname)
|
void |
setParent(BContainer iparent)
Set the parent container. |
void |
setPreventCaching(boolean val)
Tell the root component to prevent the DOM from caching when rendered to the client |
abstract void |
setView(View view)
|
abstract void |
setVisible(boolean val)
|
abstract void |
setVisible(boolean val,
boolean recurse)
|
abstract boolean |
supports(ViewContext vc)
|
java.lang.String |
toRef()
Get the component reference |
java.lang.String |
toString()
Get a String representation of the component |
java.lang.String |
toString(ViewContext vc)
Provide a String representation of the component. |
void |
validate()
Invalidates the container and all child containers below it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
protected BContainer parent
protected java.util.List children
protected java.util.List stepChildren
protected boolean isStepChild
protected java.util.List views
protected java.util.List tempViews
protected java.lang.Object dvc
protected boolean preventCaching
protected boolean validated
protected StateMap statemap
Constructor Detail |
public AbstractBComponent()
Method Detail |
public abstract void setName(java.lang.String iname)
setName
in interface BContainer
public abstract java.lang.String getName()
getName
in interface BContainer
public abstract void setVisible(boolean val)
public abstract void setVisible(boolean val, boolean recurse)
public abstract boolean isVisible()
public abstract void setEnabled(boolean val)
public abstract void setEnabled(boolean val, boolean recurse)
public abstract boolean isEnabled()
public abstract void setView(View view)
public abstract void addView(View view)
public abstract boolean removeView(View view)
public abstract void removeAllViews()
public abstract java.util.List getViews()
public abstract void setAttr(java.lang.Object attr, java.lang.Object val)
public abstract java.lang.Object getAttr(java.lang.Object attr)
public abstract java.util.Map getAttrMap()
public abstract void render(ViewContext vc) throws RenderException
RenderException
public abstract boolean supports(ViewContext vc)
public void setDefaultViewContext(ViewContext idvc)
public ViewContext getDefaultViewContext()
public void setPreventCaching(boolean val)
public boolean getPreventCaching()
public AbstractBComponent getRootComponent()
public static void installRendererFactory(RendererFactory rf, java.lang.Class compCl, java.lang.Class domCl)
rf
- the RendererFactory to be registeredcompCl
- the target document classdomCl
- the target dom classpublic Renderer getRenderer(View view) throws NoSuitableRendererException
NoSuitableRendererException
public Renderer getRenderer(java.lang.Class domCl) throws NoSuitableRendererException
NoSuitableRendererException
protected java.util.Map findComponentMap(java.lang.Class cl)
protected RendererFactory findRendererFactory(java.lang.Class cl, java.util.Map domMap)
public void initCycle()
public void destroyCycle()
public void setParent(BContainer iparent)
setParent
in interface BContainer
public BContainer getParent()
getParent
in interface BContainer
public void addChild(BContainer child)
addChild
in interface BContainer
child
- the child container to be addedpublic BContainer getChild(int index)
getChild
in interface BContainer
public BContainer removeChild(BContainer child)
removeChild
in interface BContainer
child
- the a child container to be removed
public BContainer removeChild(int index)
removeChild
in interface BContainer
index
- of the child container to be removed
public void removeAll()
removeAll
in interface BContainer
public boolean hasChildren()
hasChildren
in interface BContainer
public java.util.List getChildren()
getChildren
in interface BContainer
public boolean isStepChild()
public void addStepChild(BContainer child)
child
- the step child container to be addedpublic void addStepChild(BContainer child, boolean inheritParentAttrs)
child
- the step child container to be addedinheritParentAttrs
- true if we want the step child to
inherit the parent's settings for visibility/enabledpublic void removeAllStepChildren()
public void addTempView(View tview)
tview
- the temp view to be addedpublic boolean hasViews()
public void invalidate()
invalidate
in interface BContainer
public void validate()
validate
in interface BContainer
public void putState(java.lang.Object key, java.lang.Object val)
putState
in interface StateMap
key
- the state key objectval
- the state value objectpublic java.lang.Object getState(java.lang.Object key)
getState
in interface StateMap
key
- the state key object
public java.lang.Object removeState(java.lang.Object key)
removeState
in interface StateMap
key
- the key object
public java.util.List getStateKeys()
getStateKeys
in interface StateMap
public java.util.Map getStateValues()
getStateValues
in interface StateMap
public java.lang.String toRef()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(ViewContext vc)
public void printStackTrace(int depth, org.apache.log4j.Logger logger)
public void printStackTrace(int depth, java.io.OutputStream out)
protected void printStackTrace(int depth, org.apache.log4j.Logger logger, java.io.OutputStream out)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |