コード例 #1
0
  private List<Ticket> getSelectedTickets() {
    List<Ticket> selectedTickets = openTicketList.getSelectedTickets();

    if (selectedTickets.size() == 0) {
      POSMessageDialog.showMessage("Silahkan pilih sedikitnya satu tiket");
      return null;
    }

    return selectedTickets;
  }
コード例 #2
0
  private Ticket getFirstSelectedTicket() {
    List<Ticket> selectedTickets = openTicketList.getSelectedTickets();

    if (selectedTickets.size() == 0 || selectedTickets.size() > 1) {
      POSMessageDialog.showMessage("Silahkan pilih tiket");
      return null;
    }

    return selectedTickets.get(0);
  }