Java Code Examples for javafx.fxml.FXML

The following are top voted examples for showing how to use javafx.fxml.FXML. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ScrabbleGame   File: GameController.java   View source code 7 votes vote down vote up
/**
 * Opens a dialog to save the game
 */
@FXML
protected void handleSaveGame() {
    try {
        // Load game saving view
        FXMLLoader loader = new FXMLLoader();
        loader.setResources(this.scrabble.getI18nMessages());
        loader.setLocation(Scrabble.class.getResource("view/SaveGame.fxml"));
        VBox page = loader.load();

        // Create the dialog stage
        Stage dialogStage = new Stage();
        dialogStage.setMinWidth(SaveGameController.STAGE_WIDTH);
        dialogStage.setMaxWidth(SaveGameController.STAGE_WIDTH);
        dialogStage.setMinHeight(SaveGameController.STAGE_HEIGHT);
        dialogStage.setMaxHeight(SaveGameController.STAGE_HEIGHT);

        dialogStage.setTitle(this.scrabble.getI18nMessages().getString("save"));
        dialogStage.initModality(Modality.WINDOW_MODAL);
        dialogStage.initOwner(this.scrabble.getPrimaryStage());

        Scene scene = new Scene(page);
        dialogStage.setScene(scene);

        SaveGameController controller = loader.getController();
        controller.setDialogStage(dialogStage);
        controller.setScrabble(this.scrabble);

        dialogStage.showAndWait();
    } catch (IOException e) {
        this.scrabble.showGeneralApplicationError(e);
    }
}
 
Example 2
Project: UDE   File: Controller.java   View source code 6 votes vote down vote up
@FXML
private void handleMouseClicked(MouseEvent mouseEvent) {
    if(mouseEvent.getClickCount() == 1){
        try{
            TreeItem<String> item = treeview.getSelectionModel().getSelectedItem();
            Fx1.CurrDirName = item.getValue();
            System.out.println("Selected Text : " + item.getValue());
            Fx1.CurrDirFile = new File(Fx1.FindAbsolutePath(item,item.getValue()));
            Fx1.CurrDirStr = Fx1.CurrDirFile.getAbsolutePath();
            label.setText(Fx1.CurrDirStr);
            Fx2.tableview.getItems().clear();
            Fx2.CreateTableView();
            Fx3.CreateTiles();
            /**tableview.getItems().clear();
             CreateTableView();
             /**call some other function to activate createtableview() in corres controller */
        }catch(Exception x){
            System.out.println(x.getMessage());
        }
    }
    //Fx2.tableview.getItems().clear();
    //Fx2.CreateTableView();
}
 
Example 3
Project: ts-cards   File: TsCardExplorerController.java   View source code 6 votes vote down vote up
@FXML
private void onBtnChangePiccKeyClicked(ActionEvent event) {
    try {
        SmartcardIoTransmitter transmitter = SmartcardIoTransmitter.create();
        ApduSession session = new ApduSession();
        session.nextCommands(new GetVersion());
        session.transmit(transmitter);
            
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("fxml/ChangePiccKey.fxml")); 
        Parent root = (Parent)fxmlLoader.load(); 
        ChangePiccKeyController controller = fxmlLoader.<ChangePiccKeyController>getController();

        String curr_key = checkUseKeyDiv()
            ? edDiversificationKey.getText()
            : (edNoDivKey.isDisable()?"":edNoDivKey.getText());

        controller.setSession(session, historyData, checkUseKeyDiv(), curr_key,
                cbTypes.getValue().equals("AES"));

        Stage stage = new Stage();
        stage.setTitle("Change PICC Key");
        stage.setScene(new Scene(root, 450, 300));
        stage.showAndWait();
    } catch (Exception e) {
        lbResultTabApp.setText(e.getMessage());
    }
}
 
