package eu.smoser.dungeongenerator.main;

import javax.swing.*;

abstract class AGenerator extends javax.swing.JFrame {
    private static final long serialVersionUID = 1L;

    AGenerator() {
        JButton jButtonStart = new JButton();
        JPanel jPanel1 = new JPanel();
        Box.Filler filler1 = new Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
        jSpinner = new javax.swing.JSpinner();
        JLabel jLabel1 = new JLabel();
        Box.Filler filler2 = new Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
        JScrollPane jScrollPane1 = new JScrollPane();
        JTextArea jText = new JTextArea();
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        cInitComponents(jButtonStart, jLabel1, jPanel1);

        jButtonStart.addActionListener(e -> jText.setText(getText()));
        getContentPane().add(jButtonStart, java.awt.BorderLayout.PAGE_END);
        jPanel1.setLayout(new java.awt.GridLayout(1, 4));
        jPanel1.add(filler1);
        jSpinner.setModel(new javax.swing.SpinnerNumberModel(1, 1, null, 1));
        jPanel1.add(jSpinner);
        jPanel1.add(jLabel1);
        jPanel1.add(filler2);
        getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);
        jText.setColumns(20);
        jText.setRows(5);
        jScrollPane1.setViewportView(jText);
        getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
        pack();
    }

    abstract void cInitComponents(JButton jButtonStart, JLabel jLabel1, JPanel jPanel1);

    abstract String getText();

    javax.swing.JSpinner jSpinner;
}
