|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComposerExt<T extends Component>
An addition interface implemented with Composer
to provide
more control.
Note: any class that implements ComposerExt
must implement
Composer
, but not vice-versa.
FullComposer
Method Summary | |
---|---|
ComponentInfo |
doBeforeCompose(Page page,
Component parent,
ComponentInfo compInfo)
Invokes before composing a component. |
void |
doBeforeComposeChildren(T comp)
Invokes after the component is instantiated and initialized, but before composing any child. |
boolean |
doCatch(java.lang.Throwable ex)
Called when an exception occurs when composing the component. |
void |
doFinally()
Called after the component has been composed completely. |
Method Detail |
---|
ComponentInfo doBeforeCompose(Page page, Component parent, ComponentInfo compInfo) throws java.lang.Exception
ComponentInfo.duplicate()
to make a copy and then
modify it such that it won't affect the default behavior.
page
- the page for composing this component.parent
- the parent component, or null if it is the root component.compInfo
- the component info used to instantiate the component.
java.lang.Exception
void doBeforeComposeChildren(T comp) throws java.lang.Exception
comp
- the component being composed
java.lang.Exception
boolean doCatch(java.lang.Throwable ex) throws java.lang.Exception
If you don't want to handle the exception, simply returns false.
boolean doCatch(Throwable ex) {return false;}
An exception thrown in this method is simply logged. It has no effect on the execution. If you want to ignore the exception, just return true.
ex
- the exception being thrown
java.lang.Exception
void doFinally() throws java.lang.Exception
Note: it is always called even if doCatch(java.lang.Throwable)
,
doBeforeComposeChildren(T)
or
Composer.doAfterCompose(T)
is not called (due to exceptions).
Note: it is called after the onCreate event is posted, but before the onCreate and any other events are handled.
An exception thrown in this method is simply logged. It has no effect on the execution.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |