org.pepsoft.worldpainter.ImportWarningsDialog Maven / Gradle / Ivy
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.pepsoft.worldpainter;
import javax.swing.*;
import java.awt.*;
/**
*
* @author SchmitzP
*/
public class ImportWarningsDialog extends WorldPainterDialog {
/**
* Creates new form ImportWarningsDialog
*/
public ImportWarningsDialog(Window parent, String title, String text) {
super(parent);
setTitle(title);
initComponents();
jLabel1.setIcon(UIManager.getIcon("OptionPane.warningIcon"));
jLabel1.setText(text);
getRootPane().setDefaultButton(jButton1);
pack();
setLocationRelativeTo(parent);
}
public void setWarnings(String warnings) {
jTextArea1.setText(warnings);
}
/**
* 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.
*/
@SuppressWarnings("unchecked")
// //GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jButton1 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jTextArea1.setEditable(false);
jTextArea1.setColumns(20);
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);
jButton1.setText("OK");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jLabel1.setText("The import process generated warnings. The map may be damaged or corrupted.
\nNot all chunks may have been imported correctly. Please review the warnings below://GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
dispose();
}//GEN-LAST:event_jButton1ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTextArea1;
// End of variables declaration//GEN-END:variables
private static final long serialVersionUID = 1L;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy