Example #1
0
 private void jButtonSaveDescriptionActionPerformed(java.awt.event.ActionEvent evt) {
   // TODO add your handling code here:
   Movie movie = dvx_player.getMovie();
   movie.setMovieDescription(jTextFieldMovieDescription.getText());
   movie.setMovieName(jTextFieldMovieName.getText());
   dvx_player.getDvxDBSupport().updateMovie(dvx_player.getMovie());
   dispose();
 }
Example #2
0
  /** Creates new form MovieDescription */
  public MovieDescription(DVX_Player dvx_player) {
    this.dvx_player = dvx_player;
    initComponents();

    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    // Determine the new location of the window
    int w = getSize().width;
    int h = getSize().height;
    int x = (dim.width - w) / 2;
    int y = (dim.height - h) / 2;

    // Move the window
    setLocation(x, y);

    jTextFieldMovieDescription.setText(dvx_player.getMovie().getMovieDescription());
    jTextFieldMovieID.setText("" + dvx_player.getMovie().getMovieId());
    jTextFieldMovieName.setText(dvx_player.getMovie().getMovieName());
    jTextFieldMovieSBNNumber.setText(dvx_player.getMovie().getMovieSbnNumber());
  }
Example #3
0
  private void jButtonPlayDescriptionActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:

    if (new File(
            DVX_Constants.MOVIE_PATH
                + // is there a .wav file with the name
                jTextFieldMovieSBNNumber.getText()
                + DVX_Constants.MOVIE_MENUS_PATH
                + DVX_Constants.MOVIE_NAME_WAV)
        .exists()) // recorded version...
    {
      DVX_PlaySound.playWav(
          DVX_Constants.MOVIE_PATH
              + jTextFieldMovieSBNNumber.getText()
              + DVX_Constants.MOVIE_MENUS_PATH
              + DVX_Constants.MOVIE_NAME_WAV,
          true);
    } else {
      dvx_player.getDvxSpeak().speak("No movie description audio file found.");
    }
  }