Esempio n. 1
0
  /**
   * Hide the left part of the main split pane if both it's components are visible. If either of
   * them are visible, show it.
   */
  private void layoutSplitPane() {
    boolean visible = channelListPanel.isVisible() || metadataPanel.isVisible();

    if (leftPanel.isVisible() != visible) {
      leftPanel.setVisible(visible);
      splitPane.resetToPreferredSizes();
    }
  }
Esempio n. 2
0
  private void initFrame() {
    frame = Application.getInstance(RDV.class).getMainFrame();

    setLayout(new BorderLayout());

    c = new GridBagConstraints();

    initActions();
    initMenuBar();

    initChannelListPanel();
    initMetadataPanel();
    initLeftPanel();

    initRightPanel();
    initControls();
    initDataPanelContainer();
    initAudioPlayerPanel();
    initMarkerSubmitPanel();

    initSplitPane();

    channelListPanel.addChannelSelectionListener(metadataPanel);

    rbnb.addSubscriptionListener(controlPanel);

    rbnb.addTimeListener(controlPanel);

    rbnb.addStateListener(channelListPanel);
    rbnb.addStateListener(controlPanel);
    rbnb.addStateListener(this);

    rbnb.getMetadataManager().addMetadataListener(channelListPanel);
    rbnb.getMetadataManager().addMetadataListener(metadataPanel);
    rbnb.getMetadataManager().addMetadataListener(controlPanel);

    rbnb.addPlaybackRateListener(controlPanel);

    rbnb.addTimeScaleListener(controlPanel);

    rbnb.addMessageListener(this);

    rbnb.addConnectionListener(this);
  }
Esempio n. 3
0
  public void showExportVideoDialog() {
    List<String> channels = channelListPanel.getSelectedChannels();

    // remove non-data channels
    for (int i = channels.size() - 1; i >= 0; i--) {
      Channel channel = RBNBController.getInstance().getChannel(channels.get(i));
      String mime = channel.getMetadata("mime");
      if (!mime.equals("image/jpeg")) {
        channels.remove(i);
      }
    }

    // don't bring up the dialog if there are no channels specified
    if (channels.isEmpty()) {
      JOptionPane.showMessageDialog(
          null, "There are no video channels selected.", "Error", JOptionPane.ERROR_MESSAGE);
      return;
    }

    new ExportVideoDialog(frame, rbnb, channels);
  }
Esempio n. 4
0
  private void initChannelListPanel() {
    channelListPanel = new ChannelListPanel(dataPanelManager, rbnb);
    channelListPanel.setMinimumSize(new Dimension(0, 0));

    log.info("Created channel list panel.");
  }
Esempio n. 5
0
 /**
  * Gets if hidden channels are visible in the UI.
  *
  * @return true if hidden channels are visible, false otherwise
  */
 public boolean isHiddenChannelsVisible() {
   return channelListPanel.isShowingHiddenChannles();
 }
Esempio n. 6
0
 /**
  * Gets a list of channels selected in the channel list.
  *
  * @return a list of selected channels
  */
 public List<String> getSelectedChannels() {
   return channelListPanel.getSelectedChannels();
 }