Package devplugin

Examples of devplugin.ProgramReceiveTarget


        else {
          return "internalWikipedia";
        }
      }
      else if (mValue instanceof ProgramReceiveTarget) {
        ProgramReceiveTarget target = (ProgramReceiveTarget)mValue;
        return target.getReceiveIfId() + "#_#_#" + target.getTargetId();
      }

      return "internalWikipedia";
    }
View Full Code Here


    return false;
  }

  @Override
  public ProgramReceiveTarget[] getProgramReceiveTargets() {
    return new ProgramReceiveTarget[] { new ProgramReceiveTarget(this,
        mLocalizer.msg("pluginName", "Growl Notification"), GROWL_TARGET_ID) };
  }
View Full Code Here

    return true;
  }

  @Override
  public ProgramReceiveTarget[] getProgramReceiveTargets() {
    return new ProgramReceiveTarget[] { new ProgramReceiveTarget(this, mLocalizer.msg("programTarget", "Program list"),
        "program list") };
  }
View Full Code Here

    return true;
  }

  public ProgramReceiveTarget[] getProgramReceiveTargets() {
    if (canReceiveProgramsWithTarget()) {
      final ProgramReceiveTarget target = new ProgramReceiveTarget(this,
          mLocalizer.msg("targetName", "Show with KNotify"), TARGET);
      return new ProgramReceiveTarget[] { target };
    }
    return null;
  }
View Full Code Here

      browserChannelMap.put(browserChannel, service);
    }

    receiveTargets = new ProgramReceiveTarget[stream.readInt()];
    for (int targetIndex = 0; targetIndex < receiveTargets.length; targetIndex++) {
      receiveTargets[targetIndex] = new ProgramReceiveTarget(stream);
    }

    for (int timers = stream.readInt(); timers > 0; timers--) {
      timerEntries.add(new TopfieldTimerEntry(stream));
    }
View Full Code Here

      mConfigs[0] = DEFAULT_CONFIG;
    }

    for (ExporterIf exporter : exporters) {
      for (AbstractPluginProgramFormating formating : mConfigs) {
        targets.add(new ProgramReceiveTarget(this, exporter.getName() + (mConfigs.length > 1 ? " - " + formating.getName() : ""), exporter.getClass().getName() + ";;;" + formating.getId()));
      }
    }

    return targets.toArray(new ProgramReceiveTarget[targets.size()]);
  }
View Full Code Here

    if(version == 3) {
      mClientPluginTargets = new ProgramReceiveTarget[in.readInt()];

      for(int i = 0; i < mClientPluginTargets.length; i++) {
        mClientPluginTargets[i] = new ProgramReceiveTarget(in);
      }
    }
  }
View Full Code Here

                        }
                      }
                    }
                  }
                  else {
                    ProgramReceiveTarget receiveTarget = target.getProgramReceiveTarget();
                    receiveTarget.getReceifeIfForIdOfTarget().receivePrograms(p,receiveTarget);
                  }
                }
              }
            } else if (flavors[0].getHumanPresentableName().equals("Program")) {
              PluginProxy[] pa = PluginProxyManager.getInstance().getActivatedPlugins();
View Full Code Here

    for (InternalPluginProxyIf internalProxy : InternalPluginProxyList.getInstance().getAvailableProxys()) {
      if (internalProxy instanceof ProgramReceiveIf) {
        final ProgramReceiveIf receiveProxy = (ProgramReceiveIf) internalProxy;
        if(receiveProxy.canReceiveProgramsWithTarget() && o != internalProxy) {
          final ProgramReceiveTarget target = receiveProxy.getProgramReceiveTargets()[0];
          JMenuItem item = new JMenuItem(target.getTargetName());
          item.setFont(MenuUtil.CONTEXT_MENU_PLAINFONT);
          item.setIcon(internalProxy.getIcon());
          menu.add(item);
          item.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
              Program[] programs = collectProgramsFromNode(node);
              if ((programs != null) &&(programs.length > 0)) {
                receiveProxy.receivePrograms(programs, target);
              }
            }
          });
        }
      }
    }

    PluginProxy[] plugins = PluginProxyManager.getInstance().getActivatedPlugins();
    for (final PluginProxy plugin : plugins) {
     if ((plugin.canReceiveProgramsWithTarget())
          && plugin.getProgramReceiveTargets() != null
          && plugin.getProgramReceiveTargets().length > 0) {
        if ((currentPlugin == null) || (!currentPlugin.getId().equals(plugin.getId()))) {
          ProgramReceiveTarget[] targets = plugin.getProgramReceiveTargets();
          if (!plugin.canReceiveProgramsWithTarget()) {
            JMenuItem item = new JMenuItem(plugin.getInfo().getName());
            item.setFont(MenuUtil.CONTEXT_MENU_PLAINFONT);

            Icon icon = plugin.getPluginIcon();

            item.setIcon(icon != null ? icon : null);
            menu.add(item);
            item.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                Program[] programs = collectProgramsFromNode(node);
                if ((programs != null) && (programs.length > 0)) {
                  plugin.receivePrograms(programs, ProgramReceiveTarget.createDefaultTargetForProgramReceiveIfId(plugin.getId()));
                }
              }
            });
          } else if (targets.length == 1 && (!(o instanceof ProgramReceiveTarget) || !o.equals(targets[0]))) {
            JMenuItem item = new JMenuItem(targets[0].toString());
            item.setFont(MenuUtil.CONTEXT_MENU_PLAINFONT);

            Icon icon = plugin.getPluginIcon();

            item.setIcon(icon != null ? icon : null);
            menu.add(item);

            final ProgramReceiveTarget target = targets[0];

            item.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                Program[] programs = collectProgramsFromNode(node);
                if ((programs != null) && (programs.length > 0)) {
                  plugin.receivePrograms(programs, target);
                }
              }
            });
          } else if (targets.length >= 1) {
            JMenu subMenu = new JMenu(plugin.getInfo().getName());
            subMenu.setFont(MenuUtil.CONTEXT_MENU_PLAINFONT);

            Icon icon = plugin.getPluginIcon();

            subMenu.setIcon(icon != null ? icon : null);
            menu.add(subMenu);

            for (final ProgramReceiveTarget target : targets) {
              if (o == null || !o.equals(target)) {
                JMenuItem item = new JMenuItem(target.toString());
                item.setFont(MenuUtil.CONTEXT_MENU_PLAINFONT);
                subMenu.add(item);

                item.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent e) {
View Full Code Here

    getReminderInstance().addPrograms(programArr);
    return true;
  }

  public ProgramReceiveTarget[] getProgramReceiveTargets() {
    return new ProgramReceiveTarget[] { new ProgramReceiveTarget(this,
        mLocalizer.msg("programTarget", "Remind"), PROGRAM_TARGET_REMIND) };
  }
View Full Code Here

TOP

Related Classes of devplugin.ProgramReceiveTarget

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.