How about?

```java

@Override
    public void setInSlot(Object slot, Widget content) {
        if (content == null) { 
            main.clear();
        } else if (slot == ApplicationPresenter.TYPE_SetMainContent) {
            main.clear();
            main.add(content);
        } else {
          super.setInSlot(slot, content);
        }
    }