@Test(timeout=10000L) public void testObserveFoldersSubfolder() throws Exception { BoxFolder folder = nav.createFolder("folder"); nav.commit(); BoxNavigation navFolder3 = nav.navigate(folder); navFolder3.createFolder("subFolder"); navFolder3.commit(); TreeItem rootNode = getRoot(); waitUntil(() -> rootNode.getChildren().size() == 1); TreeItem subnode = (TreeItem) rootNode.getChildren().get(0); waitUntil(() -> loadChildren((FolderTreeItem) subnode).size() == 1); }
private void createFolder(TreeItem<BoxObject> item) { if (item == null || !(item instanceof FolderTreeItem)) { return; } TextInputDialog dialog = new TextInputDialog(resourceBundle.getString("remoteFsName")); dialog.setHeaderText(null); dialog.setTitle(resourceBundle.getString("remoteFsCreateFolder")); dialog.setContentText(resourceBundle.getString("remoteFsFolderName")); Optional<String> result = dialog.showAndWait(); new Thread(() -> { result.ifPresent(name -> { FolderTreeItem lazyItem = (FolderTreeItem) item; try { createFolder(lazyItem.getPath().resolve(name)); } catch (QblStorageException e) { alert("Failed to create Folder", e); } }); }).start(); }
RemoteFSController extends AbstractController implements Initializable { private void createFolder(TreeItem<BoxObject> item) { if (item == null || !(item instanceof FolderTreeItem)) { return; } TextInputDialog dialog = new TextInputDialog(resourceBundle.getString("remoteFsName")); dialog.setHeaderText(null); dialog.setTitle(resourceBundle.getString("remoteFsCreateFolder")); dialog.setContentText(resourceBundle.getString("remoteFsFolderName")); Optional<String> result = dialog.showAndWait(); new Thread(() -> { result.ifPresent(name -> { FolderTreeItem lazyItem = (FolderTreeItem) item; try { createFolder(lazyItem.getPath().resolve(name)); } catch (QblStorageException e) { alert("Failed to create Folder", e); } }); }).start(); } }
RemoteFSController extends AbstractController implements Initializable { private void createFolder(TreeItem<BoxObject> item) { if (item == null || !(item instanceof FolderTreeItem)) { return; } TextInputDialog dialog = new TextInputDialog(resourceBundle.getString("remoteFsName")); dialog.setHeaderText(null); dialog.setTitle(resourceBundle.getString("remoteFsCreateFolder")); dialog.setContentText(resourceBundle.getString("remoteFsFolderName")); Optional<String> result = dialog.showAndWait(); new Thread(() -> { result.ifPresent(name -> { FolderTreeItem lazyItem = (FolderTreeItem) item; try { createFolder(lazyItem.getPath().resolve(name)); } catch (QblStorageException e) { alert("Failed to create Folder", e); } }); }).start(); }  }
RemoteFSController extends AbstractController implements Initializable { private void createFolder(TreeItem<BoxObject> item) { if (item == null || !(item instanceof FolderTreeItem)) { return; } TextInputDialog dialog = new TextInputDialog(resourceBundle.getString("remoteFsName")); dialog.setHeaderText(null); dialog.setTitle(resourceBundle.getString("remoteFsCreateFolder")); dialog.setContentText(resourceBundle.getString("remoteFsFolderName")); Optional<String> result = dialog.showAndWait(); new Thread(() -> { result.ifPresent(name -> { FolderTreeItem lazyItem = (FolderTreeItem) item; try { createFolder(lazyItem.getPath().resolve(name)); } catch (QblStorageException e) { alert("Failed to create Folder", e); } }); }).start(); }  @Override void initialize(URL location, ResourceBundle resources); }
RemoteFSController extends AbstractController implements Initializable { private void createFolder(TreeItem<BoxObject> item) { if (item == null || !(item instanceof FolderTreeItem)) { return; } TextInputDialog dialog = new TextInputDialog(resourceBundle.getString("remoteFsName")); dialog.setHeaderText(null); dialog.setTitle(resourceBundle.getString("remoteFsCreateFolder")); dialog.setContentText(resourceBundle.getString("remoteFsFolderName")); Optional<String> result = dialog.showAndWait(); new Thread(() -> { result.ifPresent(name -> { FolderTreeItem lazyItem = (FolderTreeItem) item; try { createFolder(lazyItem.getPath().resolve(name)); } catch (QblStorageException e) { alert("Failed to create Folder", e); } }); }).start(); }  @Override void initialize(URL location, ResourceBundle resources); static final int OPTION_EDGE_SIZE; }