<commit_before>/*
 * Copyright 2008-2012 by <NAME>
 *
 *     This file is part of Java Melody.
 *
 * Java Melody is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Java Melody is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Java Melody.  If not, see <http://www.gnu.org/licenses/>.
 */
package net.bull.javamelody;

import java.awt.Desktop;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.net.URL;
import java.util.List;
import java.util.Map;

import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.KeyStroke;

import net.bull.javamelody.swing.MButton;

/**
 * Panel des boutons principaux.
 * @author <NAME>
 */
class MainButtonsPanel extends MelodyPanel {
	private static final ImageIcon MONITORING_ICON = ImageIconCache.getScaledImageIcon(
			"systemmonitor.png", 16, 16);
	private static final long serialVersionUID = 1L;

	MainButtonsPanel(RemoteCollector remoteCollector, final URL monitoringUrl) {
		super(remoteCollector, new FlowLayout(FlowLayout.CENTER));

		final MButton refreshButton = createRefreshButton();
		final MButton pdfButton = createPdfButton();
		final MButton onlineHelpButton = createOnlineHelpButton();

		// TODO traductions
		final MButton monitoringButton = new MButton("Monitoring", MONITORING_ICON);
		monitoringButton.setToolTipText(I18N.getFormattedString("Monitoring_sur",
				remoteCollector.getApplication()));
		add(refreshButton);
		add(pdfButton);
		add(onlineHelpButton);
		add(monitoringButton);
		add(new JLabel("        " + I18N.getString("Choix_periode") + " : "));
		for (final Period myPeriod : Period.values()) {
			final MButton myPeriodButton = new MButton(myPeriod.getLinkLabel(),
					ImageIconCache.getImageIcon(myPeriod.getIconName()));<commit_msg>background pour les boutons principaux<commit_after>/*
 * Copyright 2008-2012 by <NAME>
 *
 *     This file is part of Java Melody.
 *
 * Java Melody is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Java Melody is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Java Melody.  If not, see <http://www.gnu.org/licenses/>.
 */
package net.bull.javamelody;

import java.awt.Color;
import java.awt.Desktop;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.net.URL;
import java.util.List;
import java.util.Map;

import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.KeyStroke;

import net.bull.javamelody.swing.MButton;

/**
 * Panel des boutons principaux.
 * @author <NAME>
 */
class MainButtonsPanel extends MelodyPanel {
	private static final Color BACKGROUND = new Color(186, 207, 226);
	private static final ImageIcon MONITORING_ICON = ImageIconCache.getScaledImageIcon(
			"systemmonitor.png", 16, 16);
	private static final long serialVersionUID = 1L;

	MainButtonsPanel(RemoteCollector remoteCollector, final URL monitoringUrl) {
		super(remoteCollector, new FlowLayout(FlowLayout.CENTER));
		setOpaque(true);
		setBackground(BACKGROUND);
		final MButton refreshButton = createRefreshButton();
		final MButton pdfButton = createPdfButton();
		final MButton onlineHelpButton = createOnlineHelpButton();

		// TODO traductions
		final MButton monitoringButton = new MButton("Monitoring", MONITORING_ICON);
		monitoringButton.setToolTipText(I18N.getFormattedString("Monitoring_sur",
				remoteCollector.getApplication()));
		add(refreshButton);
		add(pdfButton);
		add(onlineHelpButton);
		add(monitoringButton);
		add(new JLabel("        " + I18N.getString("Choix_periode") + " : "));
		for (final Period myPeriod : Period.values()) {
			final MButton myPeriodButton = new MButton(myPeriod.getLinkLabel(),
					ImageIconCache.getImageIcon(myPeriod.getIconName()));
{'fraction_non_alphanumeric': 0.09327764518695306, 'fraction_numerical': 0.008949880668257757, 'mean_word_length': 4.854481955762514, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '831097', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1436, 'n_words': 462}