⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainframe.java

📁 一个java版本数据分析显示程序
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
/*Copyright (c) 2001, 2002, 2003 Flo Ledermann <flo@subnet.at>This file is part of parvis - a parallel coordiante based data visualisationtool written in java. You find parvis and additional information on itswebsite at http://www.mediavirus.org/parvis.parvis is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.parvis is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with parvis (in the file LICENSE.txt); if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/package org.mediavirus.parvis.gui;import javax.swing.*;import java.io.*;import java.net.*;import org.mediavirus.parvis.file.*;import org.mediavirus.parvis.model.*;/** * * @author  flo */public class MainFrame extends javax.swing.JFrame implements ProgressListener, BrushListener {    /** Creates new form MainFrame */    public MainFrame() {        initComponents();        parallelDisplay.addProgressListener(this);        parallelDisplay.addBrushListener(this);        BrushList brushList = new BrushList(parallelDisplay);        brushList.setLocation(this.getX() + this.getWidth(), this.getY());        brushList.show();                CorrelationFrame correlationFrame = new CorrelationFrame(parallelDisplay);        correlationFrame.setLocation(this.getX() + this.getWidth(), this.getY() + brushList.getHeight());        correlationFrame.show();                this.setSize(800, 600);            }    /** This method is called from within the constructor to     * initialize the form.     * WARNING: Do NOT modify this code. The content of this method is     * always regenerated by the Form Editor.     */    private void initComponents() {//GEN-BEGIN:initComponents        menuEditGroup = new javax.swing.ButtonGroup();        buttonEditGroup = new javax.swing.ButtonGroup();        statusPanel = new javax.swing.JPanel();        progressPanel = new javax.swing.JPanel();        progressLabel = new javax.swing.JLabel();        progressBar = new javax.swing.JProgressBar();        timeLabel = new javax.swing.JLabel();        quickPrefPanel = new javax.swing.JPanel();        histogramBox = new javax.swing.JCheckBox();        tooltipBox = new javax.swing.JCheckBox();        hoverBox = new javax.swing.JCheckBox();        fuzzyBrushBox = new javax.swing.JCheckBox();        radiusField = new javax.swing.JTextField();        toolbarPanel = new javax.swing.JPanel();        modeBar = new javax.swing.JToolBar();        modeLabel = new javax.swing.JLabel();        orderButton = new javax.swing.JToggleButton();        scaleButton = new javax.swing.JToggleButton();        translateButton = new javax.swing.JToggleButton();        brushButton = new javax.swing.JToggleButton();        jSeparator2 = new javax.swing.JSeparator();        countLabel = new javax.swing.JLabel();        resetBrushButton = new javax.swing.JButton();        resetAllButton = new javax.swing.JButton();        urlBar = new javax.swing.JToolBar();        datasourceLabel = new javax.swing.JLabel();        urlField = new javax.swing.JTextField();        jButton1 = new javax.swing.JButton();        parallelDisplay = new org.mediavirus.parvis.gui.ParallelDisplay();        menuBar = new javax.swing.JMenuBar();        fileMenu = new javax.swing.JMenu();        openMenu = new javax.swing.JMenuItem();        saveBrushItem = new javax.swing.JMenuItem();        editMenu = new javax.swing.JMenu();        orderMenu = new javax.swing.JRadioButtonMenuItem();        scaleMenu = new javax.swing.JRadioButtonMenuItem();        translateMenu = new javax.swing.JRadioButtonMenuItem();        brushMenu = new javax.swing.JRadioButtonMenuItem();        jSeparator1 = new javax.swing.JSeparator();        preferencesMenu = new javax.swing.JMenuItem();        viewMenu = new javax.swing.JMenu();        scaleZeroMaxItem = new javax.swing.JMenuItem();        scaleMinMaxItem = new javax.swing.JMenuItem();        scaleMinMaxAbsItem = new javax.swing.JMenuItem();        helpMenu = new javax.swing.JMenu();        helpItem = new javax.swing.JMenuItem();        aboutItem = new javax.swing.JMenuItem();        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);        setTitle("Parvis");        addWindowListener(new java.awt.event.WindowAdapter() {            public void windowClosing(java.awt.event.WindowEvent evt) {                exitForm(evt);            }        });        statusPanel.setLayout(new java.awt.BorderLayout());        statusPanel.setBorder(new javax.swing.border.TitledBorder(new javax.swing.border.EtchedBorder(), "status", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 10)));        statusPanel.setFont(new java.awt.Font("Dialog", 0, 10));        statusPanel.setPreferredSize(new java.awt.Dimension(272, 50));        progressPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 0));        progressLabel.setFont(new java.awt.Font("Dialog", 0, 10));        progressLabel.setText("progress:");        progressPanel.add(progressLabel);        progressBar.setFont(new java.awt.Font("Dialog", 0, 10));        progressBar.setMaximumSize(new java.awt.Dimension(32767, 18));        progressBar.setMinimumSize(new java.awt.Dimension(10, 16));        progressBar.setPreferredSize(new java.awt.Dimension(100, 18));        progressBar.setStringPainted(true);        progressPanel.add(progressBar);        timeLabel.setFont(new java.awt.Font("Dialog", 0, 10));        timeLabel.setText("(0.0 s)");        progressPanel.add(timeLabel);        statusPanel.add(progressPanel, java.awt.BorderLayout.WEST);        quickPrefPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 0));        histogramBox.setFont(new java.awt.Font("Dialog", 0, 10));        histogramBox.setText("hist.");        histogramBox.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                histogramBoxActionPerformed(evt);            }        });        quickPrefPanel.add(histogramBox);        tooltipBox.setFont(new java.awt.Font("Dialog", 0, 10));        tooltipBox.setSelected(true);        tooltipBox.setText("tooltips");        tooltipBox.setMargin(new java.awt.Insets(0, 2, 0, 2));        tooltipBox.setEnabled(false);        tooltipBox.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                tooltipBoxActionPerformed(evt);            }        });        quickPrefPanel.add(tooltipBox);        hoverBox.setFont(new java.awt.Font("Dialog", 0, 10));        hoverBox.setText("line");        hoverBox.setMargin(new java.awt.Insets(0, 2, 0, 2));        hoverBox.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                hoverBoxActionPerformed(evt);            }        });        quickPrefPanel.add(hoverBox);        fuzzyBrushBox.setFont(new java.awt.Font("Dialog", 0, 10));        fuzzyBrushBox.setSelected(true);        fuzzyBrushBox.setText("Brush Fuzziness:");        fuzzyBrushBox.setMargin(new java.awt.Insets(0, 0, 0, 0));        fuzzyBrushBox.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                fuzzyBrushBoxActionPerformed(evt);            }        });        quickPrefPanel.add(fuzzyBrushBox);        radiusField.setFont(new java.awt.Font("Dialog", 0, 10));        radiusField.setText(" 20 %");        radiusField.setBorder(new javax.swing.border.LineBorder((java.awt.Color) javax.swing.UIManager.getDefaults().get("Button.select")));        radiusField.setPreferredSize(new java.awt.Dimension(30, 17));        radiusField.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                radiusFieldActionPerformed(evt);            }        });        radiusField.addFocusListener(new java.awt.event.FocusAdapter() {            public void focusGained(java.awt.event.FocusEvent evt) {                radiusFieldFocusGained(evt);            }        });        quickPrefPanel.add(radiusField);        statusPanel.add(quickPrefPanel, java.awt.BorderLayout.EAST);        getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);        toolbarPanel.setLayout(new java.awt.GridLayout(2, 0));        modeLabel.setFont(new java.awt.Font("Dialog", 0, 10));        modeLabel.setText("Edit Mode: ");        modeBar.add(modeLabel);        orderButton.setFont(new java.awt.Font("Dialog", 0, 10));        orderButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/mediavirus/parvis/gui/reorder.gif")));        orderButton.setSelected(true);        orderButton.setText("Order");        orderButton.setToolTipText("Reorder axes by dragging them across the display.");        buttonEditGroup.add(orderButton);        orderButton.setMargin(new java.awt.Insets(2, 2, 2, 2));        orderButton.setMaximumSize(new java.awt.Dimension(65, 27));        orderButton.setMinimumSize(new java.awt.Dimension(65, 27));        orderButton.setPreferredSize(new java.awt.Dimension(65, 27));        orderButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                setEditModeOrder(evt);            }        });        modeBar.add(orderButton);        scaleButton.setFont(new java.awt.Font("Dialog", 0, 10));        scaleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/mediavirus/parvis/gui/scale.gif")));        scaleButton.setText("Scale");        scaleButton.setToolTipText("Scale axes by dragging up (zoom out) or down (zoom in).");        buttonEditGroup.add(scaleButton);        scaleButton.setMargin(new java.awt.Insets(2, 2, 2, 2));        scaleButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                setEditModeScale(evt);            }        });        modeBar.add(scaleButton);        translateButton.setFont(new java.awt.Font("Dialog", 0, 10));        translateButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/mediavirus/parvis/gui/move.gif")));        translateButton.setText("Translate");        translateButton.setToolTipText("Translate axes by dragging up or down.");        buttonEditGroup.add(translateButton);        translateButton.setMargin(new java.awt.Insets(2, 2, 2, 2));        translateButton.addActionListener(new java.awt.event.ActionListener() {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -