/** * Causes to refresh this nodes children asynchronously. * * <p>If {@link #setCleanRefreshNeeded(boolean)} has been set to true before, this will also cause * to recreate all child nodes and display a "Please Wait ..."-Node during the loading. Otherwise * no wait node will be displayed during loading. */ public synchronized void refresh() { if (!isLeaf()) { // do nothing for leaf nodes having no children at all. if (cleanRefreshNeeded) { LOGGER.info("Doing a clean refresh on node " + getDisplayName()); synchronized (childFactory) { childFactory = childFactoryCreator.create(); setChildren(Children.create(childFactory, true)); cleanRefreshNeeded = false; } } else { childFactory.refresh(); } } }
/** * Check whether there is currently some asynch loading of children still going on. * * @return true if background thread is still loading any children. */ public synchronized boolean isLoading() { return childFactory.isLoading(); }