/*
* HJB4U is toolchain for creating a HyperJAXB front end for database users.
* Copyright (C) 2010 NigelB
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package hjb4u.gui;
import hjb4u.config.hjb4u.Constants;
import org.apache.log4j.Logger;
import javax.swing.*;
import java.awt.*;
/**
* <code>LogWindow</code>
* Date: Aug 20, 2009
* Time: 8:34:06 PM
*
* @author Nigel B
*/
public class LogWindow {
private JPanel panel1;
private JTextPane textPane1;
private JDialog parent;
public LogWindow(JDialog parent) {
this.parent = parent;
}
public void update() {
textPane1.setText(Logger.getRootLogger().getAppender(Constants.PaneAppenderName).toString());
}
{
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
$$$setupUI$$$();
}
/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
* DO NOT edit this method OR call it in your code!
*
* @noinspection ALL
*/
private void $$$setupUI$$$() {
panel1 = new JPanel();
panel1.setLayout(new BorderLayout(0, 0));
final JScrollPane scrollPane1 = new JScrollPane();
panel1.add(scrollPane1, BorderLayout.CENTER);
textPane1 = new JTextPane();
scrollPane1.setViewportView(textPane1);
}
/**
* @noinspection ALL
*/
public JComponent $$$getRootComponent$$$() {
return panel1;
}
}