Package captureplugin.drivers.utils

Examples of captureplugin.drivers.utils.ProgramTime


  private void readFromStream(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    deviceFilename = stream.readUTF();
    entryNumber = stream.readInt();
    entryRepetition = TopfieldTimerMode.createFromNumber(stream.readInt());
    entryTuner = stream.readInt();
    program = new ProgramTime();
    program.readData(stream);
  }
View Full Code Here


              if (progTime >= beginMinutes - 15 && progTime <= endMinutes + 15
                  && prog.getTitle().trim().equalsIgnoreCase(timer.get("e2name").trim())) {

                found = true;
                programs.add(new ProgramTime(prog, begin.getTime(), end.getTime()));
              }
            }

            runner.add(Calendar.HOUR_OF_DAY, 24);
          }
View Full Code Here

            Program program = programIterator.next();
            int programStartMinutes = program.getStartTime();
            int programEndMinutes = programStartMinutes + program.getLength();

            if ((programStartMinutes >= recordingStartMinutes) && (programEndMinutes <= recordingEndMinutes)) {
              ProgramTime programTime = new ProgramTime(program, recordingStart.getTime(), recordingEnd.getTime());
              TopfieldTimerEntry timerEntry = new TopfieldTimerEntry(fileName, entryNumber, mode, tuner, programTime);
              timerList.add(timerEntry);
              break;
            }
          }
View Full Code Here

                    JOptionPane.ERROR_MESSAGE);
           
            return false;
        }
       
        ProgramTime prgTime = new ProgramTime(program);
       
        prgTime.addMinutesToStart(mConfig.getPreTime() * -1);
        prgTime.addMinutesToEnd(mConfig.getPostTime());

        if (mConfig.getMarkedPrograms().getMaxProgramsInTime(prgTime) >= mConfig.getMaxSimultanious()) {
           
            JOptionPane.showMessageDialog(parent,
                    mLocalizer.msg("MaxRecordings", "Sorry, the maximum of simultanious recodings is reached!\n(See the Settings to enable this)"),
View Full Code Here

    }

    public boolean remove(Window parent, Program program) {
        CaptureExecute exec = CaptureExecute.getInstance(parent, mConfig);
       
        ProgramTime prgTime = mConfig.getMarkedPrograms().getProgramTimeForProgram(program);
       
        if (exec.removeProgram(prgTime)) {
            mConfig.getMarkedPrograms().remove(prgTime);
            return true;
        } else {
View Full Code Here

       
        ArrayList<ParamEntry> list = new ArrayList<ParamEntry>(mConfig.getEnabledParamList());
       
        if (num <= list.size()) {
           
            ProgramTime time = new ProgramTime(program);
           
            return exec.execute(time, list.get(num).getParam());
        }
       
        return false;
View Full Code Here

     *
     * @param p The program to remove from this device.
     * @since 2.11
     */
    public void removeProgramWithoutExecution(Program p) {
      ProgramTime prgTime = mConfig.getMarkedPrograms().getProgramTimeForProgram(p);
      mConfig.getMarkedPrograms().remove(prgTime);
    }
View Full Code Here

    }


    @Override
    public Program getProgramForProgramInList(Program p) {
      ProgramTime time = mConfig.getMarkedPrograms().getProgramTimeForProgram(p);
     
      if(time != null) {
        return time.getProgram();
      }
     
      return null;
    }
View Full Code Here

                configDevice(parent);
            }
        } else {
            ProgramTimeDialog dialog;

            ProgramTime time = new ProgramTime(program);

            Calendar start = time.getStartAsCalendar();
            start.add(Calendar.MINUTE, mConfig.getPreTime()*-1);
            time.setStart(start.getTime());

            Calendar end = time.getEndAsCalendar();
            end.add(Calendar.MINUTE, mConfig.getAfterTime());
            time.setEnd(end.getTime());

            JComboBox box = new JComboBox(new String[] {
                    mLocalizer.msg("afterEventNothing", "Nothing"),
                    mLocalizer.msg("afterEventStandby", "Standby"),
                    mLocalizer.msg("afterEventDeepstandby", "Deepstandby"),
View Full Code Here

      if (JOptionPane.showConfirmDialog(parent, localizer.msg(NOT_CONFIGURED_TEXT, DEFAULT_NOT_CONFIGURED_TEXT),
          localizer.msg(NOT_CONFIGURED_TITLE, DEFAULT_NOT_CONFIGURED_TITLE), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
        configDevice(parent);
      }
    } else {
      ProgramTime time = new ProgramTime(program);

      Calendar start = time.getStartAsCalendar();
      start.add(Calendar.MINUTE, configuration.getChannelPreroll(program.getChannel()) * -1);
      time.setStart(start.getTime());

      Calendar end = time.getEndAsCalendar();
      end.add(Calendar.MINUTE, configuration.getChannelPostroll(program.getChannel()));
      time.setEnd(end.getTime());

      JComboBox repeatSelector = new JComboBox();
      for (TopfieldTimerMode mode : TopfieldTimerMode.values()) {
        repeatSelector.addItem(mode);
      }
      ProgramTimeDialog recordDialog = new ProgramTimeDialog(parent, time, true, localizer.msg(REPEAT_LABEL,
          DEFAULT_REPEAT_LABEL), repeatSelector);
      UiUtilities.centerAndShow(recordDialog);
      ProgramTime programToRecord = recordDialog.getPrgTime();
      if (programToRecord != null) {
        TopfieldConnector connector = new TopfieldConnector(configuration);
        boolean recordingAdded = false;
        try {
          recordingAdded = connector.addRecording(parent, service, programToRecord, (TopfieldTimerMode) repeatSelector
View Full Code Here

TOP

Related Classes of captureplugin.drivers.utils.ProgramTime

Copyright © 2015 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.