FlashCardsProject/build/build/src/jf/flashcards/address/view/FlashCardOverviewController.java
/**
     * gives functionality to the "add" button
     * if there is a selected item from the table, then this method will
     * call mainApp.showAddNewCardToStack() which will display the showAddNewCardToStack view 
     * after the card(s) have been added through the showAddNewCardToStack view 
     * the currentFlashCardStack is updated and the labels are set
     */
gives functionality to the "add" button
if there is a selected item from the table, then this method will
call mainApp.showAddNewCardToStack() which will display the showAddNewCardToStack view
after the card(s) have been added through the showAddNewCardToStack view
the currentFlashCardStack is updated and the labels are set
gives functionality to the " add " button if there is a selected item from the table then this method will call mainApp . showAddNewCardToStack () which will display the showAddNewCardToStack view after the card ( s ) have been added through the showAddNewCardToStack view the currentFlashCardStack is updated and the labels are set
@FXML
    private void addNewCard() {
    	if(currentSelectedString.equals(""))
    	{
    		 Alert alert = new Alert(AlertType.WARNING);
             alert.initOwner(mainApp.getPrimaryStage());
             alert.setTitle("No Selection");
             alert.setHeaderText("No Flash Card Stack Selected");
             alert.setContentText("Please select a stack in the table.");
             alert.showAndWait();
    	}
    	else
    	{
    		boolean cancelClicked = mainApp.showAddNewCardToStack(currentSelectedString);
    		if(cancelClicked)
    		{
    			currentFlashCardStack = FlashCardDatabase.getFlashCardStack(currentSelectedString);
    			if(!currentFlashCardStack.isEmpty() && frontCardLabel.getText().equals(""))
    			{
    				frontCardLabel.setText(currentFlashCardStack.get(listIndex).getFront());
    				frontShowing = true;
    				frontBackLabel.setText("Front");
    			}
    		}
    	}
    }
@ FXML private void addNewCard ( ) { if ( currentSelectedString . equals ( "" ) ) { Alert alert = new Alert ( AlertType . WARNING ) ; alert . initOwner ( mainApp . getPrimaryStage ( ) ) ; alert . setTitle ( "No Selection" ) ; alert . setHeaderText ( "No Flash Card Stack Selected" ) ; alert . setContentText ( "Please select a stack in the table." ) ; alert . showAndWait ( ) ; } else { boolean cancelClicked = mainApp . showAddNewCardToStack ( currentSelectedString ) ; if ( cancelClicked ) { currentFlashCardStack = FlashCardDatabase . getFlashCardStack ( currentSelectedString ) ; if ( ! currentFlashCardStack . isEmpty ( ) && frontCardLabel . getText ( ) . equals ( "" ) ) { frontCardLabel . setText ( currentFlashCardStack . get ( listIndex ) . getFront ( ) ) ; frontShowing = true ; frontBackLabel . setText ( "Front" ) ; } } } }
gives functionality to the "add" button
 if there is a selected item from the table, then this method will
 call mainApp.showAddNewCardToStack() which will display the showAddNewCardToStack view
 after the card(s) have been added through the showAddNewCardToStack view
 the currentFlashCardStack is updated and the labels are set
gives functionality to the " add " button if there is a selected item from the table then this method will call mainApp . showAddNewCardToStack () which will display the showAddNewCardToStack view after the card ( s ) have been added through the showAddNewCardToStack view the currentFlashCardStack is updated and the labels are set
//sets the labels if the stack was empty before 