Examples of Participant


Examples of javax.media.rtp.Participant

      StringBuffer sb= new StringBuffer();

      sb.append( timestamp + " RR");

      if( rr != null) {
    Participant participant= rr.getParticipant();

    if( participant != null) {
        sb.append( " from " + participant.getCNAME());
        sb.append( " ssrc=" + rr.getSSRC());
    } else {
        sb.append( " ssrc=" + rr.getSSRC());
    }
View Full Code Here

Examples of javax.media.rtp.Participant

   * @see javax.media.rtp.ReceiveStreamListener#update(javax.media.rtp.event.ReceiveStreamEvent)
   */
  public void update(ReceiveStreamEvent evt) {
    log.debug("RTPStreamReceiver.update");
   
    Participant participant = evt.getParticipant()// could be null.
    stream = evt.getReceiveStream()// could be null.

    if (evt instanceof RemotePayloadChangeEvent) {
      
        System.err.println("  - Received an RTP PayloadChangeEvent.");
        System.err.println("Sorry, cannot handle payload change.");
        System.exit(0);
    }
     
    else if (evt instanceof NewReceiveStreamEvent) {

        try {
          stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
         
          synchronized (dataSync) {
            dataReceived = true;
            dataSync.notifyAll();
        }
 
        } catch (Exception e) {
      System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
      return;
        }
         
    }

    else if (evt instanceof ByeEvent) {

         System.err.println("  - Got \"bye\" from: " + participant.getCNAME());
      
    }
  }
View Full Code Here

Examples of javax.media.rtp.Participant

    {
    }

  public void update(ReceiveStreamEvent evt)
    {
    Participant participant = evt.getParticipant()// could be null.
    ReceiveStream stream = evt.getReceiveStream()// could be null.
   
    if (evt instanceof RemotePayloadChangeEvent)
      {
      throw new RuntimeException("Change of RTP stream payload is not supported");
      }
    else if (evt instanceof NewReceiveStreamEvent)
      {
      }
    else if (evt instanceof StreamMappedEvent)
      {
      Player player = null;
      try
        {
        player = Manager.createPlayer(stream.getDataSource());
        }
      catch (IOException e)
        {
        throw new RuntimeException(e);
        }
      catch (NoPlayerException e)
        {
        throw new RuntimeException(e);
        }
      player.start();
      try
        {
        if (participant != null)
        in.put(participant.getCNAME(),player);
        }
      catch (Exception e)
        {
        throw new RuntimeException(e);
        }
      }
    else if (evt instanceof ByeEvent)
      {
      try
        {
        ((Player)in.get(participant.getCNAME())).close();
        in.remove(participant.getCNAME());
        }
      catch (Exception e)
        {
        throw new RuntimeException(e);
        }
View Full Code Here

Examples of net.sf.chellow.physical.Participant

      if (idStr.length() > 0) {
        id = new Long(idStr);
      }
      String participantCode = GeneralImport.addField(csvElement,
          "Participant Code", values, 1);
      Participant participant = Participant
          .getParticipant(participantCode);
      String name = GeneralImport.addField(csvElement, "Name", values, 2);

      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 3);
View Full Code Here

Examples of net.sourceforge.torchlight.core.data.campaign.Participant

       
        if(obj instanceof Participant)
        {
            logger.debug("obj is a Participant");
           
            Participant p = (Participant)obj;

            p.setName(page1.getParticipantName());
            p.setRole(page1.getRole());
           
            p.setCampaign(campaign);
           
            return true;
        }
       
        return false;
View Full Code Here

Examples of net.sourceforge.torchlight.core.data.campaign.Participant

                public void widgetSelected(SelectionEvent event)
                {
                    try
                    {
                        logger.info("Creating participant...");
                        Participant p = (Participant)DataManager.getDataManager().createDataInstance(Participant.class, true, NewPlayerCharacterWizard.this.campaign, null);
                        logger.debug("p: " + p);

                        if(p != null)
                        {
                            participant.add(p.getLabel());
                        }
                    }
                    catch(Exception e)
                    {
                        MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), res.getLocaleString("campaign.error.create_player_character.title"), res.getLocaleString("campaign.error.create_player_character.message") + "\n\n" + e.getLocalizedMessage());
View Full Code Here

Examples of net.sourceforge.torchlight.core.data.campaign.Participant

            return pcName.getText();
        }
       
        public Participant getParticipant()
        {
            Participant p = null;
           
            try
            {
                p = NewPlayerCharacterWizard.this.campaign.getParticipants().elementAt(participant.getSelectionIndex());
            }
View Full Code Here

Examples of net.sourceforge.torchlight.core.data.campaign.Participant

    {
        Label label;
       
        logger.debug("creating controls");
       
        final Participant p = ((ParticipantEditorInput)getEditorInput()).getParticipant();
       
        SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);
       
        Composite leftSide = new Composite(sashForm, SWT.NONE);
        new Sash(sashForm, SWT.NONE);
        Composite rightSide = new Composite(sashForm, SWT.NONE);
       
        sashForm.setWeights(new int[] { 65, 35 });
       
        // create a generic focus listener that saves the object when focus is lost
        FocusListener saveObjectFocusListener = new FocusListener() {
      public void focusGained(FocusEvent event)
      {
          logger.trace("focus gained: " + event);
      }

      public void focusLost(FocusEvent event)
      {
          logger.debug("focus lost: " + event);
         
          try
                {
              Participant p = ((ParticipantEditorInput)getEditorInput()).getParticipant();
             
                  logger.info("Saving participant: " + p);
                    DataStore.getDataStore().saveObject(p, null);
                }
                catch(DataPersistenceException e)
                {
                    logger.error("exception while saving participant: " + e.getLocalizedMessage(), e);
                   
                    MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), res.getLocaleString("campaign.editor.error.save_participant.title"), res.getLocaleString("campaign.editor.error.save_participant.message"));
                }
      }
        };

        {
            GridLayout layout = new GridLayout();
            layout.numColumns = 4;
            leftSide.setLayout(layout);

            // name
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.name.label"));

            name = new Text(leftSide, SWT.BORDER);
            name.setText(p.getName());
            name.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            name.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e)
                {
                    logger.debug("modifying participant name");

                    p.setName(name.getText());

                    dirty = true;

                    ParticipantEditor.this.setPartName(res.getLocaleString("participant.editor.title.tab") + ": " + ((ParticipantEditorInput)getEditorInput()).getParticipant().getName());
                }
            });
            name.addFocusListener(saveObjectFocusListener);

            // role
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.role.label"));

            role = new Combo(leftSide, SWT.READ_ONLY | SWT.DROP_DOWN);
            role.add(res.getLocaleString("participant.role.player"));
            role.add(res.getLocaleString("participant.role.dm"));
            role.select(IApplicationConstants.DUNGEON_MASTER_ROLE.equals(p.getRole()) ? 1 : 0);
            role.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            role.addSelectionListener(new SelectionListener() {
                public void widgetDefaultSelected(SelectionEvent e)
                {
                    // do nothing
                }

                public void widgetSelected(SelectionEvent e)
                {
                    logger.debug("modifying participant role");

                    int selection = role.getSelectionIndex();

                    if(selection == 1)
                        p.setRole(IApplicationConstants.DUNGEON_MASTER_ROLE);
                    else
                        p.setRole(IApplicationConstants.PLAYER_ROLE);

                    dirty = true;
                }
            });
            role.addFocusListener(saveObjectFocusListener);

            // address
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.address.label"));
           
            address = new Text(leftSide, SWT.BORDER | SWT.MULTI);
            {
                GridData gd = new GridData(GridData.FILL_BOTH);
                gd.horizontalSpan = 3;
                address.setLayoutData(gd);
            }
            address.setSize(0, 50); // TODO: better determination?
            address.setText(p.getAddress());
            address.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e)
                {
                    logger.debug("modifying participant address");
                   
                    p.setAddress(name.getText());
                   
                    dirty = true;
                }
            });
            address.addFocusListener(saveObjectFocusListener);
           
            // home phone
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.home_phone.label"));
           
            homePhone = new Text(leftSide, SWT.BORDER);
            homePhone.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            homePhone.setText(p.getHomePhone());
            homePhone.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e)
                {
                    logger.debug("modifying participant home phone");
                   
                    p.setHomePhone(name.getText());
                   
                    dirty = true;
                }
            });
            homePhone.addFocusListener(saveObjectFocusListener);
           
            // mobile phone
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.mobile_phone.label"));
           
            mobilePhone = new Text(leftSide, SWT.BORDER);
            mobilePhone.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            mobilePhone.setText(p.getMobilePhone());
            mobilePhone.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e)
                {
                    logger.debug("modifying participant mobile phone");
                   
                    p.setMobilePhone(name.getText());
                   
                    dirty = true;
                }
            });
            mobilePhone.addFocusListener(saveObjectFocusListener);

            // email
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.email.label"));
           
            email = new Text(leftSide, SWT.BORDER);
            {
                GridData gd = new GridData(GridData.FILL_HORIZONTAL);
                gd.horizontalSpan = 3;
                email.setLayoutData(gd);
            }
            email.setText(p.getEmail());
            email.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e)
                {
                    logger.debug("modifying participant email");
                   
                    p.setEmail(name.getText());
                   
                    dirty = true;
                }
            });
            email.addFocusListener(saveObjectFocusListener);

            // notes
            label = new Label(leftSide, SWT.RIGHT);
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
            label.setText(res.getLocaleString("participant.editor.notes.label"));
           
            notes = new Text(leftSide, SWT.BORDER | SWT.MULTI);
            {
                GridData gd = new GridData(GridData.FILL_BOTH);
                gd.horizontalSpan = 3;
                notes.setLayoutData(gd);
            }
            notes.setText(p.getAddress());
            notes.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e)
                {
                    logger.debug("modifying participant notes");
                   
                    p.setAddress(name.getText());
                   
                    dirty = true;
                }
            });
            notes.addFocusListener(saveObjectFocusListener);
View Full Code Here

Examples of net.sourceforge.torchlight.core.data.campaign.Participant

    {
        logger.debug("matches? editorRef: " + editorRef + "; input: " + input);
       
        if(input instanceof ParticipantEditorInput)
        {
            Participant p = (Participant)((ParticipantEditorInput)input).getParticipant();
            logger.trace("p: " + p);
           
            if(p != null)
            {
                return true;
View Full Code Here

Examples of net.sourceforge.torchlight.core.data.campaign.Participant

        }

        try
        {
            logger.info("Creating participant...");
            Participant p = (Participant)DataManager.getDataManager().createDataInstance(Participant.class, runWizard, section.getCampaign(), null);
            logger.debug("p: " + p);

            if(p != null)
            {
                logger.debug("saving object: " + p);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.