public void setAlgebraView(final AlgebraViewW av) { if (av != aview) { if (aview != null && simplep != null) { simplep.remove(aview); algebrap.remove(simplep); } simplep = new SimplePanel(aview = av); algebrap.add(simplep); simplep.addStyleName("algebraSimpleP"); algebrap.addStyleName("algebraPanel"); algebrap.addDomHandler( new ClickHandler() { public void onClick(ClickEvent event) { int bt = simplep.getAbsoluteTop() + simplep.getOffsetHeight(); if (event.getClientY() > bt) { app.getSelectionManager().clearSelectedGeos(); av.resetItems(true); } ; } }, ClickEvent.getType()); } }
public void setWidget(Widget w) { // If there is already a widget, remove it. if (child != null) sp.remove(child); // Add the widget to the center of the cell. if (w != null) sp.setWidget(w); child = w; }
public boolean remove(Widget w) { if (child != w) { return false; } sp.remove(w); return true; }
public void setAlgebraView(AlgebraViewW av) { if (av != aview) { if (aview != null && simplep != null) { simplep.remove(aview); algebrap.remove(simplep); } simplep = new SimplePanel(aview = av); algebrap.add(simplep); } }