From db4a06e652114082d15de9e07092b25e53278a94 Mon Sep 17 00:00:00 2001 From: Vikram Date: Mon, 11 Mar 2019 19:36:23 -0600 Subject: [PATCH] javadocs update. --- .idea/workspace.xml | 103 ++++++++++++++++++++++++----------------- src/TaipanShopGUI.java | 85 +++++++++++++++++++++++++++++----- 2 files changed, 133 insertions(+), 55 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d983782..5152d4d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,10 @@ - + + + + @@ -22,7 +25,7 @@ - + @@ -47,21 +50,21 @@ - + - + - - + + - - + + @@ -79,8 +82,8 @@ - - + + @@ -133,11 +136,11 @@ continue cashTex cashTe - run loan get loa warehouse warehouse\n + run HP @@ -149,7 +152,7 @@ - @@ -164,13 +167,13 @@ - + - @@ -703,7 +720,6 @@ - @@ -728,7 +744,8 @@ - @@ -782,7 +799,7 @@ - + @@ -807,29 +824,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -847,6 +841,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TaipanShopGUI.java b/src/TaipanShopGUI.java index 148e703..f5a8562 100644 --- a/src/TaipanShopGUI.java +++ b/src/TaipanShopGUI.java @@ -401,8 +401,13 @@ public class TaipanShopGUI { buyButton.setPrefHeight(25.0); buyButton.setPrefWidth(45.0); buyButton.setText("Buy"); - // if the buy button is clicked, the main utility buttons are set to be invisible and the buying process begins. buyButton.setOnAction(new EventHandler() { + + /** + * if the buy button is clicked, the main utility buttons are set to be invisible and the buying process begins. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { buttonSetup("shop"); @@ -416,6 +421,12 @@ public class TaipanShopGUI { sellButton.setText("Sell"); // if the sell button is clicked, the main utility buttons are set to be invisible and the selling process begins. sellButton.setOnAction(new EventHandler() { + + /** + * if the sell button is clicked, the main utility buttons are set to be invisible and the selling process begins. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { buttonSetup("shop"); @@ -428,8 +439,13 @@ public class TaipanShopGUI { sellButton.setMnemonicParsing(false); bankButton.setPrefHeight(25.0); - // opens the bank if the bank button is clicked. bankButton.setOnAction(new EventHandler() { + + /** + * opens the bank if the bank button is clicked. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { BankGUI bank = new BankGUI(getPlayer()); @@ -445,8 +461,13 @@ public class TaipanShopGUI { cargoButton.setText("Transfer"); cargoButton.setMnemonicParsing(false); cargoButton.setPrefWidth(94.0); - // warehouse is entered when the warehouse button is clicked. cargoButton.setOnAction(new EventHandler() { + + /** + * warehouse is entered when the warehouse button is clicked. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { WarehouseGUI warehouseGUI = new WarehouseGUI(player); @@ -459,8 +480,13 @@ public class TaipanShopGUI { loanButton.setMnemonicParsing(false); loanButton.setPrefHeight(25.0); loanButton.setPrefWidth(73.0); - // loan office is entered when the loan button is clicked. loanButton.setOnAction(new EventHandler() { + + /** + * loan office is entered when the loan button is clicked. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { LoanSharkGUI loan = new LoanSharkGUI(getPlayer()); @@ -474,8 +500,13 @@ public class TaipanShopGUI { quitButton.setMnemonicParsing(false); quitButton.setPrefWidth(90.0); quitButton.setText("Quit"); - // the user is free to travel once the quit button is clicked. quitButton.setOnAction(new EventHandler() { + + /** + * the user is free to travel once the quit button is clicked. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { player.setIsPriceChanged(1); @@ -490,8 +521,13 @@ public class TaipanShopGUI { retireButton.setPrefWidth(49.0); retireButton.setText("Retire"); retireButton.setVisible(false); - // the user wins the game when the retire button is clicked. retireButton.setOnAction(new EventHandler() { + + /** + * the user wins the game when the retire button is clicked. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { retire(stage); @@ -504,8 +540,13 @@ public class TaipanShopGUI { opiumButton.setPrefHeight(25.0); opiumButton.setText("Opium"); opiumButton.setVisible(false); - // the opium buying/selling process starts as soon as the user clicks the opium button. opiumButton.setOnAction(new EventHandler() { + + /** + * the opium buying/selling process starts as soon as the user clicks the opium button. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { buttonSetup("input"); @@ -526,8 +567,13 @@ public class TaipanShopGUI { silkButton.setMnemonicParsing(false); silkButton.setText("Silk"); silkButton.setVisible(false); - // the silk buying/selling process starts as soon as the user clicks the silk button. silkButton.setOnAction(new EventHandler() { + + /** + * the silk buying/selling process starts as soon as the user clicks the silk button. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { buttonSetup("input"); @@ -546,8 +592,13 @@ public class TaipanShopGUI { armsButton.setPrefWidth(86.0); armsButton.setMnemonicParsing(false); armsButton.setVisible(false); - // the arms buying/selling process starts as soon as the user clicks the arms button. armsButton.setOnAction(new EventHandler() { + + /** + * the arms buying/selling process starts as soon as the user clicks the arms button. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { buttonSetup("input"); @@ -570,8 +621,13 @@ public class TaipanShopGUI { generalButton.setPrefWidth(86.0); generalButton.setText("General"); generalButton.setVisible(false); - // the general cargo buying/selling process starts as soon as the user clicks the general cargo button. generalButton.setOnAction(new EventHandler() { + + /** + * the general cargo buying/selling process starts as soon as the user clicks the general cargo button. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(ActionEvent event) { buttonSetup("input"); @@ -590,9 +646,14 @@ public class TaipanShopGUI { numberInput.setAlignment(javafx.geometry.Pos.CENTER_RIGHT); numberInput.setText("Enter amount here..."); numberInput.setVisible(false); - // after the user inputs a valid input into the text field and presses Z or ENTER, the buying/selling ends and - // the user is returned to the regular shop dialogue. numberInput.setOnKeyPressed(new EventHandler() { + + /** + * after the user inputs a valid input into the text field and presses Z or ENTER, the buying/selling ends + * and the user is returned to the regular shop dialogue. + * + * @param event -- the event corresponding to the button click + */ @Override public void handle(KeyEvent event) { boolean exit = true;