Examples of Program


Examples of devplugin.Program

      mClickThread.interrupt();
    }

    mMouse = evt.getPoint();
    repaint();
    final Program program = getProgramAt(evt.getX(), evt.getY());

    if (SwingUtilities.isLeftMouseButton(evt) && (evt.getClickCount() == 1) && (evt.getModifiersEx() == 0 || evt.getModifiersEx() == InputEvent.CTRL_DOWN_MASK)) {
      mLeftClickThread = new Thread("Program table single click thread") {
        int modifiers = evt.getModifiersEx();
        public void run() {
View Full Code Here

Examples of devplugin.Program

    int lastPanelHeight = 0;
    int rowCount = mModel.getRowCount(col);
    for (int row = 0; row < rowCount; row++) {
      ProgramPanel panel = mModel.getProgramPanel(col, row);
      Program program = panel.getProgram();
      int startTime = program.getStartTime();

      // Add 24 hours for every day different to the model's main date
      startTime += program.getDate().getNumberOfDaysSince(mainDate) * 24 * 60;

      // upper border of current program panel
      if (startTime == minutesAfterMidnight) {
        return timeY;
      }

      // somewhere inside current panel
      final int progLength = program.getLength();
      int panelHeight = panel.getHeight();
      if (progLength > 0 && startTime < minutesAfterMidnight
          && startTime + progLength > minutesAfterMidnight) {
        if (panelHeight > 800) {
          return 0// very large programs (due to filters) falsify calculation
View Full Code Here

Examples of devplugin.Program

  public void showPopupFromKeyboard() {
    if(mCurrentCol == -1 || mCurrentRow == -1) {
      return;
    }

    Program program = mModel.getProgramPanel(mCurrentCol, mCurrentRow).getProgram();
    Rectangle rect = this.getCellRect(mCurrentCol,mCurrentRow);
    scrollRectToVisible(rect);

    mPopupMenu = createPluginContextMenu(program);
    mPopupMenu.show(this, rect.x + (rect.width / 3), rect.y + ((rect.height * 3) / 4));
View Full Code Here

Examples of devplugin.Program

  public void startMiddleClickPluginFromKeyboard() {
    if(mCurrentCol == -1 || mCurrentRow == -1) {
      return;
    }

    Program program = mModel.getProgramPanel(mCurrentCol, mCurrentRow).getProgram();

    Plugin.getPluginManager().handleProgramMiddleClick(program);
  }
View Full Code Here

Examples of devplugin.Program

  public void startMiddleDoubleClickPluginFromKeyboard() {
    if(mCurrentCol == -1 || mCurrentRow == -1) {
      return;
    }

    Program program = mModel.getProgramPanel(mCurrentCol, mCurrentRow).getProgram();

    Plugin.getPluginManager().handleProgramMiddleDoubleClick(program);
  }
View Full Code Here

Examples of devplugin.Program

  public void startLeftSingleClickPluginFromKeyboard() {
    if(mCurrentCol == -1 || mCurrentRow == -1) {
      return;
    }

    Program program = mModel.getProgramPanel(mCurrentCol, mCurrentRow).getProgram();

    Plugin.getPluginManager().handleProgramSingleClick(program);
  }
View Full Code Here

Examples of devplugin.Program

  public void startDoubleClickPluginFromKeyboard() {
    if(mCurrentCol == -1 || mCurrentRow == -1) {
      return;
    }

    Program program = mModel.getProgramPanel(mCurrentCol, mCurrentRow).getProgram();

    Plugin.getPluginManager().handleProgramDoubleClick(program);
  }
View Full Code Here

Examples of devplugin.Program

    if(!evt.getTriggerEvent().isShiftDown()) {
      return;
    }
    mMouse = evt.getDragOrigin();

    Program program = getProgramAt(mMouse.x, mMouse.y);
    if (program != null) {
      if(!isSelectedItemAt(mMouse.x,mMouse.y)) {
        selectItemAt(mMouse.x,mMouse.y);
      }
      evt.startDrag(null,new TransferProgram(program), this);
View Full Code Here

Examples of devplugin.Program

      // if program is partially not visible then show the title as tooltip
      final JViewport viewport = MainFrame.getInstance()
          .getProgramTableScrollPane().getViewport();
      Point viewPos = viewport.getViewPosition();
      Dimension viewSize = viewport.getSize();
      final Program program = panel.getProgram();
      if ((currY < viewPos.y)
          || (panelIndex.x * mColumnWidth + panel.getTitleX() < viewPos.x)
          || ((panelIndex.x + 1) * mColumnWidth - 1 > viewPos.x
              + viewSize.width)) {
        if (buffer.indexOf(program.getTitle()) < 0) {
          appendTooltip(buffer, program.getTitle());
        }
      }

      // show end time if start time of next
      // shown program is not end of current program
      ProgramPanel nextPanel = mModel.getProgramPanel(panelIndex.x,
          panelIndex.y + 1);

      boolean showTime = (nextPanel == null && program.getLength() > 0);
      if (nextPanel != null) {
        int length = program.getLength();
        int nextStartTime = nextPanel.getProgram().getStartTime();
        if (nextStartTime < program.getStartTime()) {
          nextStartTime += 24 * 60;
        }
        if ((length > 0)
            && (program.getStartTime() + length + 1 < nextStartTime)) {
          showTime = true;
        }
      }
      if (showTime) {
        appendTooltip(buffer, mLocalizer.msg("until", "until {0}", program
          .getEndTimeString()));
      }
      if (buffer.length() > 0) {
        return buffer.toString();
      }
View Full Code Here

Examples of devplugin.Program

          for (int j = 0; j < programCount; j++) {
            if (j == 0 && today.getProgramAt(j).getStartTime() > IOUtilities.getMinutesAfterMidnight()) {
              ChannelDayProgram yesterday = TvDataBase.getInstance().getDayProgram(currentDate.addDays(-1), channel);

              if (yesterday != null && yesterday.getProgramCount() > 0) {
                Program p = yesterday.getProgramAt(yesterday.getProgramCount() - 1);

                if (p.isOnAir()) {
                  addToNowRunning(p, programs, additional);
                  Program p1 = today.getProgramAt(0);
                  addToNext(p1, nextPrograms, nextAdditionalPrograms);
                  break;
                }
              }
            }

            Program p = today.getProgramAt(j);

            if (p.isOnAir()) {
              addToNowRunning(p, programs, additional);
              Program nextProgram = null;
              if (j < programCount - 1) {
                nextProgram = today.getProgramAt(j + 1);
              } else {
                ChannelDayProgram tomorrow = TvDataBase.getInstance().getDayProgram(currentDate.addDays(1), channel);
                if (tomorrow != null && tomorrow.getProgramCount() > 0) {
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.