private void refreshList() { // If in offline mode if (connection == null) { searchWithScriptsMenu.setDisable(true); } else if (connection.getProperties() == null) { logger.warn("Connection's properties are null"); } else if (connection.getProperties().getConfiguredProperties() == null) { logger.warn("Connection's configured properties are null"); } else { final String directory = connection.getProperties().getConfiguredProperties().getSearchScripts(); if (directory != null && !directory.isEmpty()) { scriptManager.addScripts(directory); onScriptListChange(); } } }
@FXML private void initialize() { if (Tela.usuarioAtivo.getGrad() == -1) { menuAluno.setDisable(true); menuProfessor.setDisable(true); } else if (Tela.usuarioAtivo.getGrad() == 0) { menuAluno.setDisable(true); menuCadastros.setDisable(true); } else { menuProfessor.setDisable(true); menuCadastros.setDisable(true); } }
/** Disable specified menus. */ public void disbbleMenus() { statistics.setDisable(true); closeFile.setDisable(true); }
/** Enable specified menus. */ public void enableMenus() { statistics.setDisable(false); closeFile.setDisable(false); }