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:
Any help here would be really appreciated.
BorderLayout mainLayout = new BorderLayout()
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 would like to just MIMIC a button click on the toolbar button.