Example 4
Project: Money-Manager   File: MakeATransactionController.java   View source code 6 votes vote down vote up
@FXML
private void gmAmountValidation() {
	if (!validAmount(gmtxtAmount.getText())) {
		if (!gmtxtAmount.getText().isEmpty()) {
			gmlblWarningMsg.setText(InvalidInput);
			gmtxtAmount.clear();				
		}
	} else {
		
		gmlblWarningMsg.setText(" ");
		try {
			
			gmUpdateBalanceShow();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}
 
Example 5
Project: git-rekt   File: BrowseRoomsScreenController.java   View source code 6 votes vote down vote up
@FXML
private void onNextButtonClicked() {
    // Prevent proceeding when no rooms are selected
    if(selectedRooms.size() <= 0) {
        return;
    }

    Object temp = ScreenManager.getInstance().switchToScreen("/fxml/PlaceBookingScreen.fxml");
    PlaceBookingScreenController controller = (PlaceBookingScreenController) temp;
    Map<RoomCategory, Integer> roomsData = new HashMap<>();
    LocalDate checkInDate = checkInDatePicker.getValue();
    LocalDate checkOutDate = checkOutDatePicker.getValue();
    selectedRooms.forEach((r) -> {
        roomsData.merge(r.getRoomCategory(), 1, Integer::sum);
    });
    controller.initializeData(roomsData, this.packageQtys, checkInDate, checkOutDate);
}
 
Example 6
Project: scratch-bench   File: KController.java   View source code 6 votes vote down vote up
@FXML
 private void emailcheck(KeyEvent k)
 {
 String c=k.getCharacter();
if(c.equals(" "))
{
     k.consume();
}
  String EMAIL_REGEX = "^[\\w-_\\.+]*[\\w-_\\.]\\@([\\w]+\\.)+[\\w]+[\\w]$";
   if(userNameTF.getText().matches(EMAIL_REGEX))
   {
   validateFalseLabel.setVisible(false);
   validateTrueLabel.setVisible(true);
   validateTrueLabel.setText("Kindly click on Login");
   b=true;
   }
   else
   {
       validateTrueLabel.setVisible(false);
       validateFalseLabel.setVisible(true);
       validateFalseLabel.setText("Invalid E-Mail Format");
       b=false;
   }
  
      
 }
 
Example 7
Project: cemu_UI   File: MainWindowController.java   View source code 6 votes vote down vote up
@FXML
void romTFBtnAction(ActionEvent event) {
	File romDirectory = directoryChooser.showDialog(main.getPrimaryStage());
	if (romDirectory == null) {
		LOGGER.info("No Directory selected");
	} else {
		setRomPath(romDirectory.getAbsolutePath());
		saveSettings();
		cemuTextField.setText(getCemuPath());
		try {
			Runtime.getRuntime().exec("java -jar cemu_UI.jar"); // start again
			System.exit(0); // finishes itself
		} catch (IOException e) {
			LOGGER.error("an error occurred", e);
		}
	}
}
 
Example 8
Project: Calculadora-JavaFx   File: Controller.java   View source code 6 votes vote down vote up
@FXML
private void processDot(ActionEvent event) {

    //Impede que pontos (vírgula) sejam concatenados como resultado de uma operação
    if (start) {
        output.setText("");
        start = false;
    }

    //Impede que o ponto (vírgula) seja clicada mais de uma vez
    if (dot) {
        return;
    }

    //Impede que inicie um número clicando no ponto (vírgula)
    if (!number1Value) {
        return;
    }

    String value = ((Button) event.getSource()).getText();
    output.setText(output.getText() + value);
    dot = true;
}
 
Example 9
Project: OpenDiabetes   File: MainGuiController.java   View source code 6 votes vote down vote up
@FXML
private void handleButtonBrowseGoogleFit(ActionEvent event) {
    Stage stage = (Stage) ap.getScene().getWindow();
    File lastPath = new File(prefs.get(Constants.IMPORTER_GOOGLE_FIT_IMPORT_PATH_KEY + 0, ""));

    FileChooser fileChooser = new FileChooser();
    configureFileChooser(fileChooser, lastPath, Constants.CSV_EXTENSION_FILTER);
    List<File> files = fileChooser.showOpenMultipleDialog(stage);

    if (files != null && !files.isEmpty()) {
        StringBuilder sb = new StringBuilder();
        files.forEach((item) -> {
            sb.append(item.getAbsolutePath()).append(Constants.MULTI_FILE_PATH_DELIMITER);
        });
        googleFitTextField.setText(sb.toString().substring(0, sb.length() - 1));
        googleFitCheckBox.setSelected(true);
    }
}
 
Example 10
Project: mountieLibrary   File: MainWindowController.java   View source code 6 votes vote down vote up
/**
 * Handles logout request, and return the user to the login screen.
 * @param event The event that trigger this function.
 * @throws IOException If the fxml was not found.
 */
@FXML public void logoutUser(ActionEvent event) throws IOException
{
    //Close current window, and go back to login screen
    Stage stage = (Stage) menuBar.getScene().getWindow();
    stage.close();
    
    Stage stage2 = new Stage();
    Parent root2 = FXMLLoader.load(getClass().getResource("/dataBaseLogin/MountieLib.fxml"));
    Scene scene2 = new Scene(root2);
    stage2.setScene(scene2);
    stage2.getIcons().add(new Image("images/titleIcon.png"));
    stage2.initModality(Modality.NONE);
    stage2.show();
}
 
Example 11
Project: Planchester   File: EditNonMusicalEventController.java   View source code 6 votes vote down vote up
@FXML
@Override
protected boolean cancel() {
    String pointRef = (initEventDutyDTO.getPoints() != null)? String.valueOf(initEventDutyDTO.getPoints()) : "0.0";
    if(!name.getText().equals(initEventDutyDTO.getName())
            || !description.getText().equals(initEventDutyDTO.getDescription())
            || !date.getValue().equals(initEventDutyDTO.getEndTime().toLocalDateTime().toLocalDate())
            || !startTime.getValue().equals(initEventDutyDTO.getStartTime().toLocalDateTime().toLocalTime())
            || !endTime.getValue().equals(initEventDutyDTO.getEndTime().toLocalDateTime().toLocalTime())
            || !eventLocation.getText().equals(initEventDutyDTO.getLocation())
            || !points.getText().equals(pointRef)) {

        Alert confirmationAlertMessage = new Alert(Alert.AlertType.CONFIRMATION, PlanchesterMessages.DISCARD_CHANGES, ButtonType.YES, ButtonType.NO);
        confirmationAlertMessage.showAndWait();
        if (confirmationAlertMessage.getResult() == ButtonType.NO) {
            return false;
        }
    }
    // remove content of sidebar
    EventScheduleController.resetSideContent();
    EventScheduleController.removeSelection(initAppointment);
    return true;
}
 
Example 12
Project: AlphaLab   File: FrmCliente.java   View source code 6 votes vote down vote up
@FXML
void btnExcluir_onAction(ActionEvent event) {
	if (tblClientes.getSelectionModel().getSelectedIndex() >= 0) {
		dlgConfirmacao.setTitle("CONFIRMAÇÃO");
		dlgConfirmacao.setContentText("Tem certeza que deseja excluir?\nEsta operação não poderá ser desfeita.");
		Optional<ButtonType> result = dlgConfirmacao.showAndWait();
		if (result.isPresent() && result.get() == bttSim) {
			cliente.delete(tblClientes.getSelectionModel().getSelectedItem());
			btnProcurar.fire();
			lblStatus.setText("Cliente excluído com sucesso.");
		}
	} else {
		dlgMensagem.setTitle("ERRO DE SELEÇÃO");
		dlgMensagem.setContentText("É preciso selecionar um cliente da tabela para poder realizar a exclusão.");
		dlgMensagem.showAndWait();
	}
}
 
Example 13
Project: AlphaLab   File: ManutencaoSoftware.java   View source code 5 votes vote down vote up
@FXML
public void btnEditarOnAction(ActionEvent evt) {
    SoftwareEntity tmpSoftware = getSoftwareSelected();
    if (tmpSoftware != null) {
        setSoftware(tmpSoftware);
        tbpGerenciaSoftware.getSelectionModel().select(tabSoftware);
    }
}
 
Example 14
Project: hygene   File: LoggingSettingsViewController.java   View source code 5 votes vote down vote up
/**
 * When the user changes the log level and new {@link Runnable} command is added to {@link Settings}.
 * <p>
 * Command run when the user applies the change in setting.
 *
 * @param event action event
 */
@FXML
public void onLogLevelChanged(final ActionEvent event) {
    settings.addRunnable(() -> {
        final String logLevel = choiceBox.getSelectionModel().getSelectedItem();

        final Logger logger = LogManager.getRootLogger();
        Configurator.setLevel(logger.getName(), Level.toLevel(logLevel));

        LOGGER.info("Log level was set to: " + Level.toLevel(logLevel));
    });

    event.consume();
}
 
Example 15
Project: H-Uppaal   File: LocationController.java   View source code 5 votes vote down vote up
@FXML
private void mouseExited() {
    final LocationPresentation locationPresentation = (LocationPresentation) this.root;
    if(!locationPresentation.isInteractable()) return;

    circle.setCursor(Cursor.DEFAULT);

    locationPresentation.animateHoverExited();

    KeyboardTracker.unregisterKeybind(KeyboardTracker.MAKE_LOCATION_URGENT);
    KeyboardTracker.unregisterKeybind(KeyboardTracker.MAKE_LOCATION_COMMITTED);
}
 
Example 16
Project: shuffleboard   File: MainWindowController.java   View source code 5 votes vote down vote up
@FXML
private void loadPlayback() throws IOException {
  FileChooser chooser = new FileChooser();
  chooser.setInitialDirectory(Storage.getRecordingDir());
  chooser.getExtensionFilters().setAll(
      new FileChooser.ExtensionFilter("Shuffleboard Data Recording", "*.sbr"));
  final File selected = chooser.showOpenDialog(root.getScene().getWindow());
  if (selected == null) {
    return;
  }
  Playback playback = Playback.load(selected.getAbsolutePath());
  playback.start();
}
 
Example 17
Project: ts-cards   File: TsCardExplorerController.java   View source code 5 votes vote down vote up
@FXML
private void onBtnSelectAppClicked(ActionEvent event) {
    StatusResponse status = null;
    try {
        SmartcardIoTransmitter transmitter = SmartcardIoTransmitter.create();
        ApduSession session = new ApduSession();
        Object selectedItem = tbViewAppIDs.getSelectionModel().getSelectedItem();
        SelectApplication selectAppCmd = new SelectTsApplication();
        String aid = "";
        if (selectedItem != null) {
            aid = ((ApplicationModel)selectedItem).getId();
            selectAppCmd = new SelectApplication(Hex.decode(aid));
        }
        session.nextCommands(
                new GetVersion(),
                selectAppCmd
        );
        status = session.transmit(transmitter);
        
        String uid = getParamValueByKey(session, DesfireGetCardUID.CARD_UID_KEY);
        String receivedData = "AID: " + getParamValueByKey(session, SelectTsApplication.AID_KEY);
        historyData.add(0, new HistoryModel(
            status.getStatus().name(),//status
            "SelectTsApplication",//action
            uid,//uid
            receivedData));//received data

        if (status.getStatus() == ApduStatus.SUCCESS) {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("fxml/AuthenticateApp.fxml")); 
            Parent root = (Parent)fxmlLoader.load(); 
            AuthenticateAppController controller = fxmlLoader.<AuthenticateAppController>getController();
            controller.setSession(session, historyData);
            Stage stage = new Stage();
            stage.setTitle("Authenticate App - [" + aid + "]");
            stage.setScene(new Scene(root, 450, 300));
            stage.showAndWait();
        }

    } catch (Exception e) {
        lbResultTabApp.setText(e.getMessage());
    }

}
 
Example 18
Project: pandemie   File: IndexController.java   View source code 5 votes vote down vote up
@FXML

    private void handleButtonStopAction(ActionEvent event) {
        this.servChat.stopServer();
        this.servJeu.stopServer();
        statusChatLbl.setText("down");
        statusChatLbl.setTextFill(Color.BROWN);
        statusGameLbl.setText("down");
        statusGameLbl.setTextFill(Color.BROWN);
        startBtn.setDisable(false);
        restartBtn.setDisable(true);
        stopBtn.setDisable(true);
    }
 
Example 19
Project: Money-Manager   File: SettingsController.java   View source code 5 votes vote down vote up
@FXML
private void systemtxtRePassword() {
	if (systemtxtPassword.getText().length() <= systemtxtRePassword.getText().length()) {
		if (!systemtxtRePassword.getText().equals(systemtxtPassword.getText())) {
			systemlblWarningMsg.setText("Password didn't match");
		}
	} else {
		systemlblWarningMsg.setText("");
	}
}
 
Example 20
Project: CSLMusicModStationCreator   File: ContextEntryEditor.java   View source code 5 votes vote down vote up
@FXML
private void addSong() {
    String s = songToAdd.getText().trim();

    if(!s.isEmpty() && !songs.getItems().contains(s) ) {
        songs.getItems().add(s);
        songToAdd.setText("");
    }
}
 
Example 21
Project: ScrabbleGame   File: GameController.java   View source code 5 votes vote down vote up
/**
 * Helps the player to play his turn by playing the best turn possible for him
 */
@FXML
protected void handleAskHelp() {
    this.controlButtons.setDisable(true);
    this.playerLettersContainer.setDisable(true);

    HumanPlayerInterface currentPlayer = (HumanPlayerInterface) this.scrabble.getCurrentPlayer();

    Task<SortedMap<BoardPosition, LetterInterface>> bestTurnTaskFinder = ArtificialIntelligenceHelper.getBestTurnPossible(this.scrabble.getLanguage(), this.scrabble.getBoard(), currentPlayer);

    bestTurnTaskFinder.setOnSucceeded(event -> {
        if (null != bestTurnTaskFinder.getValue()) {
            try {
                this.scrabble.playLetters(bestTurnTaskFinder.getValue());
                currentPlayer.decreaseAvailableHelps();

                return;
            } catch (InvalidPlayedTurnException ignored) {
            }
        }

        this.askHelpButton.setDisable(true);
        this.controlButtons.setDisable(false);
        this.playerLettersContainer.setDisable(false);

        this.showAlertOfNoBestTurnPossible();
    });

    new Thread(bestTurnTaskFinder).start();
}
 
Example 22
Project: Money-Manager   File: TransactionHistoryController.java   View source code 5 votes vote down vote up
@FXML
private void mnuSettings(ActionEvent event) {
	(new TabAccess()).setTabName("tabBank");
	Stage TransactionHistoryStage = (Stage) btnSignOut.getScene().getWindow();
	(new GoToOperation()).goToSettings(TransactionHistoryStage.getX(), TransactionHistoryStage.getY());
	TransactionHistoryStage.close();
}
 
Example 23
Project: Dr-Assistant   File: HomeController.java   View source code 5 votes vote down vote up
@FXML
private void handleBuyMeCoffee(ActionEvent event) throws IOException {
    FXMLLoader fXMLLoader = new FXMLLoader();
    fXMLLoader.setLocation(getClass().getResource("/view/other/Donate.fxml"));
    Stage stage = new Stage();
    Scene scene = new Scene(fXMLLoader.load());
    stage.setScene(scene);
    stage.setTitle("Buy me a coffee");
    stage.show();

}
 
Example 24
Project: Money-Manager   File: TransactionHistoryController.java   View source code 5 votes vote down vote up
@FXML
private void mnuSourceSettings(ActionEvent event) {
	(new TabAccess()).setTabName("tabSource");
	Stage TransactionHistoryStage = (Stage) btnSignOut.getScene().getWindow();
	(new GoToOperation()).goToSettings(TransactionHistoryStage.getX(), TransactionHistoryStage.getY());
	TransactionHistoryStage.close();
}
 
Example 25
Project: hygene   File: GraphNavigationController.java   View source code 5 votes vote down vote up
/**
 * When the user wants to zoom out by a single hop.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void zoomOutAction(final ActionEvent actionEvent) {
    graphMovementCalculator.onScroll(SCROLL_DELTA);

    actionEvent.consume();
}
 
Example 26
Project: spring2017java   File: FXMLDocumentController.java   View source code 5 votes vote down vote up
@FXML
private void handleDeleteAction(ActionEvent event) {
    ObservableList<Integer> selectedIndices = ownersListView.getSelectionModel().getSelectedIndices();
    
    for (int i = 0; i < selectedIndices.size(); i++) {
        try {
            Connection connection = DriverManager
                    .getConnection("jdbc:mysql://172.17.0.134/propertydb",
                            "javauser",
                            "java");
            Statement statement = connection.createStatement();
            int propertyId = ownersList.get(selectedIndices.get(i)).getPropertyId();
            String ownersName = ownersList.get(selectedIndices.get(i)).getOwnersName();
            statement.executeUpdate("DELETE FROM property WHERE propertyId = "
                    + propertyId + " AND ownersName = '"
                    + ownersName + "'");
            ownersList.remove(selectedIndex);
            statusLabel.setText("Deleted " + propertyId + " " + ownersName);
            propertyIdField.clear();
            ownersNameField.clear();
        } catch (SQLException sqle) {
            Alert alert = new Alert(AlertType.ERROR);
            alert.setTitle("Error message");
            alert.setHeaderText("Database error");
            alert.setContentText("Could not connect to the database");
            alert.showAndWait();
            System.err.println("Cannot connect to the database");
        }
    }
}
 
Example 27
Project: Money-Manager   File: MakeATransactionController.java   View source code 5 votes vote down vote up
@FXML
private void exbtnAdvancedSaveAndAdd(ActionEvent event) {
	if (total == 0) {
		exlblAdvWarningMsg.setText("Empty or Zero is not approved.");
	} else {
		TextField AdvancedExtxt[] = {extxtAdvSector1, extxtAdvSector2, extxtAdvSector3, extxtAdvSector4, 
				extxtAdvSector5, extxtAdvSector6, extxtAdvSector7 };
		
		Label AdvancedExlbl[] = {exlblAdvSector1, exlblAdvSector2, exlblAdvSector3, exlblAdvSector4, 
				exlblAdvSector5, exlblAdvSector6, exlblAdvSector7 };
		
		int index = 0;
		for (TextField textField : AdvancedExtxt) {
			if ((!textField.getText().isEmpty()) && (!textField.getText().equals("0"))) {
				exAdvSaveFunction(textField.getText(), AdvancedExlbl[index].getText());
			}
			++index;
		}
		
		exInitialize();
		extxtAdvancedDescription.clear();
		
		Alert confirmationMsg = new Alert(AlertType.INFORMATION);
		confirmationMsg.setTitle("Successfull Transaction");
		confirmationMsg.setHeaderText(null);
		confirmationMsg.setContentText("Your transaction completed successfully.");
		Stage MakeATransactionStage = (Stage) exbtnSave.getScene().getWindow();
		confirmationMsg.setX(MakeATransactionStage.getX() + 200);
		confirmationMsg.setY(MakeATransactionStage.getY() + 170);
		confirmationMsg.showAndWait();
	}
}
 
Example 28
Project: SensorThingsManager   File: ControllerCollection.java   View source code 5 votes vote down vote up
@FXML
private void actionAdd(ActionEvent event) {
    if (childSetter == null) {
        new Alert(Alert.AlertType.ERROR, "No childSetter defined.", ButtonType.CLOSE).showAndWait();
        return;
    }
    Class<T> entityClass = query.getEntityClass();
    Query<T> allQuery = new Query<>(query.getService(), entityClass);
    Optional<List<T>> result = EntityGuiController.entitySearchDialog(allQuery, true);
    if (result.isPresent() && !result.get().isEmpty()) {
        List<T> newChildren = result.get();
        childSetter.setChildren(newChildren);
    }
}
 
Example 29
Project: CDN-FX-2.2   File: SettingsController.java   View source code 5 votes vote down vote up
@FXML
protected void chbxTDClickedDefaultTikFolder(){
    if(chbxTDDefaultTikFolder.isSelected()){
        btnTDTikFolder.setDisable(false);
    }else{
        btnTDTikFolder.setDisable(true);
        PropertiesHandler.setProperties("", "tdtikfolder");
    }
}
 
Example 30
Project: Java-9-Programming-Blueprints   File: CloudNoticeManagerController.java   View source code 5 votes vote down vote up
@FXML
public void addRecipient(ActionEvent event) {
    final Recipient recipient = new Recipient();
    recips.add(recipient);
    recipList.getSelectionModel().select(recipient);
    type.requestFocus();
}
 
Example 31
Project: Squid   File: ExpressionBuilderController.java   View source code 5 votes vote down vote up
@FXML
private void resetButtonAction(ActionEvent event) {
    redoListForExpressionTextFlow.clear();
    undoListForExpressionTextFlow.clear();
    expressionTextFlow.getChildren().clear();
    updateButtons();
    makeAndAuditExpression();
}
 
Example 32
Project: AlphaLab   File: FrmConsultarHorario.java   View source code 5 votes vote down vote up
@FXML
void cmbLaboratorio_onAction(ActionEvent event) {
	if (!cmbLaboratorio.getSelectionModel().isEmpty()) {
		cmbDisciplina.getSelectionModel().select(-1);
		cmbProfessor.getSelectionModel().select(-1);
		filtrarReservas();
		tblConsultarHorario.refresh();
	}
}
 
Example 33
Project: uPMT   File: MainViewController.java   View source code 5 votes vote down vote up
@FXML
public void showExtract() {
	try {
		if (!extraitEntretien.getText().isEmpty()) {
			ShowTextWindow win = new ShowTextWindow(extraitEntretien.getText());
			win.show();
		}
	} catch (Exception e) {
		System.out.println("No DATA to display");
	}
}
 
Example 34
Project: IP1   File: DashboardController.java   View source code 5 votes vote down vote up
@FXML
private void logout(ActionEvent event) throws IOException {
    stage = (Stage) label.getScene().getWindow();
    root = FXMLLoader.load(getClass().getResource("/callib/Views/Login.fxml"));
    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.show();
}
 
Example 35
Project: recruitervision   File: CvFilesWindowController.java   View source code 5 votes vote down vote up
@FXML
private void addCvFile() {
    fileChooser.setInitialDirectory(new File(CommonUtils.USER_DIR));
    if (Boolean.valueOf(props.getDEFAULT_PATH_CHK())) {
        File file = new File(props.getDEFAULT_PATH());
        fileChooser.setInitialDirectory(file);
    }
    List<File> files = fileChooser.showOpenMultipleDialog(Start.getStage());
    if (files != null) {
        addFilesToTable(files);
    }
}
 
Example 36
Project: Planchester   File: InstrumentationController.java   View source code 5 votes vote down vote up
@FXML
private void removeMusicalWorkFromSelected() {
    String selecetdItem = tableSelected.getSelectionModel().getSelectedItem();
    if(selecetdItem != null && selecetdItem != "" ) {
        tableSelected.getItems().remove(tableSelected.getSelectionModel().getFocusedIndex());
        tableAvailable.getItems().add(selecetdItem);
    }
}
 
Example 37
Project: ServerBrowser   File: ServerListController.java   View source code 5 votes vote down vote up
@FXML
private void toggleFavouritesMode() {
	serverTable.setPlaceholder(new Label(""));
	serverTable.setServerTableMode(SampServerTableMode.FAVOURITES);
	serverTable.clear();
	serverTable.addAll(FavouritesController.getFavourites());
}
 
Example 38
Project: j-demo   File: ScreenshotController.java   View source code 5 votes vote down vote up
@FXML
public void removeImage() {
    db.removeDB(CloudHost.getPublicID(previewImageUrl));
    cloudHost.deleteImage(CloudHost.getPublicID(previewImageUrl)); //удаление с сервера
    contentGallery();
    reloadContentGallery();
    Platform.runLater(() -> {
        imagePreview.setImage(null);
        previewImageUrl = null;
    });
}
 
Example 39
Project: LIRE-Lab   File: CreateCollectionController.java   View source code 5 votes vote down vote up
@FXML
private void chooseImagesDirectory(ActionEvent event) {
    Window owner = getWindowFrom(event);
    File dir = dialogProvider.chooseImagesDirectory(owner);
    if (dir != null) {
        imagesDirectoryField.setText(dir.getAbsolutePath());
    }
}
 
Example 40
Project: Money-Manager   File: HelpController.java   View source code 5 votes vote down vote up
@FXML
private void mnuCreateSource(ActionEvent event) {
	(new TabAccess()).setTabName("tabSource");
	Stage HelpStage = (Stage) btnSignOut.getScene().getWindow();
	(new GoToOperation()).goToSettings(HelpStage.getX(), HelpStage.getY());
	HelpStage.close();
}