コード例 #1
0
  /**
   * Gets the content.
   *
   * @return the content
   */
  private JPanel getContent() {
    JPanel container = new JPanel(new BorderLayout());

    JPanel panel = new JPanel(new GridBagLayout());
    this.pictureLabel = new JLabel(LOGO);
    this.pictureLabel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 10));
    this.taskLabel = new JLabel(StringUtils.getString(I18nUtils.getString("LOADING"), "..."));
    this.progressLabel = new JLabel();
    this.separatorLabel = new JLabel(" / ");
    this.separatorLabel.setVisible(false);
    this.totalFilesLabel = new JLabel();
    this.progressBar = new JProgressBar();
    this.progressBar.setBorder(BorderFactory.createEmptyBorder());
    this.folderLabel = new JLabel(" ");
    this.remainingTimeLabel = new JLabel(" ");
    this.backgroundButton = new JButton(this.repositoryLoadInBackgroundAction);
    this.cancelButton = new JButton(this.repositoryLoadCancelAction);

    JPanel buttonsPanel = new JPanel();
    buttonsPanel.add(this.backgroundButton);
    buttonsPanel.add(this.cancelButton);

    container.add(this.pictureLabel, BorderLayout.WEST);

    arrangePanel(panel, buttonsPanel);

    container.add(panel, BorderLayout.CENTER);

    return container;
  }
コード例 #2
0
 @Override
 public void run() {
   if (!repositoryHandler.isLoaderWorking()) {
     Logger.info(
         StringUtils.getString(
             "Automatically refreshing repository... (", new DateTime().toString(), ')'));
     repositoryHandler.refreshRepository();
   }
 }
コード例 #3
0
 @Override
 public Object getValueAt(int rowIndex, int columnIndex) {
   if (columnIndex == 0) return artists.get(rowIndex);
   return StringUtils.getString(artists.get(rowIndex).getMatch(), " %");
 }