コード例 #1
0
ファイル: ReviewDialog.java プロジェクト: rokstrnisa/RokClock
 /**
  * A helper function that obtains the total number of hours for the selected period.
  *
  * @return Total number of hours.
  * @throws InsufficientDataException Thrown if the total is zero.
  */
 private double checkTotal() throws InsufficientDataException {
   double total = Double.parseDouble(totalLabel.getText());
   if (total == 0) throw new InsufficientDataException("Cannot submit data with no logged hours.");
   return total;
 }