예제 #1
0
 public void addLogUpload(LogFile logFile) {
   if (RemoteLogRepositoryBackend.getInstance().isConnected()) {
     RemoteLogRepositoryBackend.getInstance().enqueueUpload(logFile);
     JProgressBar jpb = new JProgressBar();
     jpb.setStringPainted(true);
     jpb.setString("Requesting");
     this._middlePanel._uploadsPanel.addRow(new JLabel(logFile.getName()), jpb);
   }
 }
예제 #2
0
  public void componentShown(ComponentEvent e) {
    synchronized (this) {
      // load
      LogRepository.getInstance();

      if (!_localLoaded) {
        Thread t =
            new Thread() {
              public void run() {
                LogRepository.getInstance().refreshLocalLogs();
                LogFilesTab.this.showLocalLogs();
                _localLoaded = true;
              }
            };
        t.start();
      }
      if (RemoteLogRepositoryBackend.getInstance().isConnected() && !_remoteLoaded) {
        Thread t =
            new Thread() {
              public void run() {
                LogRepository.getInstance().refreshRemoteLogs();
                _remoteLoaded = true;
              }
            };
        t.start();
      }
    }
  }
예제 #3
0
    public MiddlePanel() {
      this.setLayout(new GridBagLayout());
      GridBagConstraints cons = new GridBagConstraints();

      RemoteLogRepositoryBackend.getInstance().setDownloadListener(_downloadsPanel);
      RemoteLogRepositoryBackend.getInstance().setUploadListener(_uploadsPanel);

      _inSplitPane.setTopComponent(_downloadsPanel);
      _inSplitPane.setBottomComponent(_uploadsPanel);
      _inSplitPane.setResizeWeight(0.5);

      _outSplitPane.setTopComponent(_logDetailsPane);
      _outSplitPane.setBottomComponent(_inSplitPane);
      _outSplitPane.setResizeWeight(0.6);

      cons.fill = GridBagConstraints.BOTH;
      cons.weightx = 1.0;
      cons.weighty = 1.0;
      this.add(_outSplitPane, cons);
    }