/* *Copyright 2007, 2011 CCLS Columbia University (USA), LIFO University of Orl��ans (France), BRGM (France) * *Authors: Cyril Nortet, Xiangrong Kong, Ansaf Salleb-Aouissi, Christel Vrain, Daniel Cassard * *This file is part of QuantMiner. * *QuantMiner 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 3 of the License, or any later version. * *QuantMiner 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 QuantMiner. If not, see <http://www.gnu.org/licenses/>. */ package src.graphicalInterface; import javax.swing.*; import javax.swing.text.*; import javax.swing.text.html.*; import java.awt.*; import javax.swing.event.*; import src.tools.*; import java.net.URL; public class DialogWindowInfoHTML extends javax.swing.JDialog implements HyperlinkListener { /** Creates new form DialogFenetreAide */ public DialogWindowInfoHTML(String sTitre, String sTexteHTMLAffiche, java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); setTitle(sTitre); setResizable(false); setLocationRelativeTo(null); jEditorPaneHTML.setText(sTexteHTMLAffiche); jEditorPaneHTML.setCaretPosition(0); } /** 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 jPanelGeneral = new javax.swing.JPanel(); jScrollPaneHTML = new javax.swing.JScrollPane(); jEditorPaneHTML = new javax.swing.JEditorPane(); jButtonFermer = new javax.swing.JButton(); setTitle(""); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jPanelGeneral.setLayout(null); jPanelGeneral.setPreferredSize(new java.awt.Dimension(700, 500)); jScrollPaneHTML.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jEditorPaneHTML.setEditable(false); jEditorPaneHTML.setContentType("text/html"); jEditorPaneHTML.setAutoscrolls(false); jScrollPaneHTML.setViewportView(jEditorPaneHTML); jPanelGeneral.add(jScrollPaneHTML); jScrollPaneHTML.setBounds(10, 10, 680, 440); jButtonFermer.setText("close"); jButtonFermer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonFermerActionPerformed(evt); } }); jPanelGeneral.add(jButtonFermer); jButtonFermer.setBounds(310, 464, 75, 26); getContentPane().add(jPanelGeneral, java.awt.BorderLayout.CENTER); pack(); }//GEN-END:initComponents private void jButtonFermerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonFermerActionPerformed setVisible(false); dispose(); }//GEN-LAST:event_jButtonFermerActionPerformed /** Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog setVisible(false); dispose(); }//GEN-LAST:event_closeDialog /** * @param args the command line arguments */ public static void main(String args[]) { new DialogWindowInfoHTML("", "", new javax.swing.JFrame(), true).show(); } public void hyperlinkUpdate(HyperlinkEvent e) { } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonFermer; private javax.swing.JEditorPane jEditorPaneHTML; private javax.swing.JPanel jPanelGeneral; private javax.swing.JScrollPane jScrollPaneHTML; // End of variables declaration//GEN-END:variables }