|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 List |
children
|
protected Object |
dvc
|
protected boolean |
isStepChild
|
protected static org.apache.log4j.Logger |
logger
|
protected BContainer |
parent
|
protected StateMap |
statemap
|
protected List |
stepChildren
|
protected List |
tempViews
|
protected boolean |
validated
|
protected 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 |
clearState()
clear all state information |
void |
destroyCycle()
Destroy cycle. |
protected Map |
findComponentMap(Class cl)
Look for a factory that can render either this class or its parent class. |
protected RendererFactory |
findRendererFactory(Class cl,
Map domMap)
Look for a factory that can render either this class or its parent class. |
abstract Object |
getAttr(Object attr)
|
abstract Map |
getAttrMap()
|
BContainer |
getChild(int index)
Get a child container at a given index |
List |
getChildren()
Gets a list of all child BContainers. |
ViewContext |
getDefaultViewContext()
Get the default ViewContext. |
abstract String |
getName()
|
BContainer |
getParent()
Get the parent container. |
Renderer |
getRenderer(Class domCl)
|
Renderer |
getRenderer(View view)
This method allows a component to get a reference to the appropriate renderer. |
AbstractBComponent |
getRootComponent()
|
Object |
getState(Object key)
get a property in this StateMap |
List |
getStateKeys()
get a list of the keys for this StateMap |
Map |
getStateValues()
get a copy of the underlying Map |
abstract 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,
Class compCl,
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,
OutputStream out)
For debugging purposes. |
void |
printStackTrace(int depth,
OutputStream out)
|
void |
putState(Object key,
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 |
Object |
removeState(Object key)
remove a property in this StateMap |
abstract boolean |
removeView(View view)
|
abstract void |
render(ViewContext vc)
|
abstract void |
setAttr(Object attr,
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(String iname)
|
void |
setParent(BContainer iparent)
Set the parent container. |
abstract void |
setView(View view)
|
abstract void |
setVisible(boolean val)
|
abstract void |
setVisible(boolean val,
boolean recurse)
|
abstract boolean |
supports(ViewContext vc)
|
String |
toRef()
Get the component reference |
String |
toString()
Get a String representation of the component |
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 final org.apache.log4j.Logger logger
protected BContainer parent
protected List children
protected List stepChildren
protected boolean isStepChild
protected List views
protected List tempViews
protected Object dvc
protected boolean validated
protected StateMap statemap
Constructor Detail |
public AbstractBComponent()
Method Detail |
public abstract void setName(String iname)
setName
in interface BContainer
public abstract 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 List getViews()
public abstract void setAttr(Object attr, Object val)
public abstract Object getAttr(Object attr)
public abstract Map getAttrMap()
public abstract void render(ViewContext vc) throws RenderException
RenderException
public abstract boolean supports(ViewContext vc)
public void setDefaultViewContext(ViewContext idvc)
idvc
- the default ViewContextpublic ViewContext getDefaultViewContext()
public AbstractBComponent getRootComponent()
public static void installRendererFactory(RendererFactory rf, Class compCl, 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(Class domCl) throws NoSuitableRendererException
NoSuitableRendererException
protected Map findComponentMap(Class cl)
protected RendererFactory findRendererFactory(Class cl, Map domMap)
public void initCycle()
public void destroyCycle()
public void setParent(BContainer iparent)
setParent
in interface BContainer
iparent
- the parent containerpublic 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
index
- the index of the child containerpublic 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 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(Object key, Object val)
putState
in interface StateMap
key
- the state key objectval
- the state value objectpublic Object getState(Object key)
getState
in interface StateMap
key
- the state key object
public Object removeState(Object key)
removeState
in interface StateMap
key
- the key object
public List getStateKeys()
getStateKeys
in interface StateMap
public Map getStateValues()
getStateValues
in interface StateMap
public void clearState()
clearState
in interface StateMap
public String toRef()
public String toString()
public String toString(ViewContext vc)
public void printStackTrace(int depth, org.apache.log4j.Logger logger)
public void printStackTrace(int depth, OutputStream out)
protected void printStackTrace(int depth, org.apache.log4j.Logger logger, OutputStream out)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |