<commit_before>/*******************************************************************************
* Copyright (c) 2011 Nokia Corporation
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Comarch team - initial API and implementation
*******************************************************************************/
package org.ned.server.nedadminconsole.client.widgets;

import org.ned.server.nedadminconsole.client.NedRes;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;

public class NedStatisticsWidget extends Composite {
    
    private Button buttonDownload;

    public NedStatisticsWidget() {
        
        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.setSpacing(15);
        verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
        initWidget(verticalPanel);
        verticalPanel.setSize("100%", "50px");
        
        buttonDownload = new Button();
        buttonDownload.setText(NedRes.instance().statisticsDownload());
        buttonDownload.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                com.google.gwt.user.client.Window.open("NedStatisticsFileServlet",
                        "Download", "");
            }
        });
        verticalPanel.add(buttonDownload);
        buttonDownload.setSize("30%", "");
    }

}<commit_msg>fix: New tab is open when trying to download statistics.<commit_after>/*******************************************************************************
* Copyright (c) 2011 Nokia Corporation
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Comarch team - initial API and implementation
*******************************************************************************/
package org.ned.server.nedadminconsole.client.widgets;

import org.ned.server.nedadminconsole.client.NedRes;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;

public class NedStatisticsWidget extends Composite {
    
    private Button buttonDownload;

    public NedStatisticsWidget() {
        
        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.setSpacing(15);
        verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
        initWidget(verticalPanel);
        verticalPanel.setSize("100%", "50px");
        
        buttonDownload = new Button();
        buttonDownload.setText(NedRes.instance().statisticsDownload());
        buttonDownload.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                com.google.gwt.user.client.Window.Location.assign("NedStatisticsFileServlet");
            }
        });
        verticalPanel.add(buttonDownload);
        buttonDownload.setSize("30%", "");
    }

}
{'fraction_non_alphanumeric': 0.17907608695652175, 'fraction_numerical': 0.00923913043478261, 'mean_word_length': 3.9343163538873993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7254410', 'n_tokens_mistral': 962, 'n_tokens_neox': 912, 'n_words': 192}