But if I implement this Window-like panel by extending Border
I have no way to notify the collapse/expand events to the containing content
.
In my previous implementation , the AbstractPullDownPanel defines two
methods invisible()/visible() for successor to override , if they want to
handle the
add(new link(collapseOrExpand) {
onclick() {
expanded=!expanded;
updateState(expanded);
Border.this.visitChildren(new IVisitor() {
public int onComponent(Component c) {
if (c instanceof ExpandCollapseListener) {
On Wed, 04 Feb 2009, smallufo wrote:
When traversalling the nodes , it cannot find any Component that implements
ExpandCollapseListener.
But the Panel that wrapped by the Border indeed implements
ExpandCollapseListener
PulldownBorder.this.visitChildren(new IVisitor()
...
Here is
2009/2/4 Igor Vaynberg igor.vaynb...@gmail.com
PulldownBorder border = new PulldownBorder(border , Test Title ,
true);
border.setTransparentResolver(true);
add(border);
^ that is all wrong
you should create a border and to it add a panel that will be
expanded/collapsed. so the panel
PulldownBorder border = new PulldownBorder(border , Test Title ,
true);
border.setTransparentResolver(true);
add(border);
^ that is all wrong
you should create a border and to it add a panel that will be
expanded/collapsed. so the panel that is the content should be inside
the border.
Thank you for such a practical IVisitor tutorial.
But I have another problem :
When traversalling the nodes , it cannot find any Component that implements
ExpandCollapseListener.
But the Panel that wrapped by the Border indeed implements
ExpandCollapseListener
Can you check where goes wrong ?