Package tvbrowser.extras.favoritesplugin.core

Examples of tvbrowser.extras.favoritesplugin.core.Favorite


      return;
    }

    Program[] programs = mProgramList.getSelectedPrograms();

    Favorite fav;

    if(mFavoritesList != null) {
      fav = (Favorite) mFavoritesListModel.get(mFavoritesList.getSelectedIndex());
    }
    else if(programs == null) {
      programs = ((FavoriteNode)mFavoriteTree.getSelectionPath().getLastPathComponent()).getAllPrograms(true);

      if(programs.length < 1) {
        programs = ((FavoriteNode)mFavoriteTree.getSelectionPath().getLastPathComponent()).getAllPrograms(false);
      }

      fav = null;
    }
    else {
      fav = null;
    }

    if (fav != null && (programs == null || programs.length == 0)) {
      programs = mShowNew ? fav.getNewPrograms() : fav.getWhiteListPrograms();
    }

    SendToPluginDialog send = new SendToPluginDialog(null, (Window)this, programs);

    send.setVisible(true);
View Full Code Here


    send.setVisible(true);
  }


  protected void newFavorite(FavoriteNode parent) {
    Favorite favorite;
    if (FavoritesPlugin.getInstance().isUsingExpertMode()) {
      favorite = new AdvancedFavorite("");
      EditFavoriteDialog dlg = new EditFavoriteDialog(this, favorite);
      UiUtilities.centerAndShow(dlg);
View Full Code Here

  public void addFavorite(Favorite fav, Object dummy) {
    mFavoritesListModel.addElement(fav);
  }

  protected void editSelectedFavorite() {
    Favorite fav = null;
    FavoriteNode node = null;
    if(mFavoritesList != null) {
      fav = (Favorite) mFavoritesList.getSelectedValue();
    }
    else {
View Full Code Here

      if(mFavoriteTree.getSelectionPath() != null && ((FavoriteNode)mFavoriteTree.getSelectionPath().getLastPathComponent()).containsFavorite()) {
        selection = 0;
      }
    }
    if (selection != -1) {
      Favorite fav;
      FavoriteNode parent = null;
      if(mFavoritesList != null) {
        fav = (Favorite) mFavoritesListModel.get(selection);
        mFavoritesListModel.remove(selection);
      }
      else {
        FavoriteNode node = ((FavoriteNode)mFavoriteTree.getSelectionPath().getLastPathComponent());
        fav = node.getFavorite();
        parent = (FavoriteNode) node.getParent();
      }

      if (JOptionPane.showConfirmDialog(this,
              FavoritesPlugin.mLocalizer.msg("reallyDelete", "Really delete favorite '{0}'?", fav.getName()),
              mLocalizer.msg("delete", "Delete selected favorite..."),
              JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {

        FavoriteTreeModel.getInstance().deleteFavorite(fav);
View Full Code Here

    {
      Component c = super.getListCellRendererComponent(list, value, index, isSelected,
          cellHasFocus);

      if (value instanceof Favorite && c instanceof JLabel) {
        Favorite fav = (Favorite)value;
        ((JLabel)c).setText(fav.getName() + " (" + (mShowNew ? fav.getNewPrograms().length : fav.getWhiteListPrograms().length) + ")");

        if(mShowNew && fav.getNewPrograms().length > 0 && !isSelected) {
          c.setForeground(Color.red);
        }
      }
      return c;
    }
View Full Code Here

TOP

Related Classes of tvbrowser.extras.favoritesplugin.core.Favorite

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.