Пример #1
0
 public void scarica(Torrent link) {
   ep.scaricaLink(link);
 }
Пример #2
0
  public PanelEpisodioDownload(Episodio e) {
    ep = e;
    setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    setSize(375, 95);
    setLayout(new BorderLayout(0, 0));

    JPanel panel = new JPanel();
    add(panel, BorderLayout.NORTH);
    panel.setLayout(new BorderLayout(0, 0));

    JPanel panel_5 = new JPanel();
    panel.add(panel_5, BorderLayout.WEST);

    chckbxnomeserie = new JCheckBox("<html><b>" + ep.getSerieTV().getNomeSerie() + "</b></html>");
    panel_5.add(chckbxnomeserie);
    chckbxnomeserie.setHorizontalAlignment(SwingConstants.CENTER);
    chckbxnomeserie.setSelected(true);

    JPanel panel_6 = new JPanel();
    panel.add(panel_6, BorderLayout.EAST);

    btnX = new JButton("");
    btnX.setIcon(new ImageIcon(PanelEpisodioDownload.class.getResource("/GUI/res/Xclose.png")));
    btnX.setPreferredSize(buttonSize);
    panel_6.add(btnX);

    JPanel panel_1 = new JPanel();
    add(panel_1, BorderLayout.SOUTH);
    panel_1.setLayout(new BorderLayout(0, 0));

    JPanel panel_3 = new JPanel();
    panel_1.add(panel_3, BorderLayout.EAST);

    btnInfo = new JButton("");
    btnInfo.setIcon(new ImageIcon(PanelEpisodioDownload.class.getResource("/GUI/res/info.png")));
    // TODO abilitare quando verrà creata la classe per TheTVDB
    btnInfo.setPreferredSize(buttonSize);
    btnInfo.setEnabled(false);
    panel_3.add(btnInfo);

    JPanel panel_2 = new JPanel();
    panel_1.add(panel_2, BorderLayout.CENTER);

    btnHd = new JButton("HD");
    btnHd.setEnabled(false);
    Torrent t_hd = ep.getLinkHD();
    if (t_hd != null) {
      if (t_hd.getScaricato() == Torrent.SCARICARE) btnHd.setEnabled(true);
    }
    panel_2.add(btnHd);

    btnSd = new JButton("SD");
    Torrent t_sd = ep.getLinkNormale();
    btnSd.setEnabled(false);
    if (t_sd != null) {
      if (t_sd.getScaricato() == Torrent.SCARICARE) btnSd.setEnabled(true);
    }
    panel_2.add(btnSd);

    btnPreair = new JButton("PreAir");
    btnPreair.setEnabled(false);
    Torrent t_pre = ep.getLinkPreair();
    if (t_pre != null) {
      if (t_pre.getScaricato() == Torrent.SCARICARE) btnPreair.setEnabled(true);
    }
    panel_2.add(btnPreair);

    JPanel panel_4 = new JPanel();
    add(panel_4, BorderLayout.WEST);

    JLabel lblStagione = new JLabel("<html>Stagione: </html>");
    panel_4.add(lblStagione);

    JLabel lblSeason = new JLabel("<html><b>" + ep.getStagione() + "</b></html>");
    panel_4.add(lblSeason);

    JLabel lblEpisodio = new JLabel("<html>Episodio:</html>");
    panel_4.add(lblEpisodio);

    JLabel lblEpisode = new JLabel("<html><b>" + ep.getEpisodio() + "</html></b>");
    panel_4.add(lblEpisode);

    addListener();
  }
Пример #3
0
 public ArrayList<Torrent> getLink() {
   ArrayList<Torrent> t = ep.getLinkDownload();
   return t;
 }