/** * Set the visibility. * * @param visible wether this component will show or not */ public void setVisible(boolean visible) { boolean old = this.visible; this.visible = visible; if (visible != old) { if (parent != null) { parent.reload(); } else { reload(); } propertyChangeSupport.firePropertyChange("visible", old, this.visible); setRecursivelyVisible(isRecursivelyVisible()); } }
/** * Removes the given component from the container. * * @param c the component to remove * @see #remove(org.wings.SComponent) */ public void remove(SComponent c) { if (c == null) return; if (layout != null) layout.removeComponent(c); int index = getComponentList().indexOf(c); if (getComponentList().remove(c)) { getConstraintList().remove(index); c.removeNotify(); fireContainerEvent(SContainerEvent.COMPONENT_REMOVED, c); c.setParent(null); reload(); } }
public void removeWindow(SWindow window) { if (!windowsPane.getComponentList().contains(window)) { return; } getSession().getReloadManager().setSuppressMode(true); windowsPane.remove(window); getSession().getReloadManager().setSuppressMode(false); if (isUpdatePossible() && SRootContainer.class.isAssignableFrom(getClass())) { update(((RootContainerCG) getCG()).getRemoveWindowUpdate(windowsPane, window)); } else { windowsPane.reload(); } }
/** * Push a new window on top of the stack. * * @param window the SDialog that is to be shown on top. */ public void pushWindow(SWindow window) { getSession().getReloadManager().setSuppressMode(true); windowsPane.addComponent(window); getSession().getReloadManager().setSuppressMode(false); if (isUpdatePossible() && SRootContainer.class.isAssignableFrom(getClass())) { update(((RootContainerCG) getCG()).getAddWindowUpdate(windowsPane, window)); } else { windowsPane.reload(); } LOG.debug("push window = " + window.getName()); }
fireContainerEvent(SContainerEvent.COMPONENT_ADDED, c); reload();