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

📄 abstractdatabaselogreportui.java

📁 这是一款应用程序与数据库联接
💻 JAVA
字号:
/* ===========================================================
 * JDBMonitor : a flexiable JDBC Monitor for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2006-2006, by yang zhongke
 *
 * Project Info:  http://www.cownew.com
 *
 * This library 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 2.1 of the License, or 
 * (at your option) any later version.
 *
 * This library 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 this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 *
 * ---------------
 * AbstractDataBaseLogReportUI.java
 * ---------------
 * (C) Copyright 2006-2006, by yang zhongke
 *
 * Original Author:  yang zhongke;
 *
 * Changes
 * -------
 *
 */
package com.cownew.JDBMonitor.listenerImpl.dataBaseListener;

import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

import com.cownew.JDBMonitor.listenerImpl.uicommon.JCownewFrame;

public abstract class AbstractDataBaseLogReportUI extends JCownewFrame
{	
	protected JTable tableLogDetail;
	
	protected static Object[] tableHead 
	  = new Object[]{"begintime","endtime","sql","sqltype","parameter"};
	
	
	protected JMenuItem menuItemConnect;
	protected JMenuItem menuItemFilter;
	
	public AbstractDataBaseLogReportUI() throws HeadlessException
	{
		super();			
		initMenu();
	}
	
	protected void initMenu()
	{
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu menuFile = new JMenu("File");
		menuBar.add(menuFile);
		
		menuItemConnect = new JMenuItem("Connect");
		menuFile.add(menuItemConnect);
		menuItemConnect.addActionListener(new ActionListener(){

			public void actionPerformed(ActionEvent e)
			{
				menuItemConnect_actionPerformed(e);				
			}
			
		});		

		
		JMenu menuView = new JMenu("View");
		menuBar.add(menuView);
		
		menuItemFilter = new JMenuItem("filter...");
		menuView.add(menuItemFilter);
		menuItemFilter.setEnabled(false);
		menuItemFilter.addActionListener(new ActionListener(){

			public void actionPerformed(ActionEvent e)
			{
				menuItemFilter_actionPerformed(e);				
			}
			
		});
		
		JMenu menuReport = new JMenu("Report");
		menuBar.add(menuReport);
		
		JMenuItem menuItemTimeSeries = new JMenuItem("TimeSeries");
		menuItemTimeSeries.addActionListener(new ActionListener(){

			public void actionPerformed(ActionEvent e)
			{
				menuItemTimeSeries_actionPerformed(e);				
			}
			
		});
		menuReport.add(menuItemTimeSeries);
		
	}

	protected void menuItemTimeSeries_actionPerformed(ActionEvent e)
	{
			
	}

	protected void menuItemConnect_actionPerformed(ActionEvent e)
	{
				
	}

	protected void menuItemFilter_actionPerformed(ActionEvent e)
	{
				
	}

	protected void initUI()
	{
		super.initUI();
		JTabbedPane tabList = new JTabbedPane();
		tableLogDetail = new JTable();
		tableLogDetail.setEnabled(false);
		
		DefaultTableModel tableModel = new DefaultTableModel(tableHead,0);
		tableLogDetail.setModel(tableModel);
		JScrollPane scrollPaneTable = new JScrollPane(tableLogDetail);		
		tabList.addTab("SQL Log Detail",scrollPaneTable);	
		
		
		container.add(tabList);
	}

}

⌨️ 快捷键说明

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