Пример #1
0
 public static void updateNameHandler(
     BaseballCard baseballCard, String selection, String oldName, String newName) {
   Label label =
       new Label(
           "Congratulations you have changed the name of "
               + baseballCard.getName()
               + " from "
               + oldName
               + " to "
               + newName
               + " in collection "
               + selection);
   Scene scene = new Scene(label);
   Stage stage = new Stage();
   stage.setTitle("Update Name");
   stage.setScene(scene);
   stage.show();
 }
Пример #2
0
 public static void updatePriceHandler(
     BaseballCard baseballCard, String collection, double oldPrice, double newPrice, Stage s) {
   Label label =
       new Label(
           "Congratulations you have changed the price of "
               + baseballCard.getName()
               + " from "
               + oldPrice
               + " to "
               + newPrice
               + " in collection "
               + collection);
   Scene scene = new Scene(label);
   Stage stage = new Stage();
   stage.setTitle("Update Price");
   stage.setScene(scene);
   stage.show();
   s.close();
 }
Пример #3
0
 private static String playerInfo(BaseballCard baseballCard) {
   return "Player: "
       + baseballCard.getName()
       + " Manufacturer: "
       + baseballCard.getManufacturer()
       + " Year: "
       + baseballCard.getYear()
       + " Dimensions(x and y) "
       + baseballCard.getSizeX()
       + " "
       + baseballCard.getSizeY()
       + " Price: "
       + baseballCard.getPrice();
 }