Sorry, I posted this over in bugs and meant to post it here...
Is there a way to mimic a toolbar button (">>") click without the user actually clicking it?
Let me explain...
I've got a BorderLayout with a West panel that collapses. If you click on the collapse panel itself,
it opens the West container in a popup (normal behavior). If you click on the toolbar button (">>"), it opens the left panel like normal (not as a popup, also normal behavior).
I really don't want the popup effect. So what I've done is this is override the createCollapsePanel method and add an onClick event on the collapsed panel itself. Then in this onClick event I then just want to mimic clicking the toolbar button (">>").
Here is how I'm attempting to do it:
BorderLayout mainLayout = new BorderLayout()
/*should this class be moved to it's own file?*/
protected CollapsePanel createCollapsePanel(ContentPanel panel
, BorderLayoutData data)
CollapsePanel p = super.createCollapsePanel(panel, data);
p.addListener(Events.OnClick, new Listener<BaseEvent>()
public void handleEvent(BaseEvent baseEvent)
// really want to MIMIC clicking the toolbar button here.
Any help here would be really appreciated.