package csa.tiletools.tiles;


import csa.config.Configuration;
import csa.gui.Windowable;
import csa.gui.components.CSATableModel;
import csa.gui.components.CSATablePanel;
import csa.gui.components.CSAView;
import csa.gui.components.DoubleClickAction;
import csa.gui.dialogs.InternalFrameFileChoser;
import csa.tiletools.graphics.BaseImageData;
import csa.tiletools.graphics.ImageComponent;
import csa.tiletools.graphics.ImageSequence;
import csa.tiletools.graphics.ImageSequenceData;
import csa.tiletools.graphics.ImageSequenceDataPool;
import csa.tiletools.map.GridSettingsData;
import csa.tiletools.map.MapPanel;
import csa.tiletools.map.TMap;
import csa.tiletools.script.ExportFrame;
import csa.util.UtilityString;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.util.*;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.AbstractTableModel;

public class TileDataPanel extends javax.swing.JPanel implements
        Windowable{
    public static final int TILE_RECTANGLE = 0;
    public static final int TILE_ISO = 1;
    public static final int TILE_HEX = 2;

    private CSATablePanel csaPanel = null;

    Vector <TileData> mAllTilesInClass = new Vector <TileData>();

    // current working tile
    TileData mCurrentTile=null;
    private TileDataPool mTileDataPool = null;
    private int mClassSetting=0;

    Vector <TileAttribute> mAttributeData = new Vector <TileAttribute>();
    private AttributeBundleData mAttributeBundleData = new AttributeBundleData();

    TileAttribute mCurrentAttributeData = new TileAttribute();
    // event gotten row / column of double clicked tableentry
    private int mRow=-1;
    private int mCol=-1;

    // current working grafix
    private ImageSequenceData mData = new ImageSequenceData();
    private ImageSequenceDataPool mImageSequenceDataPool = null;

    private AttributeBundleDataPool mAttributeBundleDataPool = null;



    private CSAView mParent = null;
    private javax.swing.JMenuItem mParentMenuItem = null;

    @Override
    public void closing(){}
    @Override
    public void setParentWindow(CSAView jpv)
    {
        mParent = jpv;
    }
    @Override
    public void setMenuItem(javax.swing.JMenuItem item)
    {
        mParentMenuItem = item;
        mParentMenuItem.setText("Tile Resourcer");
    }
    @Override
    public javax.swing.JMenuItem getMenuItem()
    {
        return mParentMenuItem;
    }
    @Override
    public javax.swing.JPanel getPanel()
    {
        return this;
    }

    /** Creates new form TileDataPanel */
    public TileDataPanel() {
        initComponents();
        jLabel125.setVisible(false);
        jTextField9.setVisible(false);
        mAttributeBundleDataPool = new AttributeBundleDataPool();

        resetConfigPool(false, "", "");
        resetAttributePool();



        class MyTransferHandler extends TransferHandler
        {
            public MyTransferHandler()
            {
            }
            @Override
            public boolean canImport(TransferHandler.TransferSupport support)
            {
                return true;
            }
            @Override
            public boolean importData(TransferHandler.TransferSupport support)
            {
                try
                {
                    DataFlavor stringFlavor = DataFlavor.stringFlavor;
                    Component c = support.getComponent(); // target
                    Transferable t = support.getTransferable();
                    String data = t.getTransferData(stringFlavor).toString();
                    //System.out.println("Dropped: " + data);


                    int number = -1;

                    for (int i=1; i<32; i++)
                    {
                        if (transitionPanels[i] == (JPanel)c)
                        {
                            number = i;
                            break;
                        }
                    }
                    if (number == -1)
                    {
                        for (int i=0; i<20; i++)
                        {
                            if (transitionPanels2[i] == (JPanel)c)
                            {
                                number = i;
                                break;
                            }
                        }
                    }
                    if (number == -1)
                    {
                        for (int i=0; i<32; i++)
                        {
                            if (transitionPanelsISO[i] == (JPanel)c)
                            {
                                number = i;
                                break;
                            }
                        }
                    }

                    setTransitionTile(data, (JPanel)c, true, number);

                }
                catch (Throwable e)
                {
                    e.printStackTrace();
                }

                return true;
            }
        }

        class MyVariationTransferHandler extends TransferHandler
        {
            public MyVariationTransferHandler()
            {
            }
            @Override
            public boolean canImport(TransferHandler.TransferSupport support)
            {
                return true;
            }
            @Override
            public boolean importData(TransferHandler.TransferSupport support)
            {
                try
                {
                    DataFlavor stringFlavor = DataFlavor.stringFlavor;
                    Transferable t = support.getTransferable();
                    String data = t.getTransferData(stringFlavor).toString();
                    //System.out.println("Dropped variation: " + data);

                    addVariationTile(data, true);
                }
                catch (Throwable e)
                {
                    e.printStackTrace();
                }

                return true;
            }
        }
        jPanelIMageTileVariations.setTransferHandler(new MyVariationTransferHandler());

        transitionPanels[0] = null;
        transitionPanels[1] = jPanelE1;
        transitionPanels[2] = jPanelE2;
        transitionPanels[3] = jPanelE3;
        transitionPanels[4] = jPanelE4;
        transitionPanels[5] = jPanelE5;
        transitionPanels[6] = jPanelE6;
        transitionPanels[7] = jPanelE7;
        transitionPanels[8] = jPanelE8;
        transitionPanels[9] = jPanelE9;
        transitionPanels[10] = jPanelE10;
        transitionPanels[11] = jPanelE11;
        transitionPanels[12] = jPanelE12;
        transitionPanels[13] = jPanelE13;
        transitionPanels[14] = jPanelE14;
        transitionPanels[15] = jPanelE15;

        transitionPanels[16] = null;
        transitionPanels[17] = jPanelC1;
        transitionPanels[18] = jPanelC2;
        transitionPanels[19] = jPanelC3;
        transitionPanels[20] = jPanelC4;
        transitionPanels[21] = jPanelC5;
        transitionPanels[22] = jPanelC6;
        transitionPanels[23] = jPanelC7;
        transitionPanels[24] = jPanelC8;
        transitionPanels[25] = jPanelC9;
        transitionPanels[26] = jPanelC10;
        transitionPanels[27] = jPanelC11;
        transitionPanels[28] = jPanelC12;
        transitionPanels[29] = jPanelC13;
        transitionPanels[30] = jPanelC14;
        transitionPanels[31] = jPanelC15;

        for (int i=0; i<32; i++)
        {
            if (transitionPanels[i] != null)
                transitionPanels[i].setTransferHandler(new MyTransferHandler());
        }
        transitionPanels2[0] = jPanel3_1;
        transitionPanels2[1] = jPanel3_2;
        transitionPanels2[2] = jPanel3_3;
        transitionPanels2[3] = jPanel3_4;
        transitionPanels2[4] = jPanel2_1;
        transitionPanels2[5] = jPanel2_2;
        transitionPanels2[6] = jPanel2_3;
        transitionPanels2[7] = jPanel2_4;
        transitionPanels2[8] = jPanel2_5;
        transitionPanels2[9] = jPanel2_6;
        transitionPanels2[10] = jPanel2_7;
        transitionPanels2[11] = jPanel2_8;
        transitionPanels2[12] = jPanel1_1;
        transitionPanels2[13] = jPanel1_2;
        transitionPanels2[14] = jPanel1_3;
        transitionPanels2[15] = jPanel1_4;
        transitionPanels2[16] = jPanel1_5;
        transitionPanels2[17] = jPanel1_6;
        transitionPanels2[18] = jPanel1_7;
        transitionPanels2[19] = jPanel1_8;

        for (int i=0; i<20; i++)
        {
            if (transitionPanels2[i] != null)
                transitionPanels2[i].setTransferHandler(new MyTransferHandler());
        }
        
        
        
        transitionPanelsISO[0] = null;
        transitionPanelsISO[1] = jPanelE16;
        transitionPanelsISO[2] = jPanelE18;
        transitionPanelsISO[3] = jPanelE20;
        transitionPanelsISO[4] = jPanelE19;
        transitionPanelsISO[5] = jPanelE21;
        transitionPanelsISO[6] = jPanelE17;
        transitionPanelsISO[7] = jPanelE22;
        transitionPanelsISO[8] = jPanelE30;
        transitionPanelsISO[9] = jPanelE23;
        transitionPanelsISO[10] = jPanelE25;
        transitionPanelsISO[11] = jPanelE27;
        transitionPanelsISO[12] = jPanelE26;
        transitionPanelsISO[13] = jPanelE28;
        transitionPanelsISO[14] = jPanelE24;
        transitionPanelsISO[15] = jPanelE29;

        transitionPanelsISO[16] = null;
        transitionPanelsISO[17] = jPanelC16;
        transitionPanelsISO[18] = jPanelC18;
        transitionPanelsISO[19] = jPanelC20;
        transitionPanelsISO[20] = jPanelC19;
        transitionPanelsISO[21] = jPanelC21;
        transitionPanelsISO[22] = jPanelC17;
        transitionPanelsISO[23] = jPanelC22;
        transitionPanelsISO[24] = jPanelC30;
        transitionPanelsISO[25] = jPanelC23;
        transitionPanelsISO[26] = jPanelC25;
        transitionPanelsISO[27] = jPanelC27;
        transitionPanelsISO[28] = jPanelC26;
        transitionPanelsISO[29] = jPanelC28;
        transitionPanelsISO[30] = jPanelC24;
        transitionPanelsISO[31] = jPanelC29;

        for (int i=0; i<32; i++)
        {
            if (transitionPanelsISO[i] != null)
                transitionPanelsISO[i].setTransferHandler(new MyTransferHandler());
        }        
        
    }

    JPanel[] transitionPanelsISO = new JPanel[32];
    JPanel[] transitionPanels = new JPanel[32];
    JPanel[] transitionPanels2 = new JPanel[20];

    private void resetAttributePool() /* allneeded*/
    {
        mClassSetting++;
        String klasse = "ALL";

        Collection<AttributeBundleData> colC = mAttributeBundleDataPool.getMapForKlasse(klasse).values();
        Iterator<AttributeBundleData> iterC = colC.iterator();

        jComboBoxAttribute.removeAllItems();
        int i = 0;
        jComboBoxAttribute.addItem("");
        while (iterC.hasNext())
        {
            AttributeBundleData item = iterC.next();
            jComboBoxAttribute.addItem(item.mName);
            i++;
        }
        jComboBoxAttribute.setSelectedIndex(-1);
        mClassSetting--;
    }

    // Config Pool for TileMap
    private void resetConfigPool(boolean select, String klasseToSet, String tileToSet) /* allneeded*/
    {
        mClassSetting++;
        resetCompositeCache();
        jComboBoxKlasse.removeAllItems();
        mClassSetting--;
        jTextFieldKlasse.setText("");
        if (mTileDataPool == null) return;

        mClassSetting++;
        Collection<String> collectionKlasse = mTileDataPool.getKlassenHashMap().values();
        Iterator<String> iterKlasse = collectionKlasse.iterator();
        int i = 0;
        String klasse = "";

        while (iterKlasse.hasNext())
        {
            String item = iterKlasse.next();
            jComboBoxKlasse.addItem(item);
            if (select)
            {
                if (klasseToSet.length()==0)
                {
                    if (i==0)
                    {
                        // allow event to happen
                        mClassSetting--;
                        jComboBoxKlasse.setSelectedIndex(i);
                        mClassSetting++;
                        jTextFieldKlasse.setText(item);
                        klasse = item;
                    }
                }
                else
                {
                    if (klasseToSet.equalsIgnoreCase(item))
                    {
                        // allow event to happen
                        mClassSetting--;
                        jComboBoxKlasse.setSelectedIndex(i);
                        mClassSetting++;
                        jTextFieldKlasse.setText(item);
                        klasse = item;
                    }
                }
            }
            i++;
        }
        mClassSetting--;
        if ((select) && (klasse.length()==0))
        {
            if (jComboBoxKlasse.getItemCount()>0)
            {
                jComboBoxKlasse.setSelectedIndex(0);
                jTextFieldKlasse.setText(jComboBoxKlasse.getSelectedItem().toString());
                klasse = jComboBoxKlasse.getSelectedItem().toString();
            }
        }
        if (!select)  jComboBoxKlasse.setSelectedIndex(-1);


        if (!select)
        {
            removeAllGraphics(true);
        }
        resetTileList(tileToSet);
    }

    private void clearAll() /* allneeded*/
    {
        mClassSetting++;
        mCurrentTile = new TileData();
        jTextFieldKlasse.setText("");
        jComboBoxKlasse.setSelectedIndex(-1);
        setAllFromCurrent();
        mClassSetting--;
    }

    private void setAllFromCurrent() /* allneeded*/
    {
        mClassSetting++;
        jComboBoxKlasse.setSelectedItem(mCurrentTile.mClass);
        jTextFieldKlasse.setText(mCurrentTile.mClass);
        mClassSetting--;
    }

    private void readAllToCurrentTileSet() /* allneeded*/
    {
        mCurrentTile.mClass = jTextFieldKlasse.getText();
    }
    /** 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")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jComboBoxKlasse = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldKlasse = new javax.swing.JTextField();
        jButtonNew = new javax.swing.JButton();
        jButtonSaveTileSet = new javax.swing.JButton();
        jButtonSaveAsNew = new javax.swing.JButton();
        jButtonDelete = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldTileFile = new javax.swing.JTextField();
        jButtonFileSelect1 = new javax.swing.JButton();
        jButtonExport = new javax.swing.JButton();
        jPanel14 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jTextFieldGraphicsIMageCount = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jTextFieldGraphicsHeight = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jTextFieldGraphicsWidth = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jTextFieldGraphicsDelay = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jComboBoxNameGraphic = new javax.swing.JComboBox();
        jComboBoxKlasseGraphic = new javax.swing.JComboBox();
        jTextFieldGraphicFile = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jCheckBoxScaled = new javax.swing.JCheckBox();
        jScrollPane5 = new javax.swing.JScrollPane();
        imageComponent1 = new csa.tiletools.graphics.ImageComponent();
        jButtonFileSelect2 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jPanelIMageCollection = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jButtonAddAll = new javax.swing.JButton();
        jPanel16 = new javax.swing.JPanel();
        jScrollPane9 = new javax.swing.JScrollPane();
        jPanelIMageCollection1 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel4 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jTextFieldAttributeValue = new javax.swing.JTextField();
        jComboBoxAttributeType = new javax.swing.JComboBox();
        jComboBoxAttributeName = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jButtonAddOneAttribute = new javax.swing.JButton();
        jButtonNewAttribute = new javax.swing.JButton();
        jButtonDeleteSelectedAttributes = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        jTableAttributeTable = new javax.swing.JTable();
        jButtonSaveAttributeBundle = new javax.swing.JButton();
        jComboBoxAttribute = new javax.swing.JComboBox();
        jTextFieldAttributeBundleName = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jButtonReplaceAttribute = new javax.swing.JButton();
        jTextFieldTileName = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jTextFieldTileID = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jTextAreaDescription = new javax.swing.JTextArea();
        jTextFieldImageName = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jTextFieldGraphicsHeightTile = new javax.swing.JTextField();
        jTextFieldGraphicsWidthTile = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jCheckBoxForceTileSize = new javax.swing.JCheckBox();
        jLabel21 = new javax.swing.JLabel();
        jTextFieldImagePoolName = new javax.swing.JTextField();
        jLabel121 = new javax.swing.JLabel();
        jComboBoxAttributeType2 = new javax.swing.JComboBox();
        jPanel19 = new javax.swing.JPanel();
        jLabel123 = new javax.swing.JLabel();
        jTextField8 = new javax.swing.JTextField();
        jLabel125 = new javax.swing.JLabel();
        jTextField9 = new javax.swing.JTextField();
        jLabel126 = new javax.swing.JLabel();
        jTextField10 = new javax.swing.JTextField();
        jButton5 = new javax.swing.JButton();
        jLabel124 = new javax.swing.JLabel();
        jTextField6 = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jLabel17 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jButtonFileSelect3 = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jComboBoxAttributeName1 = new javax.swing.JComboBox();
        jComboBoxAttributeType1 = new javax.swing.JComboBox();
        jButtonAddOneAttribute1 = new javax.swing.JButton();
        jButtonNewAttribute1 = new javax.swing.JButton();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jButtonDeleteSelectedAttributes1 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jPanelSmoothing = new javax.swing.JPanel();
        jPanelE1 = new javax.swing.JPanel();
        jPanelE6 = new javax.swing.JPanel();
        jPanelE2 = new javax.swing.JPanel();
        jPanelE4 = new javax.swing.JPanel();
        jPanelE3 = new javax.swing.JPanel();
        jPanelE5 = new javax.swing.JPanel();
        jPanelE7 = new javax.swing.JPanel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jPanelSmoothing1 = new javax.swing.JPanel();
        jPanelE9 = new javax.swing.JPanel();
        jPanelE14 = new javax.swing.JPanel();
        jPanelE10 = new javax.swing.JPanel();
        jPanelE12 = new javax.swing.JPanel();
        jPanelE11 = new javax.swing.JPanel();
        jPanelE13 = new javax.swing.JPanel();
        jPanelE15 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jPanelE8 = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        jPanelSmoothing2 = new javax.swing.JPanel();
        jPanelC1 = new javax.swing.JPanel();
        jPanelC6 = new javax.swing.JPanel();
        jPanelC2 = new javax.swing.JPanel();
        jPanelC4 = new javax.swing.JPanel();
        jPanelC3 = new javax.swing.JPanel();
        jPanelC5 = new javax.swing.JPanel();
        jPanelC7 = new javax.swing.JPanel();
        jLabel35 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jPanelSmoothing3 = new javax.swing.JPanel();
        jPanelC9 = new javax.swing.JPanel();
        jPanelC14 = new javax.swing.JPanel();
        jPanelC10 = new javax.swing.JPanel();
        jPanelC12 = new javax.swing.JPanel();
        jPanelC11 = new javax.swing.JPanel();
        jPanelC13 = new javax.swing.JPanel();
        jPanelC15 = new javax.swing.JPanel();
        jLabel49 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        jLabel51 = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        jLabel55 = new javax.swing.JLabel();
        jPanelC8 = new javax.swing.JPanel();
        jLabel56 = new javax.swing.JLabel();
        jLabel57 = new javax.swing.JLabel();
        jLabel58 = new javax.swing.JLabel();
        jCheckBoxUseArtifact = new javax.swing.JCheckBox();
        jTextField2 = new javax.swing.JTextField();
        jLabel69 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jPanel18 = new javax.swing.JPanel();
        jPanelSmoothing4 = new javax.swing.JPanel();
        jPanelE16 = new javax.swing.JPanel();
        jPanelE17 = new javax.swing.JPanel();
        jPanelE18 = new javax.swing.JPanel();
        jPanelE19 = new javax.swing.JPanel();
        jPanelE20 = new javax.swing.JPanel();
        jPanelE21 = new javax.swing.JPanel();
        jPanelE22 = new javax.swing.JPanel();
        jLabel63 = new javax.swing.JLabel();
        jLabel64 = new javax.swing.JLabel();
        jLabel65 = new javax.swing.JLabel();
        jLabel66 = new javax.swing.JLabel();
        jLabel67 = new javax.swing.JLabel();
        jLabel70 = new javax.swing.JLabel();
        jLabel71 = new javax.swing.JLabel();
        jPanelSmoothing5 = new javax.swing.JPanel();
        jPanelE23 = new javax.swing.JPanel();
        jPanelE24 = new javax.swing.JPanel();
        jPanelE25 = new javax.swing.JPanel();
        jPanelE26 = new javax.swing.JPanel();
        jPanelE27 = new javax.swing.JPanel();
        jPanelE28 = new javax.swing.JPanel();
        jPanelE29 = new javax.swing.JPanel();
        jLabel72 = new javax.swing.JLabel();
        jLabel73 = new javax.swing.JLabel();
        jLabel74 = new javax.swing.JLabel();
        jLabel75 = new javax.swing.JLabel();
        jLabel76 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        jLabel81 = new javax.swing.JLabel();
        jPanelE30 = new javax.swing.JPanel();
        jLabel82 = new javax.swing.JLabel();
        jPanelSmoothing7 = new javax.swing.JPanel();
        jPanelC16 = new javax.swing.JPanel();
        jPanelC17 = new javax.swing.JPanel();
        jPanelC18 = new javax.swing.JPanel();
        jPanelC19 = new javax.swing.JPanel();
        jPanelC20 = new javax.swing.JPanel();
        jPanelC21 = new javax.swing.JPanel();
        jPanelC22 = new javax.swing.JPanel();
        jLabel83 = new javax.swing.JLabel();
        jLabel85 = new javax.swing.JLabel();
        jLabel86 = new javax.swing.JLabel();
        jLabel87 = new javax.swing.JLabel();
        jLabel88 = new javax.swing.JLabel();
        jLabel89 = new javax.swing.JLabel();
        jLabel90 = new javax.swing.JLabel();
        jPanelSmoothing10 = new javax.swing.JPanel();
        jPanelC23 = new javax.swing.JPanel();
        jPanelC24 = new javax.swing.JPanel();
        jPanelC25 = new javax.swing.JPanel();
        jPanelC26 = new javax.swing.JPanel();
        jPanelC27 = new javax.swing.JPanel();
        jPanelC28 = new javax.swing.JPanel();
        jPanelC29 = new javax.swing.JPanel();
        jLabel91 = new javax.swing.JLabel();
        jLabel112 = new javax.swing.JLabel();
        jLabel113 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        jLabel115 = new javax.swing.JLabel();
        jLabel116 = new javax.swing.JLabel();
        jLabel117 = new javax.swing.JLabel();
        jPanelC30 = new javax.swing.JPanel();
        jLabel118 = new javax.swing.JLabel();
        jLabel119 = new javax.swing.JLabel();
        jLabel120 = new javax.swing.JLabel();
        jCheckBoxUseArtifact1 = new javax.swing.JCheckBox();
        jButton4 = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanelSmoothing6 = new javax.swing.JPanel();
        jPanel3_2 = new javax.swing.JPanel();
        jPanel3_3 = new javax.swing.JPanel();
        jPanel3_4 = new javax.swing.JPanel();
        jLabel77 = new javax.swing.JLabel();
        jLabel78 = new javax.swing.JLabel();
        jLabel79 = new javax.swing.JLabel();
        jPanel3_1 = new javax.swing.JPanel();
        jLabel84 = new javax.swing.JLabel();
        jPanelSmoothing8 = new javax.swing.JPanel();
        jPanel1_2 = new javax.swing.JPanel();
        jPanel1_7 = new javax.swing.JPanel();
        jPanel1_3 = new javax.swing.JPanel();
        jPanel1_5 = new javax.swing.JPanel();
        jPanel1_4 = new javax.swing.JPanel();
        jPanel1_6 = new javax.swing.JPanel();
        jPanel1_8 = new javax.swing.JPanel();
        jLabel92 = new javax.swing.JLabel();
        jLabel93 = new javax.swing.JLabel();
        jLabel94 = new javax.swing.JLabel();
        jLabel95 = new javax.swing.JLabel();
        jLabel96 = new javax.swing.JLabel();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jPanel1_1 = new javax.swing.JPanel();
        jLabel99 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        jLabel101 = new javax.swing.JLabel();
        jLabel102 = new javax.swing.JLabel();
        jPanelSmoothing9 = new javax.swing.JPanel();
        jPanel2_2 = new javax.swing.JPanel();
        jPanel2_7 = new javax.swing.JPanel();
        jPanel2_3 = new javax.swing.JPanel();
        jPanel2_5 = new javax.swing.JPanel();
        jPanel2_4 = new javax.swing.JPanel();
        jPanel2_6 = new javax.swing.JPanel();
        jPanel2_8 = new javax.swing.JPanel();
        jLabel103 = new javax.swing.JLabel();
        jLabel104 = new javax.swing.JLabel();
        jLabel105 = new javax.swing.JLabel();
        jLabel106 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        jLabel109 = new javax.swing.JLabel();
        jPanel2_1 = new javax.swing.JPanel();
        jLabel110 = new javax.swing.JLabel();
        jCheckBoxUseTopDown = new javax.swing.JCheckBox();
        jTextField3 = new javax.swing.JTextField();
        jLabel111 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jLabel122 = new javax.swing.JLabel();
        jCheckBox5 = new javax.swing.JCheckBox();
        jTextField4 = new javax.swing.JTextField();
        jLabel131 = new javax.swing.JLabel();
        jLabel68 = new javax.swing.JLabel();
        jTextFieldPriority = new javax.swing.JTextField();
        jCheckBoxIsTerrainTransitionTile = new javax.swing.JCheckBox();
        jPanel11 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jTextField5 = new javax.swing.JTextField();
        jPanelIMageTileVariations = new javax.swing.JPanel();
        jLabel59 = new javax.swing.JLabel();
        jLabel60 = new javax.swing.JLabel();
        jLabel61 = new javax.swing.JLabel();
        jLabel62 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jButtonAddOneTile = new javax.swing.JButton();
        jButtonRemoveOneTile = new javax.swing.JButton();
        jButtonNewTile = new javax.swing.JButton();
        jButtonSetImage = new javax.swing.JButton();
        jTabbedPane3 = new javax.swing.JTabbedPane();
        jScrollPane6 = new javax.swing.JScrollPane();
        jPanelTileView = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        mapPanel = new csa.tiletools.map.MapPanel();

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Tile Set"));

        jComboBoxKlasse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxKlasseActionPerformed(evt);
            }
        });

        jLabel4.setText("Class");

        jButtonNew.setText("New TileSet");
        jButtonNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNewActionPerformed(evt);
            }
        });

        jButtonSaveTileSet.setText("Save TileSet");
        jButtonSaveTileSet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveTileSetActionPerformed(evt);
            }
        });

        jButtonSaveAsNew.setText("Save as new TileSet");
        jButtonSaveAsNew.setEnabled(false);
        jButtonSaveAsNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveAsNewActionPerformed(evt);
            }
        });

        jButtonDelete.setText("Delete TileSet");
        jButtonDelete.setEnabled(false);
        jButtonDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDeleteActionPerformed(evt);
            }
        });

        jLabel5.setText("Filename");

        jTextFieldTileFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldTileFileActionPerformed(evt);
            }
        });
        jTextFieldTileFile.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextFieldTileFileFocusLost(evt);
            }
        });

        jButtonFileSelect1.setText("...");
        jButtonFileSelect1.setMargin(new java.awt.Insets(0, 1, 0, -1));
        jButtonFileSelect1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonFileSelect1ActionPerformed(evt);
            }
        });

        jButtonExport.setText("User Export");
        jButtonExport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonExportActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTextFieldKlasse)
                    .addComponent(jTextFieldTileFile, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonFileSelect1)
                    .addComponent(jComboBoxKlasse, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonSaveTileSet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonNew, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(26, 26, 26)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonSaveAsNew, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(30, 30, 30)
                .addComponent(jButtonExport)
                .addGap(220, 220, 220))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jButtonDelete)
                                .addComponent(jButtonExport))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jButtonSaveTileSet)
                                .addComponent(jButtonSaveAsNew)))
                        .addComponent(jButtonNew))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldTileFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)
                            .addComponent(jButtonFileSelect1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldKlasse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel4))
                            .addComponent(jComboBoxKlasse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder("Image data"));

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jTextFieldGraphicsIMageCount.setEditable(false);

        jLabel7.setText("Width");

        jLabel8.setText("Height");

        jTextFieldGraphicsHeight.setEditable(false);

        jLabel6.setText("Image count");

        jTextFieldGraphicsWidth.setEditable(false);

        jLabel9.setText("Delay");

        jTextFieldGraphicsDelay.setEditable(false);

        jLabel22.setText("(max size)");

        jLabel23.setText("(max size)");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8))
                .addGap(40, 40, 40)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jTextFieldGraphicsHeight, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel23))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jTextFieldGraphicsWidth, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel22)))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldGraphicsIMageCount, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGraphicsDelay, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldGraphicsHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldGraphicsWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel22))
                .addGap(109, 109, 109))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldGraphicsIMageCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(jTextFieldGraphicsDelay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel1.setText("Image-File");

        jLabel2.setText("Class");

        jComboBoxNameGraphic.setEnabled(false);
        jComboBoxNameGraphic.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxNameGraphicActionPerformed(evt);
            }
        });

        jComboBoxKlasseGraphic.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxKlasseGraphicActionPerformed(evt);
            }
        });

        jTextFieldGraphicFile.setToolTipText("A xml- file which holds graphics data  information as provided by images-resourcer.");
        jTextFieldGraphicFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldGraphicFileActionPerformed(evt);
            }
        });
        jTextFieldGraphicFile.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextFieldGraphicFileFocusLost(evt);
            }
        });

        jLabel3.setText("Name");

        jCheckBoxScaled.setText("scaled");
        jCheckBoxScaled.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxScaledActionPerformed(evt);
            }
        });

        jScrollPane5.setPreferredSize(new java.awt.Dimension(106, 106));

        imageComponent1.setPreferredSize(new java.awt.Dimension(102, 102));

        javax.swing.GroupLayout imageComponent1Layout = new javax.swing.GroupLayout(imageComponent1);
        imageComponent1.setLayout(imageComponent1Layout);
        imageComponent1Layout.setHorizontalGroup(
            imageComponent1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 104, Short.MAX_VALUE)
        );
        imageComponent1Layout.setVerticalGroup(
            imageComponent1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 104, Short.MAX_VALUE)
        );

        jScrollPane5.setViewportView(imageComponent1);

        jButtonFileSelect2.setText("...");
        jButtonFileSelect2.setMargin(new java.awt.Insets(0, 1, 0, -1));
        jButtonFileSelect2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonFileSelect2ActionPerformed(evt);
            }
        });

        jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

        jPanelIMageCollection.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelIMageCollection.setLayout(new java.awt.FlowLayout(3));

        jPanel13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel13.setPreferredSize(new java.awt.Dimension(52, 52));

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );

        jPanelIMageCollection.add(jPanel13);

        jPanel15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel15.setPreferredSize(new java.awt.Dimension(52, 52));

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );

        jPanelIMageCollection.add(jPanel15);

        jScrollPane2.setViewportView(jPanelIMageCollection);

        jButtonAddAll.setText("Add all as tiles!");
        jButtonAddAll.setToolTipText("Adds all ImagesSequences of the class to the current tileset. Values used as supplied below.");
        jButtonAddAll.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddAllActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addGap(26, 26, 26)
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel3)))
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(jCheckBoxScaled)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jComboBoxNameGraphic, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGroup(jPanel14Layout.createSequentialGroup()
                                        .addComponent(jTextFieldGraphicFile, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonFileSelect2))
                                    .addComponent(jComboBoxKlasseGraphic, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(12, 12, 12)
                                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jButtonAddAll))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane2)))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel14Layout.createSequentialGroup()
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel1)
                                    .addComponent(jTextFieldGraphicFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jButtonFileSelect2))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jComboBoxKlasseGraphic, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel2))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jComboBoxNameGraphic, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jCheckBoxScaled)
                                    .addComponent(jButtonAddAll)))
                            .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder("Tile Collection"));
        jPanel16.setAlignmentX(1.0F);

        jScrollPane9.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        jScrollPane9.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        jPanelIMageCollection1.setMinimumSize(new java.awt.Dimension(20, 20));
        jPanelIMageCollection1.setLayout(null);

        jPanel17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel17.setPreferredSize(new java.awt.Dimension(52, 52));

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );

        jPanelIMageCollection1.add(jPanel17);
        jPanel17.setBounds(5, 5, 52, 52);

        jScrollPane9.setViewportView(jPanelIMageCollection1);

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane9)
        );

        jTabbedPane1.setAlignmentY(1.0F);

        jLabel14.setText("Name");

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder("Attributes"));

        jComboBoxAttributeType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Integer", "Boolean", "String" }));

        jComboBoxAttributeName.setEditable(true);

        jLabel11.setText("Name");

        jLabel12.setText("Type");

        jLabel13.setText("Value");

        jButtonAddOneAttribute.setText("Add");
        jButtonAddOneAttribute.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddOneAttributeActionPerformed(evt);
            }
        });

        jButtonNewAttribute.setText("New");
        jButtonNewAttribute.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNewAttributeActionPerformed(evt);
            }
        });

        jButtonDeleteSelectedAttributes.setText("Delete selection");
        jButtonDeleteSelectedAttributes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDeleteSelectedAttributesActionPerformed(evt);
            }
        });

        jTableAttributeTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane8.setViewportView(jTableAttributeTable);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 496, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
        );

        jButtonSaveAttributeBundle.setText("Save as Attribute bundle");
        jButtonSaveAttributeBundle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveAttributeBundleActionPerformed(evt);
            }
        });

        jComboBoxAttribute.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jComboBoxAttribute.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxAttributeActionPerformed(evt);
            }
        });

        jLabel10.setText("Attribute bundle");

        jButtonReplaceAttribute.setText("Replace");
        jButtonReplaceAttribute.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonReplaceAttributeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jComboBoxAttributeName, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldAttributeValue)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jComboBoxAttributeType, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addComponent(jButtonAddOneAttribute)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButtonReplaceAttribute))
                    .addComponent(jButtonNewAttribute))
                .addContainerGap())
            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jButtonDeleteSelectedAttributes)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jComboBoxAttribute, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTextFieldAttributeBundleName, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonSaveAttributeBundle))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(jComboBoxAttributeName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(jComboBoxAttributeType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonAddOneAttribute)
                    .addComponent(jButtonReplaceAttribute))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(jTextFieldAttributeValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonNewAttribute))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButtonDeleteSelectedAttributes)
                        .addComponent(jButtonSaveAttributeBundle)
                        .addComponent(jTextFieldAttributeBundleName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel10))
                    .addComponent(jComboBoxAttribute, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jLabel15.setText("ID ");

        jLabel16.setText("Description");

        jTextAreaDescription.setColumns(20);
        jTextAreaDescription.setLineWrap(true);
        jTextAreaDescription.setRows(3);
        jTextAreaDescription.setTabSize(4);
        jTextAreaDescription.setWrapStyleWord(true);
        jScrollPane7.setViewportView(jTextAreaDescription);

        jLabel18.setText("Image name:");

        jTextFieldGraphicsHeightTile.setToolTipText("If size is not the same as graphic, the grafix will be scaled to this size!");

        jTextFieldGraphicsWidthTile.setToolTipText("If size is not the same as graphic, the grafix will be scaled to this size!");

        jLabel19.setText("height");

        jLabel20.setText("width");

        jCheckBoxForceTileSize.setText("Force");
        jCheckBoxForceTileSize.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxForceTileSizeActionPerformed(evt);
            }
        });

        jLabel21.setText("Image pool:");

        jLabel121.setText("type");

        jComboBoxAttributeType2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Rectangle", "ISO", "Hex" }));
        jComboBoxAttributeType2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxAttributeType2ActionPerformed(evt);
            }
        });

        jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder("ISO"));

        jLabel123.setText("height");
        jLabel123.setEnabled(false);

        jTextField8.setToolTipText("<html>  In opposite to the \"real\" height of an ISO tile IMAGE , this height is the size the tile will<br> accounted for in any calculation. a 64x64 night be treated as a 64x32 tile<BR> in every respect but displaying!<br> <BR> An ISO tile automatically is displayed so that the last line of its <br> ISO height lies on the bottom of the grid.<bR> This might still be altered by the offset.  </html> ");
        jTextField8.setEnabled(false);

        jLabel125.setEnabled(false);

        jTextField9.setEnabled(false);

        jLabel126.setText("offset");
        jLabel126.setEnabled(false);

        jTextField10.setToolTipText("<html>  An ISO tile automatically is displayed so that the last line of its <br> ISO height lies on the bottom of the grid.<bR> This might still be altered by the offset. </html> ");
        jTextField10.setEnabled(false);

        jButton5.setText("reInit");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jLabel124.setText("inherent offset");
        jLabel124.setEnabled(false);

        jTextField6.setToolTipText("<html> Inherent offset is not used for displaying. Rather for \"grow\" tiles.<BR> grow tiles \"may\" use this offset to center growing on the actual ISO height.<BR> -> not implemented!<BR> </html> ");
        jTextField6.setEnabled(false);

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addComponent(jLabel123)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel125)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(48, 48, 48)
                .addComponent(jLabel126)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel124)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(22, 22, 22))
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel123)
                        .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel125))
                    .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel126)
                        .addComponent(jButton5)
                        .addComponent(jLabel124)
                        .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 19, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldTileName, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(4, 4, 4)
                        .addComponent(jLabel15))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel18)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldImageName, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldTileID, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addComponent(jLabel19))
                .addGap(0, 0, 0)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jTextFieldGraphicsHeightTile, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel20)
                        .addGap(1, 1, 1)
                        .addComponent(jTextFieldGraphicsWidthTile, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jCheckBoxForceTileSize))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jTextFieldImagePoolName, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel121)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBoxAttributeType2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(22, 22, 22))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel14)
                            .addComponent(jTextFieldTileName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel15)
                            .addComponent(jTextFieldTileID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel16)
                            .addComponent(jTextFieldImageName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18)))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel19)
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldGraphicsHeightTile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jCheckBoxForceTileSize)
                                .addComponent(jTextFieldGraphicsWidthTile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel20)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldImagePoolName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel21)
                                .addComponent(jLabel121))
                            .addComponent(jComboBoxAttributeType2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Overall tile info", jPanel4);

        jCheckBox1.setText("Tile loops");

        jCheckBox2.setText("Actions can be broken");

        jLabel17.setText("Sound");

        jButtonFileSelect3.setText("...");
        jButtonFileSelect3.setMargin(new java.awt.Insets(0, 1, 0, -1));
        jButtonFileSelect3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonFileSelect3ActionPerformed(evt);
            }
        });

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        jComboBoxAttributeName1.setEditable(true);
        jComboBoxAttributeName1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " ", "CLICK", "HOVER", "NEXT", "UP", "DOWN", "SOUTH", "NORTH", "EAST", "WEST", "TO_INVISIBLE", "TO_VISIBLE", "EXTERNAL", "REMOVE", "CHANGE" }));

        jComboBoxAttributeType1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Integer", "Boolean", "String" }));

        jButtonAddOneAttribute1.setText("Add");
        jButtonAddOneAttribute1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddOneAttribute1ActionPerformed(evt);
            }
        });

        jButtonNewAttribute1.setText("New");
        jButtonNewAttribute1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNewAttribute1ActionPerformed(evt);
            }
        });

        jLabel25.setText("Actiontype");

        jLabel26.setText("Action tile");

        jButtonDeleteSelectedAttributes1.setText("Delete selection");
        jButtonDeleteSelectedAttributes1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDeleteSelectedAttributes1ActionPerformed(evt);
            }
        });

        jButton1.setText("Trigger");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jCheckBox1)
                        .addGap(172, 172, 172)
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonFileSelect3))
                    .addComponent(jCheckBox2)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBoxAttributeName1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel26)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBoxAttributeType1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonAddOneAttribute1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonNewAttribute1))
                    .addComponent(jButtonDeleteSelectedAttributes1)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jButton1)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(182, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jCheckBox1)
                            .addComponent(jLabel17)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButtonFileSelect3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jCheckBox2)
                                .addGap(10, 10, 10)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel25)
                                    .addComponent(jComboBoxAttributeName1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jLabel26)
                            .addComponent(jComboBoxAttributeType1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButtonAddOneAttribute1)
                        .addComponent(jButtonNewAttribute1)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonDeleteSelectedAttributes1)
                .addGap(13, 13, 13)
                .addComponent(jButton1)
                .addContainerGap(55, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Actions", jPanel2);

        jPanelSmoothing.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing.setLayout(null);

        jPanelE1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE1.setName(""); // NOI18N
        jPanelE1.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE1Layout = new javax.swing.GroupLayout(jPanelE1);
        jPanelE1.setLayout(jPanelE1Layout);
        jPanelE1Layout.setHorizontalGroup(
            jPanelE1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE1Layout.setVerticalGroup(
            jPanelE1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE1);
        jPanelE1.setBounds(106, 2, 40, 40);

        jPanelE6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE6.setName(""); // NOI18N
        jPanelE6.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE6Layout = new javax.swing.GroupLayout(jPanelE6);
        jPanelE6.setLayout(jPanelE6Layout);
        jPanelE6Layout.setHorizontalGroup(
            jPanelE6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE6Layout.setVerticalGroup(
            jPanelE6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE6);
        jPanelE6.setBounds(466, 2, 40, 40);

        jPanelE2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE2.setName(""); // NOI18N
        jPanelE2.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE2Layout = new javax.swing.GroupLayout(jPanelE2);
        jPanelE2.setLayout(jPanelE2Layout);
        jPanelE2Layout.setHorizontalGroup(
            jPanelE2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE2Layout.setVerticalGroup(
            jPanelE2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE2);
        jPanelE2.setBounds(178, 2, 40, 40);

        jPanelE4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE4.setName(""); // NOI18N
        jPanelE4.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE4Layout = new javax.swing.GroupLayout(jPanelE4);
        jPanelE4.setLayout(jPanelE4Layout);
        jPanelE4Layout.setHorizontalGroup(
            jPanelE4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE4Layout.setVerticalGroup(
            jPanelE4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE4);
        jPanelE4.setBounds(322, 2, 40, 40);

        jPanelE3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE3.setName(""); // NOI18N
        jPanelE3.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE3Layout = new javax.swing.GroupLayout(jPanelE3);
        jPanelE3.setLayout(jPanelE3Layout);
        jPanelE3Layout.setHorizontalGroup(
            jPanelE3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE3Layout.setVerticalGroup(
            jPanelE3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE3);
        jPanelE3.setBounds(250, 2, 40, 40);

        jPanelE5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE5.setName(""); // NOI18N
        jPanelE5.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE5Layout = new javax.swing.GroupLayout(jPanelE5);
        jPanelE5.setLayout(jPanelE5Layout);
        jPanelE5Layout.setHorizontalGroup(
            jPanelE5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE5Layout.setVerticalGroup(
            jPanelE5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE5);
        jPanelE5.setBounds(394, 2, 40, 40);

        jPanelE7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE7.setName(""); // NOI18N
        jPanelE7.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE7Layout = new javax.swing.GroupLayout(jPanelE7);
        jPanelE7.setLayout(jPanelE7Layout);
        jPanelE7Layout.setHorizontalGroup(
            jPanelE7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE7Layout.setVerticalGroup(
            jPanelE7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing.add(jPanelE7);
        jPanelE7.setBounds(538, 2, 40, 40);

        jLabel28.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/01.png"))); // NOI18N
        jPanelSmoothing.add(jLabel28);
        jLabel28.setBounds(78, 8, 27, 27);

        jLabel29.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/02.png"))); // NOI18N
        jPanelSmoothing.add(jLabel29);
        jLabel29.setBounds(150, 8, 27, 27);

        jLabel30.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/03.png"))); // NOI18N
        jPanelSmoothing.add(jLabel30);
        jLabel30.setBounds(222, 8, 27, 27);

        jLabel31.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/04.png"))); // NOI18N
        jPanelSmoothing.add(jLabel31);
        jLabel31.setBounds(294, 8, 27, 27);

        jLabel32.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/05.png"))); // NOI18N
        jPanelSmoothing.add(jLabel32);
        jLabel32.setBounds(366, 8, 27, 27);

        jLabel33.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/06.png"))); // NOI18N
        jPanelSmoothing.add(jLabel33);
        jLabel33.setBounds(438, 8, 27, 27);

        jLabel34.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/07.png"))); // NOI18N
        jPanelSmoothing.add(jLabel34);
        jLabel34.setBounds(510, 8, 27, 27);

        jPanelSmoothing1.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing1.setLayout(null);

        jPanelE9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE9.setName(""); // NOI18N
        jPanelE9.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE9Layout = new javax.swing.GroupLayout(jPanelE9);
        jPanelE9.setLayout(jPanelE9Layout);
        jPanelE9Layout.setHorizontalGroup(
            jPanelE9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE9Layout.setVerticalGroup(
            jPanelE9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE9);
        jPanelE9.setBounds(106, 2, 40, 40);

        jPanelE14.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE14.setName(""); // NOI18N
        jPanelE14.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE14Layout = new javax.swing.GroupLayout(jPanelE14);
        jPanelE14.setLayout(jPanelE14Layout);
        jPanelE14Layout.setHorizontalGroup(
            jPanelE14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE14Layout.setVerticalGroup(
            jPanelE14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE14);
        jPanelE14.setBounds(466, 2, 40, 40);

        jPanelE10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE10.setName(""); // NOI18N
        jPanelE10.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE10Layout = new javax.swing.GroupLayout(jPanelE10);
        jPanelE10.setLayout(jPanelE10Layout);
        jPanelE10Layout.setHorizontalGroup(
            jPanelE10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE10Layout.setVerticalGroup(
            jPanelE10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE10);
        jPanelE10.setBounds(178, 2, 40, 40);

        jPanelE12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE12.setName(""); // NOI18N
        jPanelE12.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE12Layout = new javax.swing.GroupLayout(jPanelE12);
        jPanelE12.setLayout(jPanelE12Layout);
        jPanelE12Layout.setHorizontalGroup(
            jPanelE12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE12Layout.setVerticalGroup(
            jPanelE12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE12);
        jPanelE12.setBounds(322, 2, 40, 40);

        jPanelE11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE11.setName(""); // NOI18N
        jPanelE11.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE11Layout = new javax.swing.GroupLayout(jPanelE11);
        jPanelE11.setLayout(jPanelE11Layout);
        jPanelE11Layout.setHorizontalGroup(
            jPanelE11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE11Layout.setVerticalGroup(
            jPanelE11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE11);
        jPanelE11.setBounds(250, 2, 40, 40);

        jPanelE13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE13.setName(""); // NOI18N
        jPanelE13.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE13Layout = new javax.swing.GroupLayout(jPanelE13);
        jPanelE13.setLayout(jPanelE13Layout);
        jPanelE13Layout.setHorizontalGroup(
            jPanelE13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE13Layout.setVerticalGroup(
            jPanelE13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE13);
        jPanelE13.setBounds(394, 2, 40, 40);

        jPanelE15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE15.setName(""); // NOI18N
        jPanelE15.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE15Layout = new javax.swing.GroupLayout(jPanelE15);
        jPanelE15.setLayout(jPanelE15Layout);
        jPanelE15Layout.setHorizontalGroup(
            jPanelE15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE15Layout.setVerticalGroup(
            jPanelE15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE15);
        jPanelE15.setBounds(538, 2, 40, 40);

        jLabel36.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/09.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel36);
        jLabel36.setBounds(78, 8, 27, 27);

        jLabel37.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/010.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel37);
        jLabel37.setBounds(150, 8, 27, 27);

        jLabel38.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/011.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel38);
        jLabel38.setBounds(222, 8, 27, 27);

        jLabel39.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/012.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel39);
        jLabel39.setBounds(294, 8, 27, 27);

        jLabel40.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/013.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel40);
        jLabel40.setBounds(366, 8, 27, 27);

        jLabel41.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/014.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel41);
        jLabel41.setBounds(438, 8, 27, 27);

        jLabel42.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/015.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel42);
        jLabel42.setBounds(510, 8, 27, 27);

        jPanelE8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE8.setName(""); // NOI18N
        jPanelE8.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE8Layout = new javax.swing.GroupLayout(jPanelE8);
        jPanelE8.setLayout(jPanelE8Layout);
        jPanelE8Layout.setHorizontalGroup(
            jPanelE8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE8Layout.setVerticalGroup(
            jPanelE8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing1.add(jPanelE8);
        jPanelE8.setBounds(34, 2, 40, 40);

        jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/08.png"))); // NOI18N
        jPanelSmoothing1.add(jLabel24);
        jLabel24.setBounds(6, 8, 27, 27);

        jPanelSmoothing2.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing2.setLayout(null);

        jPanelC1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC1.setName(""); // NOI18N
        jPanelC1.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC1Layout = new javax.swing.GroupLayout(jPanelC1);
        jPanelC1.setLayout(jPanelC1Layout);
        jPanelC1Layout.setHorizontalGroup(
            jPanelC1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC1Layout.setVerticalGroup(
            jPanelC1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC1);
        jPanelC1.setBounds(106, 2, 40, 40);

        jPanelC6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC6.setName(""); // NOI18N
        jPanelC6.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC6Layout = new javax.swing.GroupLayout(jPanelC6);
        jPanelC6.setLayout(jPanelC6Layout);
        jPanelC6Layout.setHorizontalGroup(
            jPanelC6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC6Layout.setVerticalGroup(
            jPanelC6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC6);
        jPanelC6.setBounds(466, 2, 40, 40);

        jPanelC2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC2.setName(""); // NOI18N
        jPanelC2.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC2Layout = new javax.swing.GroupLayout(jPanelC2);
        jPanelC2.setLayout(jPanelC2Layout);
        jPanelC2Layout.setHorizontalGroup(
            jPanelC2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC2Layout.setVerticalGroup(
            jPanelC2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC2);
        jPanelC2.setBounds(178, 2, 40, 40);

        jPanelC4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC4.setName(""); // NOI18N
        jPanelC4.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC4Layout = new javax.swing.GroupLayout(jPanelC4);
        jPanelC4.setLayout(jPanelC4Layout);
        jPanelC4Layout.setHorizontalGroup(
            jPanelC4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC4Layout.setVerticalGroup(
            jPanelC4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC4);
        jPanelC4.setBounds(322, 2, 40, 40);

        jPanelC3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC3.setName(""); // NOI18N
        jPanelC3.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC3Layout = new javax.swing.GroupLayout(jPanelC3);
        jPanelC3.setLayout(jPanelC3Layout);
        jPanelC3Layout.setHorizontalGroup(
            jPanelC3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC3Layout.setVerticalGroup(
            jPanelC3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC3);
        jPanelC3.setBounds(250, 2, 40, 40);

        jPanelC5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC5.setName(""); // NOI18N
        jPanelC5.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC5Layout = new javax.swing.GroupLayout(jPanelC5);
        jPanelC5.setLayout(jPanelC5Layout);
        jPanelC5Layout.setHorizontalGroup(
            jPanelC5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC5Layout.setVerticalGroup(
            jPanelC5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC5);
        jPanelC5.setBounds(394, 2, 40, 40);

        jPanelC7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC7.setName(""); // NOI18N
        jPanelC7.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC7Layout = new javax.swing.GroupLayout(jPanelC7);
        jPanelC7.setLayout(jPanelC7Layout);
        jPanelC7Layout.setHorizontalGroup(
            jPanelC7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC7Layout.setVerticalGroup(
            jPanelC7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing2.add(jPanelC7);
        jPanelC7.setBounds(538, 2, 40, 40);

        jLabel35.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/017.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel35);
        jLabel35.setBounds(78, 8, 27, 27);

        jLabel43.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/018.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel43);
        jLabel43.setBounds(150, 8, 27, 27);

        jLabel44.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/019.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel44);
        jLabel44.setBounds(222, 8, 27, 27);

        jLabel45.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/020.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel45);
        jLabel45.setBounds(294, 8, 27, 27);

        jLabel46.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/021.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel46);
        jLabel46.setBounds(366, 8, 27, 27);

        jLabel47.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/022.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel47);
        jLabel47.setBounds(438, 8, 27, 27);

        jLabel48.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/023.png"))); // NOI18N
        jPanelSmoothing2.add(jLabel48);
        jLabel48.setBounds(510, 8, 27, 27);

        jPanelSmoothing3.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing3.setLayout(null);

        jPanelC9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC9.setName(""); // NOI18N
        jPanelC9.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC9Layout = new javax.swing.GroupLayout(jPanelC9);
        jPanelC9.setLayout(jPanelC9Layout);
        jPanelC9Layout.setHorizontalGroup(
            jPanelC9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC9Layout.setVerticalGroup(
            jPanelC9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC9);
        jPanelC9.setBounds(106, 2, 40, 40);

        jPanelC14.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC14.setName(""); // NOI18N
        jPanelC14.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC14Layout = new javax.swing.GroupLayout(jPanelC14);
        jPanelC14.setLayout(jPanelC14Layout);
        jPanelC14Layout.setHorizontalGroup(
            jPanelC14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC14Layout.setVerticalGroup(
            jPanelC14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC14);
        jPanelC14.setBounds(466, 2, 40, 40);

        jPanelC10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC10.setName(""); // NOI18N
        jPanelC10.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC10Layout = new javax.swing.GroupLayout(jPanelC10);
        jPanelC10.setLayout(jPanelC10Layout);
        jPanelC10Layout.setHorizontalGroup(
            jPanelC10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC10Layout.setVerticalGroup(
            jPanelC10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC10);
        jPanelC10.setBounds(178, 2, 40, 40);

        jPanelC12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC12.setName(""); // NOI18N
        jPanelC12.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC12Layout = new javax.swing.GroupLayout(jPanelC12);
        jPanelC12.setLayout(jPanelC12Layout);
        jPanelC12Layout.setHorizontalGroup(
            jPanelC12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC12Layout.setVerticalGroup(
            jPanelC12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC12);
        jPanelC12.setBounds(322, 2, 40, 40);

        jPanelC11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC11.setName(""); // NOI18N
        jPanelC11.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC11Layout = new javax.swing.GroupLayout(jPanelC11);
        jPanelC11.setLayout(jPanelC11Layout);
        jPanelC11Layout.setHorizontalGroup(
            jPanelC11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC11Layout.setVerticalGroup(
            jPanelC11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC11);
        jPanelC11.setBounds(250, 2, 40, 40);

        jPanelC13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC13.setName(""); // NOI18N
        jPanelC13.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC13Layout = new javax.swing.GroupLayout(jPanelC13);
        jPanelC13.setLayout(jPanelC13Layout);
        jPanelC13Layout.setHorizontalGroup(
            jPanelC13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC13Layout.setVerticalGroup(
            jPanelC13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC13);
        jPanelC13.setBounds(394, 2, 40, 40);

        jPanelC15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC15.setName(""); // NOI18N
        jPanelC15.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC15Layout = new javax.swing.GroupLayout(jPanelC15);
        jPanelC15.setLayout(jPanelC15Layout);
        jPanelC15Layout.setHorizontalGroup(
            jPanelC15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC15Layout.setVerticalGroup(
            jPanelC15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC15);
        jPanelC15.setBounds(538, 2, 40, 40);

        jLabel49.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/025.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel49);
        jLabel49.setBounds(78, 8, 27, 27);

        jLabel50.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/026.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel50);
        jLabel50.setBounds(150, 8, 27, 27);

        jLabel51.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/027.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel51);
        jLabel51.setBounds(222, 8, 27, 27);

        jLabel52.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/028.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel52);
        jLabel52.setBounds(294, 8, 27, 27);

        jLabel53.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/029.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel53);
        jLabel53.setBounds(366, 8, 27, 27);

        jLabel54.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/030.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel54);
        jLabel54.setBounds(438, 8, 27, 27);

        jLabel55.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/031.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel55);
        jLabel55.setBounds(510, 8, 27, 27);

        jPanelC8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC8.setName(""); // NOI18N
        jPanelC8.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC8Layout = new javax.swing.GroupLayout(jPanelC8);
        jPanelC8.setLayout(jPanelC8Layout);
        jPanelC8Layout.setHorizontalGroup(
            jPanelC8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC8Layout.setVerticalGroup(
            jPanelC8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing3.add(jPanelC8);
        jPanelC8.setBounds(34, 2, 40, 40);

        jLabel56.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/024.png"))); // NOI18N
        jPanelSmoothing3.add(jLabel56);
        jLabel56.setBounds(6, 8, 27, 27);

        jLabel57.setText("Edges");

        jLabel58.setText("Corners");

        jCheckBoxUseArtifact.setText("Use");
        jCheckBoxUseArtifact.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxUseArtifactActionPerformed(evt);
            }
        });

        jTextField2.setEditable(false);
        jTextField2.setText("http://www.gamedev.net/page/resources/_/technical/game-programming/tilemap-based-game-techniques-handling-terrai-r934");
        jTextField2.setCaretPosition(0);

        jLabel69.setText("See web:");

        jButton3.setText("Add default tiles");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jCheckBoxUseArtifact)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel69)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanelSmoothing2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jPanelSmoothing3, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanelSmoothing, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jPanelSmoothing1, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel57)
                            .addComponent(jLabel58))
                        .addGap(0, 110, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBoxUseArtifact)
                    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel69))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel57)
                .addGap(2, 2, 2)
                .addComponent(jPanelSmoothing, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel58)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing3, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton3)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Artifact", jPanel3);

        jPanelSmoothing4.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing4.setLayout(null);

        jPanelE16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE16.setName(""); // NOI18N
        jPanelE16.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE16Layout = new javax.swing.GroupLayout(jPanelE16);
        jPanelE16.setLayout(jPanelE16Layout);
        jPanelE16Layout.setHorizontalGroup(
            jPanelE16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE16Layout.setVerticalGroup(
            jPanelE16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE16);
        jPanelE16.setBounds(106, 2, 40, 40);

        jPanelE17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE17.setName(""); // NOI18N
        jPanelE17.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE17Layout = new javax.swing.GroupLayout(jPanelE17);
        jPanelE17.setLayout(jPanelE17Layout);
        jPanelE17Layout.setHorizontalGroup(
            jPanelE17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE17Layout.setVerticalGroup(
            jPanelE17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE17);
        jPanelE17.setBounds(466, 2, 40, 40);

        jPanelE18.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE18.setName(""); // NOI18N
        jPanelE18.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE18Layout = new javax.swing.GroupLayout(jPanelE18);
        jPanelE18.setLayout(jPanelE18Layout);
        jPanelE18Layout.setHorizontalGroup(
            jPanelE18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE18Layout.setVerticalGroup(
            jPanelE18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE18);
        jPanelE18.setBounds(178, 2, 40, 40);

        jPanelE19.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE19.setName(""); // NOI18N
        jPanelE19.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE19Layout = new javax.swing.GroupLayout(jPanelE19);
        jPanelE19.setLayout(jPanelE19Layout);
        jPanelE19Layout.setHorizontalGroup(
            jPanelE19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE19Layout.setVerticalGroup(
            jPanelE19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE19);
        jPanelE19.setBounds(322, 2, 40, 40);

        jPanelE20.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE20.setName(""); // NOI18N
        jPanelE20.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE20Layout = new javax.swing.GroupLayout(jPanelE20);
        jPanelE20.setLayout(jPanelE20Layout);
        jPanelE20Layout.setHorizontalGroup(
            jPanelE20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE20Layout.setVerticalGroup(
            jPanelE20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE20);
        jPanelE20.setBounds(250, 2, 40, 40);

        jPanelE21.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE21.setName(""); // NOI18N
        jPanelE21.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE21Layout = new javax.swing.GroupLayout(jPanelE21);
        jPanelE21.setLayout(jPanelE21Layout);
        jPanelE21Layout.setHorizontalGroup(
            jPanelE21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE21Layout.setVerticalGroup(
            jPanelE21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE21);
        jPanelE21.setBounds(394, 2, 40, 40);

        jPanelE22.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE22.setName(""); // NOI18N
        jPanelE22.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE22Layout = new javax.swing.GroupLayout(jPanelE22);
        jPanelE22.setLayout(jPanelE22Layout);
        jPanelE22Layout.setHorizontalGroup(
            jPanelE22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE22Layout.setVerticalGroup(
            jPanelE22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing4.add(jPanelE22);
        jPanelE22.setBounds(538, 2, 40, 40);

        jLabel63.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_0.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel63);
        jLabel63.setBounds(78, 8, 27, 27);

        jLabel64.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_2.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel64);
        jLabel64.setBounds(150, 8, 27, 27);

        jLabel65.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_14.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel65);
        jLabel65.setBounds(222, 8, 27, 27);

        jLabel66.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_26.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel66);
        jLabel66.setBounds(294, 8, 27, 27);

        jLabel67.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_31.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel67);
        jLabel67.setBounds(366, 8, 27, 27);

        jLabel70.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_32.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel70);
        jLabel70.setBounds(438, 8, 27, 27);

        jLabel71.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_33.png"))); // NOI18N
        jPanelSmoothing4.add(jLabel71);
        jLabel71.setBounds(510, 8, 27, 27);

        jPanelSmoothing5.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing5.setLayout(null);

        jPanelE23.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE23.setName(""); // NOI18N
        jPanelE23.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE23Layout = new javax.swing.GroupLayout(jPanelE23);
        jPanelE23.setLayout(jPanelE23Layout);
        jPanelE23Layout.setHorizontalGroup(
            jPanelE23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE23Layout.setVerticalGroup(
            jPanelE23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE23);
        jPanelE23.setBounds(106, 2, 40, 40);

        jPanelE24.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE24.setName(""); // NOI18N
        jPanelE24.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE24Layout = new javax.swing.GroupLayout(jPanelE24);
        jPanelE24.setLayout(jPanelE24Layout);
        jPanelE24Layout.setHorizontalGroup(
            jPanelE24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE24Layout.setVerticalGroup(
            jPanelE24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE24);
        jPanelE24.setBounds(466, 2, 40, 40);

        jPanelE25.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE25.setName(""); // NOI18N
        jPanelE25.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE25Layout = new javax.swing.GroupLayout(jPanelE25);
        jPanelE25.setLayout(jPanelE25Layout);
        jPanelE25Layout.setHorizontalGroup(
            jPanelE25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE25Layout.setVerticalGroup(
            jPanelE25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE25);
        jPanelE25.setBounds(178, 2, 40, 40);

        jPanelE26.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE26.setName(""); // NOI18N
        jPanelE26.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE26Layout = new javax.swing.GroupLayout(jPanelE26);
        jPanelE26.setLayout(jPanelE26Layout);
        jPanelE26Layout.setHorizontalGroup(
            jPanelE26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE26Layout.setVerticalGroup(
            jPanelE26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE26);
        jPanelE26.setBounds(322, 2, 40, 40);

        jPanelE27.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE27.setName(""); // NOI18N
        jPanelE27.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE27Layout = new javax.swing.GroupLayout(jPanelE27);
        jPanelE27.setLayout(jPanelE27Layout);
        jPanelE27Layout.setHorizontalGroup(
            jPanelE27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE27Layout.setVerticalGroup(
            jPanelE27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE27);
        jPanelE27.setBounds(250, 2, 40, 40);

        jPanelE28.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE28.setName(""); // NOI18N
        jPanelE28.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE28Layout = new javax.swing.GroupLayout(jPanelE28);
        jPanelE28.setLayout(jPanelE28Layout);
        jPanelE28Layout.setHorizontalGroup(
            jPanelE28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE28Layout.setVerticalGroup(
            jPanelE28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE28);
        jPanelE28.setBounds(394, 2, 40, 40);

        jPanelE29.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE29.setName(""); // NOI18N
        jPanelE29.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE29Layout = new javax.swing.GroupLayout(jPanelE29);
        jPanelE29.setLayout(jPanelE29Layout);
        jPanelE29Layout.setHorizontalGroup(
            jPanelE29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE29Layout.setVerticalGroup(
            jPanelE29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE29);
        jPanelE29.setBounds(538, 2, 40, 40);

        jLabel72.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_36.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel72);
        jLabel72.setBounds(78, 8, 27, 27);

        jLabel73.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_1.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel73);
        jLabel73.setBounds(150, 8, 27, 27);

        jLabel74.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_12.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel74);
        jLabel74.setBounds(222, 8, 27, 27);

        jLabel75.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_23.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel75);
        jLabel75.setBounds(294, 8, 27, 27);

        jLabel76.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_34.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel76);
        jLabel76.setBounds(366, 8, 27, 27);

        jLabel80.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_37.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel80);
        jLabel80.setBounds(438, 8, 27, 27);

        jLabel81.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_38.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel81);
        jLabel81.setBounds(510, 8, 27, 27);

        jPanelE30.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelE30.setName(""); // NOI18N
        jPanelE30.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelE30Layout = new javax.swing.GroupLayout(jPanelE30);
        jPanelE30.setLayout(jPanelE30Layout);
        jPanelE30Layout.setHorizontalGroup(
            jPanelE30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelE30Layout.setVerticalGroup(
            jPanelE30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing5.add(jPanelE30);
        jPanelE30.setBounds(34, 2, 40, 40);

        jLabel82.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_35.png"))); // NOI18N
        jPanelSmoothing5.add(jLabel82);
        jLabel82.setBounds(6, 8, 27, 27);

        jPanelSmoothing7.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing7.setLayout(null);

        jPanelC16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC16.setName(""); // NOI18N
        jPanelC16.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC16Layout = new javax.swing.GroupLayout(jPanelC16);
        jPanelC16.setLayout(jPanelC16Layout);
        jPanelC16Layout.setHorizontalGroup(
            jPanelC16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC16Layout.setVerticalGroup(
            jPanelC16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC16);
        jPanelC16.setBounds(106, 2, 40, 40);

        jPanelC17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC17.setName(""); // NOI18N
        jPanelC17.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC17Layout = new javax.swing.GroupLayout(jPanelC17);
        jPanelC17.setLayout(jPanelC17Layout);
        jPanelC17Layout.setHorizontalGroup(
            jPanelC17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC17Layout.setVerticalGroup(
            jPanelC17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC17);
        jPanelC17.setBounds(466, 2, 40, 40);

        jPanelC18.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC18.setName(""); // NOI18N
        jPanelC18.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC18Layout = new javax.swing.GroupLayout(jPanelC18);
        jPanelC18.setLayout(jPanelC18Layout);
        jPanelC18Layout.setHorizontalGroup(
            jPanelC18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC18Layout.setVerticalGroup(
            jPanelC18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC18);
        jPanelC18.setBounds(178, 2, 40, 40);

        jPanelC19.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC19.setName(""); // NOI18N
        jPanelC19.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC19Layout = new javax.swing.GroupLayout(jPanelC19);
        jPanelC19.setLayout(jPanelC19Layout);
        jPanelC19Layout.setHorizontalGroup(
            jPanelC19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC19Layout.setVerticalGroup(
            jPanelC19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC19);
        jPanelC19.setBounds(322, 2, 40, 40);

        jPanelC20.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC20.setName(""); // NOI18N
        jPanelC20.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC20Layout = new javax.swing.GroupLayout(jPanelC20);
        jPanelC20.setLayout(jPanelC20Layout);
        jPanelC20Layout.setHorizontalGroup(
            jPanelC20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC20Layout.setVerticalGroup(
            jPanelC20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC20);
        jPanelC20.setBounds(250, 2, 40, 40);

        jPanelC21.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC21.setName(""); // NOI18N
        jPanelC21.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC21Layout = new javax.swing.GroupLayout(jPanelC21);
        jPanelC21.setLayout(jPanelC21Layout);
        jPanelC21Layout.setHorizontalGroup(
            jPanelC21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC21Layout.setVerticalGroup(
            jPanelC21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC21);
        jPanelC21.setBounds(394, 2, 40, 40);

        jPanelC22.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC22.setName(""); // NOI18N
        jPanelC22.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC22Layout = new javax.swing.GroupLayout(jPanelC22);
        jPanelC22.setLayout(jPanelC22Layout);
        jPanelC22Layout.setHorizontalGroup(
            jPanelC22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC22Layout.setVerticalGroup(
            jPanelC22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing7.add(jPanelC22);
        jPanelC22.setBounds(538, 2, 40, 40);

        jLabel83.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_39.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel83);
        jLabel83.setBounds(78, 8, 27, 27);

        jLabel85.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_40.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel85);
        jLabel85.setBounds(150, 8, 27, 27);

        jLabel86.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_41.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel86);
        jLabel86.setBounds(222, 8, 27, 27);

        jLabel87.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_3.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel87);
        jLabel87.setBounds(294, 8, 27, 27);

        jLabel88.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_4.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel88);
        jLabel88.setBounds(366, 8, 27, 27);

        jLabel89.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_5.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel89);
        jLabel89.setBounds(438, 8, 27, 27);

        jLabel90.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_6.png"))); // NOI18N
        jPanelSmoothing7.add(jLabel90);
        jLabel90.setBounds(510, 8, 27, 27);

        jPanelSmoothing10.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing10.setLayout(null);

        jPanelC23.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC23.setName(""); // NOI18N
        jPanelC23.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC23Layout = new javax.swing.GroupLayout(jPanelC23);
        jPanelC23.setLayout(jPanelC23Layout);
        jPanelC23Layout.setHorizontalGroup(
            jPanelC23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC23Layout.setVerticalGroup(
            jPanelC23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC23);
        jPanelC23.setBounds(106, 2, 40, 40);

        jPanelC24.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC24.setName(""); // NOI18N
        jPanelC24.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC24Layout = new javax.swing.GroupLayout(jPanelC24);
        jPanelC24.setLayout(jPanelC24Layout);
        jPanelC24Layout.setHorizontalGroup(
            jPanelC24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC24Layout.setVerticalGroup(
            jPanelC24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC24);
        jPanelC24.setBounds(466, 2, 40, 40);

        jPanelC25.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC25.setName(""); // NOI18N
        jPanelC25.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC25Layout = new javax.swing.GroupLayout(jPanelC25);
        jPanelC25.setLayout(jPanelC25Layout);
        jPanelC25Layout.setHorizontalGroup(
            jPanelC25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC25Layout.setVerticalGroup(
            jPanelC25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC25);
        jPanelC25.setBounds(178, 2, 40, 40);

        jPanelC26.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC26.setName(""); // NOI18N
        jPanelC26.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC26Layout = new javax.swing.GroupLayout(jPanelC26);
        jPanelC26.setLayout(jPanelC26Layout);
        jPanelC26Layout.setHorizontalGroup(
            jPanelC26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC26Layout.setVerticalGroup(
            jPanelC26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC26);
        jPanelC26.setBounds(322, 2, 40, 40);

        jPanelC27.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC27.setName(""); // NOI18N
        jPanelC27.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC27Layout = new javax.swing.GroupLayout(jPanelC27);
        jPanelC27.setLayout(jPanelC27Layout);
        jPanelC27Layout.setHorizontalGroup(
            jPanelC27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC27Layout.setVerticalGroup(
            jPanelC27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC27);
        jPanelC27.setBounds(250, 2, 40, 40);

        jPanelC28.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC28.setName(""); // NOI18N
        jPanelC28.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC28Layout = new javax.swing.GroupLayout(jPanelC28);
        jPanelC28.setLayout(jPanelC28Layout);
        jPanelC28Layout.setHorizontalGroup(
            jPanelC28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC28Layout.setVerticalGroup(
            jPanelC28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC28);
        jPanelC28.setBounds(394, 2, 40, 40);

        jPanelC29.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC29.setName(""); // NOI18N
        jPanelC29.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC29Layout = new javax.swing.GroupLayout(jPanelC29);
        jPanelC29.setLayout(jPanelC29Layout);
        jPanelC29Layout.setHorizontalGroup(
            jPanelC29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC29Layout.setVerticalGroup(
            jPanelC29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC29);
        jPanelC29.setBounds(538, 2, 40, 40);

        jLabel91.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_8.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel91);
        jLabel91.setBounds(78, 8, 27, 27);

        jLabel112.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_9.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel112);
        jLabel112.setBounds(150, 8, 27, 27);

        jLabel113.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_10.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel113);
        jLabel113.setBounds(222, 8, 27, 27);

        jLabel114.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_11.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel114);
        jLabel114.setBounds(294, 8, 27, 27);

        jLabel115.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_13.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel115);
        jLabel115.setBounds(366, 8, 27, 27);

        jLabel116.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_15.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel116);
        jLabel116.setBounds(438, 8, 27, 27);

        jLabel117.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_16.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel117);
        jLabel117.setBounds(510, 8, 27, 27);

        jPanelC30.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelC30.setName(""); // NOI18N
        jPanelC30.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanelC30Layout = new javax.swing.GroupLayout(jPanelC30);
        jPanelC30.setLayout(jPanelC30Layout);
        jPanelC30Layout.setHorizontalGroup(
            jPanelC30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanelC30Layout.setVerticalGroup(
            jPanelC30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing10.add(jPanelC30);
        jPanelC30.setBounds(34, 2, 40, 40);

        jLabel118.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/ISO/_7.png"))); // NOI18N
        jPanelSmoothing10.add(jLabel118);
        jLabel118.setBounds(6, 8, 27, 27);

        jLabel119.setText("Edges");

        jLabel120.setText("Corners");

        jCheckBoxUseArtifact1.setText("Use");
        jCheckBoxUseArtifact1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxUseArtifact1ActionPerformed(evt);
            }
        });

        jButton4.setText("Add default tiles");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jCheckBoxUseArtifact1)
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanelSmoothing7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanelSmoothing10, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanelSmoothing4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanelSmoothing5, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel119)
                    .addComponent(jLabel120)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(122, Short.MAX_VALUE))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(jCheckBoxUseArtifact1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel119)
                .addGap(2, 2, 2)
                .addComponent(jPanelSmoothing4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel120)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing7, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing10, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton4)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Artifact ISO", jPanel18);

        jPanel9.setEnabled(false);

        jPanelSmoothing6.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing6.setLayout(null);

        jPanel3_2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel3_2.setName(""); // NOI18N
        jPanel3_2.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel3_2Layout = new javax.swing.GroupLayout(jPanel3_2);
        jPanel3_2.setLayout(jPanel3_2Layout);
        jPanel3_2Layout.setHorizontalGroup(
            jPanel3_2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel3_2Layout.setVerticalGroup(
            jPanel3_2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing6.add(jPanel3_2);
        jPanel3_2.setBounds(106, 2, 40, 40);

        jPanel3_3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel3_3.setName(""); // NOI18N
        jPanel3_3.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel3_3Layout = new javax.swing.GroupLayout(jPanel3_3);
        jPanel3_3.setLayout(jPanel3_3Layout);
        jPanel3_3Layout.setHorizontalGroup(
            jPanel3_3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel3_3Layout.setVerticalGroup(
            jPanel3_3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing6.add(jPanel3_3);
        jPanel3_3.setBounds(178, 2, 40, 40);

        jPanel3_4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel3_4.setName(""); // NOI18N
        jPanel3_4.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel3_4Layout = new javax.swing.GroupLayout(jPanel3_4);
        jPanel3_4.setLayout(jPanel3_4Layout);
        jPanel3_4Layout.setHorizontalGroup(
            jPanel3_4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel3_4Layout.setVerticalGroup(
            jPanel3_4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing6.add(jPanel3_4);
        jPanel3_4.setBounds(250, 2, 40, 40);

        jLabel77.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/02.png"))); // NOI18N
        jPanelSmoothing6.add(jLabel77);
        jLabel77.setBounds(78, 8, 27, 27);

        jLabel78.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/04.png"))); // NOI18N
        jPanelSmoothing6.add(jLabel78);
        jLabel78.setBounds(150, 8, 27, 27);

        jLabel79.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/08.png"))); // NOI18N
        jPanelSmoothing6.add(jLabel79);
        jLabel79.setBounds(222, 8, 27, 27);

        jPanel3_1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel3_1.setName(""); // NOI18N
        jPanel3_1.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel3_1Layout = new javax.swing.GroupLayout(jPanel3_1);
        jPanel3_1.setLayout(jPanel3_1Layout);
        jPanel3_1Layout.setHorizontalGroup(
            jPanel3_1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel3_1Layout.setVerticalGroup(
            jPanel3_1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing6.add(jPanel3_1);
        jPanel3_1.setBounds(34, 2, 40, 40);

        jLabel84.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/01.png"))); // NOI18N
        jPanelSmoothing6.add(jLabel84);
        jLabel84.setBounds(6, 8, 27, 27);

        jPanelSmoothing8.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing8.setLayout(null);

        jPanel1_2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_2.setName(""); // NOI18N
        jPanel1_2.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_2Layout = new javax.swing.GroupLayout(jPanel1_2);
        jPanel1_2.setLayout(jPanel1_2Layout);
        jPanel1_2Layout.setHorizontalGroup(
            jPanel1_2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_2Layout.setVerticalGroup(
            jPanel1_2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_2);
        jPanel1_2.setBounds(106, 2, 40, 40);

        jPanel1_7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_7.setName(""); // NOI18N
        jPanel1_7.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_7Layout = new javax.swing.GroupLayout(jPanel1_7);
        jPanel1_7.setLayout(jPanel1_7Layout);
        jPanel1_7Layout.setHorizontalGroup(
            jPanel1_7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_7Layout.setVerticalGroup(
            jPanel1_7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_7);
        jPanel1_7.setBounds(466, 2, 40, 40);

        jPanel1_3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_3.setName(""); // NOI18N
        jPanel1_3.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_3Layout = new javax.swing.GroupLayout(jPanel1_3);
        jPanel1_3.setLayout(jPanel1_3Layout);
        jPanel1_3Layout.setHorizontalGroup(
            jPanel1_3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_3Layout.setVerticalGroup(
            jPanel1_3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_3);
        jPanel1_3.setBounds(178, 2, 40, 40);

        jPanel1_5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_5.setName(""); // NOI18N
        jPanel1_5.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_5Layout = new javax.swing.GroupLayout(jPanel1_5);
        jPanel1_5.setLayout(jPanel1_5Layout);
        jPanel1_5Layout.setHorizontalGroup(
            jPanel1_5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_5Layout.setVerticalGroup(
            jPanel1_5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_5);
        jPanel1_5.setBounds(322, 2, 40, 40);

        jPanel1_4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_4.setName(""); // NOI18N
        jPanel1_4.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_4Layout = new javax.swing.GroupLayout(jPanel1_4);
        jPanel1_4.setLayout(jPanel1_4Layout);
        jPanel1_4Layout.setHorizontalGroup(
            jPanel1_4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_4Layout.setVerticalGroup(
            jPanel1_4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_4);
        jPanel1_4.setBounds(250, 2, 40, 40);

        jPanel1_6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_6.setName(""); // NOI18N
        jPanel1_6.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_6Layout = new javax.swing.GroupLayout(jPanel1_6);
        jPanel1_6.setLayout(jPanel1_6Layout);
        jPanel1_6Layout.setHorizontalGroup(
            jPanel1_6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_6Layout.setVerticalGroup(
            jPanel1_6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_6);
        jPanel1_6.setBounds(394, 2, 40, 40);

        jPanel1_8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_8.setName(""); // NOI18N
        jPanel1_8.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_8Layout = new javax.swing.GroupLayout(jPanel1_8);
        jPanel1_8.setLayout(jPanel1_8Layout);
        jPanel1_8Layout.setHorizontalGroup(
            jPanel1_8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_8Layout.setVerticalGroup(
            jPanel1_8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_8);
        jPanel1_8.setBounds(538, 2, 40, 40);

        jLabel92.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/017.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel92);
        jLabel92.setBounds(78, 8, 27, 27);

        jLabel93.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/020.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel93);
        jLabel93.setBounds(150, 8, 27, 27);

        jLabel94.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/018.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel94);
        jLabel94.setBounds(222, 8, 27, 27);

        jLabel95.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/040.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel95);
        jLabel95.setBounds(294, 8, 27, 27);

        jLabel96.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/041.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel96);
        jLabel96.setBounds(366, 8, 27, 27);

        jLabel97.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/042.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel97);
        jLabel97.setBounds(438, 8, 27, 27);

        jLabel98.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/043.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel98);
        jLabel98.setBounds(510, 8, 27, 27);

        jPanel1_1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1_1.setName(""); // NOI18N
        jPanel1_1.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel1_1Layout = new javax.swing.GroupLayout(jPanel1_1);
        jPanel1_1.setLayout(jPanel1_1Layout);
        jPanel1_1Layout.setHorizontalGroup(
            jPanel1_1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel1_1Layout.setVerticalGroup(
            jPanel1_1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing8.add(jPanel1_1);
        jPanel1_1.setBounds(34, 2, 40, 40);

        jLabel99.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/024.png"))); // NOI18N
        jPanelSmoothing8.add(jLabel99);
        jLabel99.setBounds(6, 8, 27, 27);

        jLabel100.setText("Three");

        jLabel101.setText("Two");

        jLabel102.setText("One");

        jPanelSmoothing9.setMinimumSize(new java.awt.Dimension(15, 62));
        jPanelSmoothing9.setLayout(null);

        jPanel2_2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_2.setName(""); // NOI18N
        jPanel2_2.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_2Layout = new javax.swing.GroupLayout(jPanel2_2);
        jPanel2_2.setLayout(jPanel2_2Layout);
        jPanel2_2Layout.setHorizontalGroup(
            jPanel2_2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_2Layout.setVerticalGroup(
            jPanel2_2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_2);
        jPanel2_2.setBounds(106, 2, 40, 40);

        jPanel2_7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_7.setName(""); // NOI18N
        jPanel2_7.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_7Layout = new javax.swing.GroupLayout(jPanel2_7);
        jPanel2_7.setLayout(jPanel2_7Layout);
        jPanel2_7Layout.setHorizontalGroup(
            jPanel2_7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_7Layout.setVerticalGroup(
            jPanel2_7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_7);
        jPanel2_7.setBounds(466, 2, 40, 40);

        jPanel2_3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_3.setName(""); // NOI18N
        jPanel2_3.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_3Layout = new javax.swing.GroupLayout(jPanel2_3);
        jPanel2_3.setLayout(jPanel2_3Layout);
        jPanel2_3Layout.setHorizontalGroup(
            jPanel2_3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_3Layout.setVerticalGroup(
            jPanel2_3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_3);
        jPanel2_3.setBounds(178, 2, 40, 40);

        jPanel2_5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_5.setName(""); // NOI18N
        jPanel2_5.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_5Layout = new javax.swing.GroupLayout(jPanel2_5);
        jPanel2_5.setLayout(jPanel2_5Layout);
        jPanel2_5Layout.setHorizontalGroup(
            jPanel2_5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_5Layout.setVerticalGroup(
            jPanel2_5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_5);
        jPanel2_5.setBounds(322, 2, 40, 40);

        jPanel2_4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_4.setName(""); // NOI18N
        jPanel2_4.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_4Layout = new javax.swing.GroupLayout(jPanel2_4);
        jPanel2_4.setLayout(jPanel2_4Layout);
        jPanel2_4Layout.setHorizontalGroup(
            jPanel2_4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_4Layout.setVerticalGroup(
            jPanel2_4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_4);
        jPanel2_4.setBounds(250, 2, 40, 40);

        jPanel2_6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_6.setName(""); // NOI18N
        jPanel2_6.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_6Layout = new javax.swing.GroupLayout(jPanel2_6);
        jPanel2_6.setLayout(jPanel2_6Layout);
        jPanel2_6Layout.setHorizontalGroup(
            jPanel2_6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_6Layout.setVerticalGroup(
            jPanel2_6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_6);
        jPanel2_6.setBounds(394, 2, 40, 40);

        jPanel2_8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_8.setName(""); // NOI18N
        jPanel2_8.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_8Layout = new javax.swing.GroupLayout(jPanel2_8);
        jPanel2_8.setLayout(jPanel2_8Layout);
        jPanel2_8Layout.setHorizontalGroup(
            jPanel2_8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_8Layout.setVerticalGroup(
            jPanel2_8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_8);
        jPanel2_8.setBounds(538, 2, 40, 40);

        jLabel103.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/033.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel103);
        jLabel103.setBounds(78, 8, 27, 27);

        jLabel104.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/034.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel104);
        jLabel104.setBounds(150, 8, 27, 27);

        jLabel105.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/035.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel105);
        jLabel105.setBounds(222, 8, 27, 27);

        jLabel106.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/036.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel106);
        jLabel106.setBounds(294, 8, 27, 27);

        jLabel107.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/037.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel107);
        jLabel107.setBounds(366, 8, 27, 27);

        jLabel108.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/038.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel108);
        jLabel108.setBounds(438, 8, 27, 27);

        jLabel109.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/039.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel109);
        jLabel109.setBounds(510, 8, 27, 27);

        jPanel2_1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2_1.setName(""); // NOI18N
        jPanel2_1.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout jPanel2_1Layout = new javax.swing.GroupLayout(jPanel2_1);
        jPanel2_1.setLayout(jPanel2_1Layout);
        jPanel2_1Layout.setHorizontalGroup(
            jPanel2_1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );
        jPanel2_1Layout.setVerticalGroup(
            jPanel2_1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        jPanelSmoothing9.add(jPanel2_1);
        jPanel2_1.setBounds(34, 2, 40, 40);

        jLabel110.setIcon(new javax.swing.ImageIcon(getClass().getResource("/csa/images/032.png"))); // NOI18N
        jPanelSmoothing9.add(jLabel110);
        jLabel110.setBounds(6, 8, 27, 27);

        jCheckBoxUseTopDown.setText("Use");
        jCheckBoxUseTopDown.setEnabled(false);
        jCheckBoxUseTopDown.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBoxUseTopDownActionPerformed(evt);
            }
        });

        jTextField3.setEditable(false);
        jTextField3.setText("no where");

        jLabel111.setText("See web:");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jCheckBoxUseTopDown)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel111)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField3))
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanelSmoothing6, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanelSmoothing9, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanelSmoothing8, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel101)
                            .addComponent(jLabel100)
                            .addComponent(jLabel102))
                        .addGap(0, 110, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBoxUseTopDown)
                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel111))
                .addGap(6, 6, 6)
                .addComponent(jLabel100)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing6, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel101)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing9, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel102)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelSmoothing8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(62, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Top Down", jPanel9);

        jPanel10.setEnabled(false);

        jLabel122.setText("Not done");

        jCheckBox5.setText("Use");
        jCheckBox5.setEnabled(false);

        jTextField4.setEditable(false);
        jTextField4.setText("http://www.lostgarden.com/2006/02/250-free-handdrawn-textures.html");

        jLabel131.setText("See web:");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jCheckBox5)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel131)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel122, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(136, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox5)
                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel131))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel122)
                .addContainerGap(243, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Lost Garden", jPanel10);

        jLabel68.setText("Transition priority:");

        jTextFieldPriority.setText("1");
        jTextFieldPriority.setToolTipText("Higher priority will be drawn above lower priorities!");

        jCheckBoxIsTerrainTransitionTile.setText("Enable Terrain transitions");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane2)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jCheckBoxIsTerrainTransitionTile)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel68)
                .addGap(4, 4, 4)
                .addComponent(jTextFieldPriority, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBoxIsTerrainTransitionTile)
                    .addComponent(jLabel68)
                    .addComponent(jTextFieldPriority, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane2)
                .addGap(1, 1, 1))
        );

        jTabbedPane1.addTab("Terrain Transitions", jPanel7);

        jLabel27.setText("Variant percentage");

        jPanelIMageTileVariations.setBorder(javax.swing.BorderFactory.createTitledBorder("place variations here (drag & drop)"));
        jPanelIMageTileVariations.setMinimumSize(new java.awt.Dimension(20, 20));
        jPanelIMageTileVariations.setLayout(null);

        jLabel59.setText("Variants of a tile can be used by automatic map building, to \"scatter\"");

        jLabel60.setText("different tiles \"in between\" - without really complicated algorythms.");

        jLabel61.setText("A better place to configure them would actually be while map creation, ");

        jLabel62.setText("but it seems to be much easier here :-)!");

        jButton2.setText("Remove selected variant");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanelIMageTileVariations, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel59)
                                    .addComponent(jLabel60)
                                    .addComponent(jLabel61)
                                    .addComponent(jLabel62))
                                .addGap(0, 342, Short.MAX_VALUE)))
                        .addContainerGap())
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel27)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton2)
                        .addGap(20, 20, 20))))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelIMageTileVariations, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel59)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel60)
                .addGap(18, 18, 18)
                .addComponent(jLabel61)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel62)
                .addContainerGap(112, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Variants", jPanel11);

        jButtonAddOneTile.setText("add tile");
        jButtonAddOneTile.setToolTipText("Adds tile to current list. Replaces if Name is the same!");
        jButtonAddOneTile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddOneTileActionPerformed(evt);
            }
        });

        jButtonRemoveOneTile.setText("remove tile");
        jButtonRemoveOneTile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonRemoveOneTileActionPerformed(evt);
            }
        });

        jButtonNewTile.setText("new tile");
        jButtonNewTile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNewTileActionPerformed(evt);
            }
        });

        jButtonSetImage.setText("set image");
        jButtonSetImage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSetImageActionPerformed(evt);
            }
        });

        jPanelTileView.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanelTileView.setPreferredSize(new java.awt.Dimension(160, 160));
        jPanelTileView.setLayout(null);

        jPanel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 42, Short.MAX_VALUE)
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 42, Short.MAX_VALUE)
        );

        jPanelTileView.add(jPanel8);
        jPanel8.setBounds(1, 1, 44, 44);

        jScrollPane6.setViewportView(jPanelTileView);

        jTabbedPane3.addTab("Tile display", jScrollPane6);

        javax.swing.GroupLayout mapPanelLayout = new javax.swing.GroupLayout(mapPanel);
        mapPanel.setLayout(mapPanelLayout);
        mapPanelLayout.setHorizontalGroup(
            mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 162, Short.MAX_VALUE)
        );
        mapPanelLayout.setVerticalGroup(
            mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 162, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jTabbedPane3.addTab("ISO display", jPanel20);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(56, 56, 56)
                                .addComponent(jButtonSetImage))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jButtonAddOneTile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButtonNewTile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButtonRemoveOneTile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(jTabbedPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                    .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jButtonSetImage)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTabbedPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButtonAddOneTile)
                                .addGap(43, 43, 43)
                                .addComponent(jButtonRemoveOneTile)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jButtonNewTile)
                                .addContainerGap())
                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
                    .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNewActionPerformed
        mClassSetting++;
        mAllTilesInClass = new Vector <TileData>();
        clearAll();
        resetConfigPool(false, "", "");
        mClassSetting--;
}//GEN-LAST:event_jButtonNewActionPerformed

    private void jButtonSaveTileSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveTileSetActionPerformed

        //a tileEditJPanel1.save(jTextFieldTileFile.getText(), jTextFieldKlasse.getText());
        if (jTextFieldKlasse.getText().trim().length()==0) return;

        if (mTileDataPool == null)
        {
            if (jTextFieldTileFile.getText().trim().length()==0) return;
            mTileDataPool = new TileDataPool("Tile"+File.separator+jTextFieldTileFile.getText().trim()+".xml", false);
        }
        else
        {
            if (!mTileDataPool.getFilename().equals("Tile"+File.separator+jTextFieldTileFile.getText().trim()+".xml"))
            {
                if (jTextFieldTileFile.getText().trim().length()==0) return;
                mTileDataPool = new TileDataPool("Tile"+File.separator+jTextFieldTileFile.getText().trim()+".xml", false);
            }
        }

        // starting really fresh
        if (mCurrentTile == null) mCurrentTile = new TileData();

        readCurrentAttributeData();
        readCurrentTileInfo();
        readAllToCurrentTileSet();

        mTileDataPool.put(mCurrentTile); // removes via name old tile, so using a copy here is ok!

        Collection<TileData> collectionKlasse = mTileDataPool.getHashMap().values();
        Iterator<TileData> iter = collectionKlasse.iterator();

        while (iter.hasNext())
        {
            TileData item = iter.next();
            item.mTileSetFileName= jTextFieldTileFile.getText().trim();
        }

        mTileDataPool.save();
        String name = mCurrentTile.mName;
        resetConfigPool(true, mCurrentTile.mClass, name);
    }//GEN-LAST:event_jButtonSaveTileSetActionPerformed

    private void jButtonSaveAsNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveAsNewActionPerformed

        saveAsNew(jTextFieldTileFile.getText(), jTextFieldKlasse.getText());
    }//GEN-LAST:event_jButtonSaveAsNewActionPerformed

    private void jButtonDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteActionPerformed
        readAllToCurrentTileSet();

        mTileDataPool.remove(mCurrentTile); // remove is done via mCurrentTile.mName, so passing a copy of original here is ok
        mTileDataPool.save();

        mClassSetting++;
        String klasse = jTextFieldKlasse.getText();
        resetConfigPool(true,klasse, "");
        //clearTileData();
        mClassSetting--;
}//GEN-LAST:event_jButtonDeleteActionPerformed

    private void jComboBoxKlasseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxKlasseActionPerformed
        if (mClassSetting >0 ) return;
        mClassSetting++;

        String selected = jComboBoxKlasse.getSelectedItem().toString();
        clearAll();

        resetConfigPool(true, selected, "");
        jTextFieldKlasse.setText(jComboBoxKlasse.getSelectedItem().toString());
        setTileMapInfo(jTextFieldTileFile.getText(), selected);

        setCurrentGraphicsData();
        
        
        mClassSetting--;
    }//GEN-LAST:event_jComboBoxKlasseActionPerformed

    private void jTextFieldTileFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldTileFileActionPerformed
        
        loadTileCollection();
    }//GEN-LAST:event_jTextFieldTileFileActionPerformed

    private void jTextFieldTileFileFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldTileFileFocusLost
        // if enabled, switching to another tab also loses focus
        //jTextFieldTileFileActionPerformed(null);
    }//GEN-LAST:event_jTextFieldTileFileFocusLost

    private void jButtonFileSelect1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonFileSelect1ActionPerformed
        InternalFrameFileChoser fc = new csa.gui.dialogs.InternalFrameFileChoser();
        fc.setCurrentDirectory(new java.io.File("xml"+File.separator+"Tile"));
        FileNameExtensionFilter  filter = new  FileNameExtensionFilter("xml", "xml");
        fc.setFileFilter(filter);
        int r = fc.showOpenDialog(Configuration.getConfiguration().getMainFrame());
        if (r != InternalFrameFileChoser.APPROVE_OPTION) return;
        String name = fc.getSelectedFile().getName();
        jTextFieldTileFile.setText(csa.util.UtilityString.replace(name, ".xml",""));
        jTextFieldTileFileActionPerformed(null);
    }//GEN-LAST:event_jButtonFileSelect1ActionPerformed

    private void jComboBoxNameGraphicActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxNameGraphicActionPerformed
        if (!getGraphicPool()) {
            return;
        }
        if (mClassSetting > 0) {
            return;
        }
        String key = jComboBoxNameGraphic.getSelectedItem().toString();
        mData = mImageSequenceDataPool.get(key);
        setGraphicsDataFromCurrent();
    }//GEN-LAST:event_jComboBoxNameGraphicActionPerformed

    private void jComboBoxKlasseGraphicActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxKlasseGraphicActionPerformed
        if (!getGraphicPool()) {
            return;
        }
        if (mClassSetting > 0) {
            return;
        }
        mClassSetting++;

        String selected = jComboBoxKlasseGraphic.getSelectedItem().toString();
        clearGraphicsData();
        removeAllGraphics(false);

        resetGraphicsPool(true, selected, "");
        setAllGraphics();



        jComboBoxNameGraphic.setSelectedIndex(-1);
        mClassSetting--;
    }//GEN-LAST:event_jComboBoxKlasseGraphicActionPerformed

    private void jTextFieldGraphicFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldGraphicFileActionPerformed
        mClassSetting++;
        jComboBoxKlasseGraphic.removeAllItems();
        jComboBoxNameGraphic.removeAllItems();
        setPoolOnly();
        mClassSetting--;
    }//GEN-LAST:event_jTextFieldGraphicFileActionPerformed

    private void jTextFieldGraphicFileFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldGraphicFileFocusLost
        jTextFieldGraphicFileActionPerformed(null);
    }//GEN-LAST:event_jTextFieldGraphicFileFocusLost

    private void jCheckBoxScaledActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxScaledActionPerformed
        imageComponent1.setScaled(jCheckBoxScaled.isSelected(), 100, 100);
    }//GEN-LAST:event_jCheckBoxScaledActionPerformed

    private void jButtonFileSelect2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonFileSelect2ActionPerformed

        InternalFrameFileChoser fc = new csa.gui.dialogs.InternalFrameFileChoser();
        fc.setCurrentDirectory(new java.io.File("xml" + File.separator + "Graphics"));
        FileNameExtensionFilter filter = new FileNameExtensionFilter("xml", "xml");
        fc.setFileFilter(filter);
        int r = fc.showOpenDialog(Configuration.getConfiguration().getMainFrame());
        if (r != InternalFrameFileChoser.APPROVE_OPTION) {
            return;
        }
        String name = fc.getSelectedFile().getName();
        jTextFieldGraphicFile.setText(csa.util.UtilityString.replace(name, ".xml", ""));
        jTextFieldGraphicFileActionPerformed(null);
    }//GEN-LAST:event_jButtonFileSelect2ActionPerformed

    private void jButtonAddOneAttributeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddOneAttributeActionPerformed
        readCurrentAttributeData();
        jComboBoxAttributeName.setSelectedItem(null);
        jTextFieldAttributeValue.setText("");
    }//GEN-LAST:event_jButtonAddOneAttributeActionPerformed

    private void jButtonNewAttributeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNewAttributeActionPerformed
        mCurrentAttributeData = new TileAttribute();
        setCurrentAttributeData();

    }//GEN-LAST:event_jButtonNewAttributeActionPerformed

    private void jButtonDeleteSelectedAttributesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteSelectedAttributesActionPerformed


        int[] rows = csaPanel.getTable().getSelectedRows();
        if (rows.length == 0) {
            return;
        }

        Vector<TileAttribute> toDelete = new Vector<TileAttribute>();
        for (int i = rows.length - 1; i >= 0; i--) {
            int sel = csaPanel.convertRowIndexToModel(rows[i]);
            TileAttribute attr = mAttributeData.elementAt(sel);
            toDelete.addElement(attr);
        }

        for (int i = 0; i < toDelete.size(); i++) {
            TileAttribute id = toDelete.elementAt(i);
            mAttributeData.removeElement(id);
        }

        csaPanel.deleteSelected();
        TileAttribute.fillTile(mAttributeData, mCurrentTile);
    }//GEN-LAST:event_jButtonDeleteSelectedAttributesActionPerformed

    private void jButtonAddOneTileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddOneTileActionPerformed
        readCurrentTileInfo();
        TileAttribute.fillTile(mAttributeData, mCurrentTile);

        addTile(mCurrentTile);
        resetTileList(mCurrentTile.mName);
    }//GEN-LAST:event_jButtonAddOneTileActionPerformed

    private void jButtonSetImageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSetImageActionPerformed

        jTextFieldImageName.setText("");
        if (mData==null) return;
        jTextFieldImageName.setText(mData.mName);

        if (mCurrentTile==null)
            mCurrentTile = new TileData();

        if (mData.getHeight().size()>0)
        {

            if ((mCurrentTile.mHeight == 0)|| (!mCurrentTile.mForceTileSize))
                jTextFieldGraphicsHeightTile.setText(""+mData.getHeight().elementAt(0));
        }
        if (mData.getWidth().size()>0)
        {
            if ((mCurrentTile.mWidth == 0) || (!mCurrentTile.mForceTileSize))
                jTextFieldGraphicsWidthTile.setText(""+mData.getWidth().elementAt(0));
        }
        if (mCurrentTile == null) mCurrentTile = new TileData();

        mCurrentTile.mWidth = UtilityString.Int0(jTextFieldGraphicsWidthTile.getText());
        mCurrentTile.mHeight = UtilityString.Int0(jTextFieldGraphicsHeightTile.getText());

        mCurrentTile.mImageDataFile = jTextFieldGraphicFile.getText();
        jTextFieldImagePoolName.setText( mCurrentTile.mImageDataFile);
        mCurrentTile.mImageDataName = mData.mName;
        
        setTileView();
    }//GEN-LAST:event_jButtonSetImageActionPerformed

    private void jCheckBoxForceTileSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxForceTileSizeActionPerformed
        readCurrentTileInfo();
        setTileView();
    }//GEN-LAST:event_jCheckBoxForceTileSizeActionPerformed

    private void jButtonRemoveOneTileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRemoveOneTileActionPerformed
        mTileDataPool.remove(mCurrentTile); // remove geht über name!
        mCurrentTile = new TileData();
        resetTileList("");
    }//GEN-LAST:event_jButtonRemoveOneTileActionPerformed

    private void jButtonNewTileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNewTileActionPerformed
        mCurrentTile = new TileData();
        setCurrentTileInfo();
    }//GEN-LAST:event_jButtonNewTileActionPerformed

    private void jButtonSaveAttributeBundleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveAttributeBundleActionPerformed

        readAllAttribute();
        
        mAttributeBundleDataPool.put(mAttributeBundleData);
        mAttributeBundleDataPool.save();
        mClassSetting++;
        resetAttributePool();
        
        jComboBoxAttribute.setSelectedItem(mAttributeBundleData.mName);
        mClassSetting--;
    }//GEN-LAST:event_jButtonSaveAttributeBundleActionPerformed

    private void jComboBoxAttributeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxAttributeActionPerformed

        if (mClassSetting>0) return;
        if (jComboBoxAttribute.getSelectedIndex() == -1) return;
        String name = jComboBoxAttribute.getSelectedItem().toString();
        if (name.trim().length()==0) return;

        AttributeBundleData aData = mAttributeBundleDataPool.get(name);

        for(int i=0; i < aData.mAtrributeName.size(); i++)
        {
            TileAttribute ta  = new TileAttribute();

            ta.name = aData.mAtrributeName.elementAt(i);
            ta.type = aData.mAttributeType.elementAt(i);

            ta.setSVal(aData.mAttributeValue.elementAt(i), ta.type);

            mAttributeData.addElement(ta);
        }
        resetAttributeTable();
    }//GEN-LAST:event_jComboBoxAttributeActionPerformed

    private void jButtonFileSelect3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonFileSelect3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonFileSelect3ActionPerformed

    private void jButtonAddOneAttribute1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddOneAttribute1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonAddOneAttribute1ActionPerformed

    private void jButtonNewAttribute1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNewAttribute1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonNewAttribute1ActionPerformed

    private void jButtonDeleteSelectedAttributes1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteSelectedAttributes1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonDeleteSelectedAttributes1ActionPerformed

    private void jButtonExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonExportActionPerformed

        String klasse = jTextFieldKlasse.getText().trim();
        if (klasse.length() == 0) {
            return;
        }

        ExportFrame exportFrame = new ExportFrame(mAllTilesInClass);

        exportFrame.setVisible(true);


    }//GEN-LAST:event_jButtonExportActionPerformed

    private void jButtonReplaceAttributeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonReplaceAttributeActionPerformed

        mAttributeData.remove(mCurrentAttributeData);
        readCurrentAttributeData();
        jComboBoxAttributeName.setSelectedItem(null);
        jTextFieldAttributeValue.setText("");
    }//GEN-LAST:event_jButtonReplaceAttributeActionPerformed

    private void jCheckBoxUseArtifactActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxUseArtifactActionPerformed
        if (jCheckBoxUseArtifact.isSelected())
        {
            jCheckBoxUseTopDown.setSelected(false);
            jCheckBoxUseArtifact1.setSelected(false);            
        }

    }//GEN-LAST:event_jCheckBoxUseArtifactActionPerformed

    private void jCheckBoxUseTopDownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxUseTopDownActionPerformed
        if (jCheckBoxUseTopDown.isSelected())
        {
            jCheckBoxUseArtifact.setSelected(false);            
            jCheckBoxUseArtifact1.setSelected(false);            
        }

    }//GEN-LAST:event_jCheckBoxUseTopDownActionPerformed

    private void jButtonAddAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddAllActionPerformed

        String baseName = jTextFieldTileName.getText();
        for (int i=0; i< jPanelIMageCollection.getComponentCount(); i++)
        {
            JPanel imagePanel = (JPanel) jPanelIMageCollection.getComponent(i);
            selectImage(imagePanel);
           
            boolean nameAsLetterAttribute=true;
            if (nameAsLetterAttribute)
            {

                String name  = imagePanel.getName();
                jTextFieldTileName.setText(name);

                jButtonSetImageActionPerformed(null);
                
                TileAttribute attributeData = new TileAttribute();
                attributeData.name = "Letter";
                attributeData.type = "String";
                attributeData.setSVal(name, mCurrentAttributeData.type);
                mAttributeData.clear();
                mAttributeData.addElement(attributeData);

                jButtonAddOneTileActionPerformed(null);
            
            }
            else
            {
                jTextFieldTileName.setText(baseName+"_"+i);
                jButtonSetImageActionPerformed(null);
                jButtonAddOneTileActionPerformed(null);
            }
        }
    }//GEN-LAST:event_jButtonAddAllActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        if (currentSelectedVariantImagePanel == null) return;
        jPanelIMageTileVariations.remove(currentSelectedVariantImagePanel);

        // reorder
         for (int i=0; i<jPanelIMageTileVariations.getComponentCount(); i++)
         {
            JPanel panel = (JPanel) jPanelIMageTileVariations.getComponent(i);
            panel.setBounds(15+i*50, 20, 42, 42);
         }

        currentSelectedVariantImagePanel = null;
        jPanelIMageTileVariations.invalidate();
        jPanelIMageTileVariations.validate();
        jPanelIMageTileVariations.repaint();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        
        if (mCurrentTile == null) return;
        if (jCheckBoxUseArtifact.isSelected())
        {
            {
                String baseName = mCurrentTile.mName;
                String baseName_base = baseName.substring(0, baseName.length()-2); // subtract "_0"
                
                mCurrentTile.mTransitionChildrenNames = new Vector<String>();
                mCurrentTile.mTransitionChildrenNames.add("");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_1");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_25");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_30");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_26");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_28");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_2");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_6");

                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_27");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_3");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_29");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_7");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_4");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_5");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_8");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_12");

                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_23");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_9");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_13");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_10");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_18");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_15");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_19");

                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_11");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_16");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_17");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_21");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_14");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_22");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_20");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_24");
                for (int i=1; i<32; i++)
                {
                    String name = "";
                    if (mCurrentTile.mTransitionChildrenNames.size()>i)
                       name = mCurrentTile.mTransitionChildrenNames.elementAt(i);
                    JPanel panel = transitionPanels[i];
                    if (panel != null)
                    {
                       setTransitionTile(name, panel, false, i);
                    }
                }
            }
        }
        
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jCheckBoxUseArtifact1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxUseArtifact1ActionPerformed
        if (jCheckBoxUseArtifact1.isSelected())
        {
            jCheckBoxUseArtifact.setSelected(false);            
            jCheckBoxUseTopDown.setSelected(false);            
        }
    }//GEN-LAST:event_jCheckBoxUseArtifact1ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed

        
        if (mCurrentTile == null) return;
        if (jCheckBoxUseArtifact1.isSelected())
        {
            {
                String baseName = mCurrentTile.mName;
                String baseName_base = baseName.substring(0, baseName.length()-2); // subtract "_0"
                
                mCurrentTile.mTransitionChildrenNames = new Vector<String>();
                mCurrentTile.mTransitionChildrenNames.add("");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_1");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_25");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_30");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_26");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_28");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_2");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_6");

                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_27");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_3");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_29");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_7");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_4");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_5");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_8");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_12");

                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_23");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_9");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_13");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_10");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_18");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_15");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_19");

                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_11");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_16");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_17");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_21");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_14");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_22");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_20");
                mCurrentTile.mTransitionChildrenNames.add(baseName_base+"_24");
                for (int i=1; i<32; i++)
                {
                    String name = "";
                    if (mCurrentTile.mTransitionChildrenNames.size()>i)
                       name = mCurrentTile.mTransitionChildrenNames.elementAt(i);
                    JPanel panel = transitionPanelsISO[i];
                    if (panel != null)
                    {
                       setTransitionTile(name, panel, false, i);
                    }
                }
            }
        }
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jComboBoxAttributeType2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxAttributeType2ActionPerformed

        if (jComboBoxAttributeType2.getSelectedIndex()==1)
        {
            jTextField6.setEnabled(true);
            jLabel124.setEnabled(true);
            jTextField8.setEnabled(true);
            jTextField9.setEnabled(true);
            jTextField10.setEnabled(true);
            jLabel123.setEnabled(true);
            jLabel125.setEnabled(true);
            jLabel126.setEnabled(true);
            
            if (mCurrentTile==null) return;
            if (mCurrentTile.mISOHeight!= 0)
            {
                jTextField8.setText(""+mCurrentTile.mISOHeight);
            }
            else
            {
                jTextField8.setText(jTextFieldGraphicsHeightTile.getText());
            }
            
            if (mCurrentTile.mISOBaseline!= 0)
            {
                jTextField9.setText(""+mCurrentTile.mISOBaseline);
            }
            else
            {
                jTextField9.setText(jTextFieldGraphicsHeightTile.getText());
            }
            if (mCurrentTile.mISOHeightOffset!= 0)
            {
                jTextField10.setText(""+mCurrentTile.mISOHeightOffset);
            }
            else
            {
                jTextField10.setText(""+0);
            }
            if (mCurrentTile.mISOInherentOffset!= 0)
            {
                jTextField10.setText(""+mCurrentTile.mISOInherentOffset);
            }
            else
            {
                jTextField10.setText(""+0);
            }
        }
        else
        {
            jTextField6.setEnabled(false);
            jLabel124.setEnabled(false);
            
            jTextField8.setEnabled(false);
            jTextField9.setEnabled(false);
            jTextField10.setEnabled(false);
            jLabel123.setEnabled(false);
            jLabel125.setEnabled(false);
            jLabel126.setEnabled(false);
        }
        setISODisplay();
        
    }//GEN-LAST:event_jComboBoxAttributeType2ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        setISODisplay();
    }//GEN-LAST:event_jButton5ActionPerformed

    void readAllAttribute()
    {
        // allways new - dont overwrite old ones
        mAttributeBundleData = new AttributeBundleData();

        for (int i = 0; i < mAttributeData.size(); i++)
        {
            TileAttribute tileAttribute = mAttributeData.elementAt(i);
            mAttributeBundleData.mAtrributeName.addElement(tileAttribute.name);
            mAttributeBundleData.mAttributeType.addElement(tileAttribute.type);
            mAttributeBundleData.mAttributeValue.addElement(tileAttribute.sVal());
        }
        mAttributeBundleData.mClass="ALL";
        mAttributeBundleData.mName=jTextFieldAttributeBundleName.getText();
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private csa.tiletools.graphics.ImageComponent imageComponent1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButtonAddAll;
    private javax.swing.JButton jButtonAddOneAttribute;
    private javax.swing.JButton jButtonAddOneAttribute1;
    private javax.swing.JButton jButtonAddOneTile;
    private javax.swing.JButton jButtonDelete;
    private javax.swing.JButton jButtonDeleteSelectedAttributes;
    private javax.swing.JButton jButtonDeleteSelectedAttributes1;
    private javax.swing.JButton jButtonExport;
    private javax.swing.JButton jButtonFileSelect1;
    private javax.swing.JButton jButtonFileSelect2;
    private javax.swing.JButton jButtonFileSelect3;
    private javax.swing.JButton jButtonNew;
    private javax.swing.JButton jButtonNewAttribute;
    private javax.swing.JButton jButtonNewAttribute1;
    private javax.swing.JButton jButtonNewTile;
    private javax.swing.JButton jButtonRemoveOneTile;
    private javax.swing.JButton jButtonReplaceAttribute;
    private javax.swing.JButton jButtonSaveAsNew;
    private javax.swing.JButton jButtonSaveAttributeBundle;
    private javax.swing.JButton jButtonSaveTileSet;
    private javax.swing.JButton jButtonSetImage;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox5;
    private javax.swing.JCheckBox jCheckBoxForceTileSize;
    private javax.swing.JCheckBox jCheckBoxIsTerrainTransitionTile;
    private javax.swing.JCheckBox jCheckBoxScaled;
    private javax.swing.JCheckBox jCheckBoxUseArtifact;
    private javax.swing.JCheckBox jCheckBoxUseArtifact1;
    private javax.swing.JCheckBox jCheckBoxUseTopDown;
    private javax.swing.JComboBox jComboBoxAttribute;
    private javax.swing.JComboBox jComboBoxAttributeName;
    private javax.swing.JComboBox jComboBoxAttributeName1;
    private javax.swing.JComboBox jComboBoxAttributeType;
    private javax.swing.JComboBox jComboBoxAttributeType1;
    private javax.swing.JComboBox jComboBoxAttributeType2;
    private javax.swing.JComboBox jComboBoxKlasse;
    private javax.swing.JComboBox jComboBoxKlasseGraphic;
    private javax.swing.JComboBox jComboBoxNameGraphic;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel111;
    private javax.swing.JLabel jLabel112;
    private javax.swing.JLabel jLabel113;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel116;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel122;
    private javax.swing.JLabel jLabel123;
    private javax.swing.JLabel jLabel124;
    private javax.swing.JLabel jLabel125;
    private javax.swing.JLabel jLabel126;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel131;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel1_1;
    private javax.swing.JPanel jPanel1_2;
    private javax.swing.JPanel jPanel1_3;
    private javax.swing.JPanel jPanel1_4;
    private javax.swing.JPanel jPanel1_5;
    private javax.swing.JPanel jPanel1_6;
    private javax.swing.JPanel jPanel1_7;
    private javax.swing.JPanel jPanel1_8;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel2_1;
    private javax.swing.JPanel jPanel2_2;
    private javax.swing.JPanel jPanel2_3;
    private javax.swing.JPanel jPanel2_4;
    private javax.swing.JPanel jPanel2_5;
    private javax.swing.JPanel jPanel2_6;
    private javax.swing.JPanel jPanel2_7;
    private javax.swing.JPanel jPanel2_8;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel3_1;
    private javax.swing.JPanel jPanel3_2;
    private javax.swing.JPanel jPanel3_3;
    private javax.swing.JPanel jPanel3_4;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanelC1;
    private javax.swing.JPanel jPanelC10;
    private javax.swing.JPanel jPanelC11;
    private javax.swing.JPanel jPanelC12;
    private javax.swing.JPanel jPanelC13;
    private javax.swing.JPanel jPanelC14;
    private javax.swing.JPanel jPanelC15;
    private javax.swing.JPanel jPanelC16;
    private javax.swing.JPanel jPanelC17;
    private javax.swing.JPanel jPanelC18;
    private javax.swing.JPanel jPanelC19;
    private javax.swing.JPanel jPanelC2;
    private javax.swing.JPanel jPanelC20;
    private javax.swing.JPanel jPanelC21;
    private javax.swing.JPanel jPanelC22;
    private javax.swing.JPanel jPanelC23;
    private javax.swing.JPanel jPanelC24;
    private javax.swing.JPanel jPanelC25;
    private javax.swing.JPanel jPanelC26;
    private javax.swing.JPanel jPanelC27;
    private javax.swing.JPanel jPanelC28;
    private javax.swing.JPanel jPanelC29;
    private javax.swing.JPanel jPanelC3;
    private javax.swing.JPanel jPanelC30;
    private javax.swing.JPanel jPanelC4;
    private javax.swing.JPanel jPanelC5;
    private javax.swing.JPanel jPanelC6;
    private javax.swing.JPanel jPanelC7;
    private javax.swing.JPanel jPanelC8;
    private javax.swing.JPanel jPanelC9;
    private javax.swing.JPanel jPanelE1;
    private javax.swing.JPanel jPanelE10;
    private javax.swing.JPanel jPanelE11;
    private javax.swing.JPanel jPanelE12;
    private javax.swing.JPanel jPanelE13;
    private javax.swing.JPanel jPanelE14;
    private javax.swing.JPanel jPanelE15;
    private javax.swing.JPanel jPanelE16;
    private javax.swing.JPanel jPanelE17;
    private javax.swing.JPanel jPanelE18;
    private javax.swing.JPanel jPanelE19;
    private javax.swing.JPanel jPanelE2;
    private javax.swing.JPanel jPanelE20;
    private javax.swing.JPanel jPanelE21;
    private javax.swing.JPanel jPanelE22;
    private javax.swing.JPanel jPanelE23;
    private javax.swing.JPanel jPanelE24;
    private javax.swing.JPanel jPanelE25;
    private javax.swing.JPanel jPanelE26;
    private javax.swing.JPanel jPanelE27;
    private javax.swing.JPanel jPanelE28;
    private javax.swing.JPanel jPanelE29;
    private javax.swing.JPanel jPanelE3;
    private javax.swing.JPanel jPanelE30;
    private javax.swing.JPanel jPanelE4;
    private javax.swing.JPanel jPanelE5;
    private javax.swing.JPanel jPanelE6;
    private javax.swing.JPanel jPanelE7;
    private javax.swing.JPanel jPanelE8;
    private javax.swing.JPanel jPanelE9;
    private javax.swing.JPanel jPanelIMageCollection;
    private javax.swing.JPanel jPanelIMageCollection1;
    private javax.swing.JPanel jPanelIMageTileVariations;
    private javax.swing.JPanel jPanelSmoothing;
    private javax.swing.JPanel jPanelSmoothing1;
    private javax.swing.JPanel jPanelSmoothing10;
    private javax.swing.JPanel jPanelSmoothing2;
    private javax.swing.JPanel jPanelSmoothing3;
    private javax.swing.JPanel jPanelSmoothing4;
    private javax.swing.JPanel jPanelSmoothing5;
    private javax.swing.JPanel jPanelSmoothing6;
    private javax.swing.JPanel jPanelSmoothing7;
    private javax.swing.JPanel jPanelSmoothing8;
    private javax.swing.JPanel jPanelSmoothing9;
    private javax.swing.JPanel jPanelTileView;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTabbedPane jTabbedPane3;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTableAttributeTable;
    private javax.swing.JTextArea jTextAreaDescription;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField10;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    private javax.swing.JTextField jTextFieldAttributeBundleName;
    private javax.swing.JTextField jTextFieldAttributeValue;
    private javax.swing.JTextField jTextFieldGraphicFile;
    private javax.swing.JTextField jTextFieldGraphicsDelay;
    private javax.swing.JTextField jTextFieldGraphicsHeight;
    private javax.swing.JTextField jTextFieldGraphicsHeightTile;
    private javax.swing.JTextField jTextFieldGraphicsIMageCount;
    private javax.swing.JTextField jTextFieldGraphicsWidth;
    private javax.swing.JTextField jTextFieldGraphicsWidthTile;
    private javax.swing.JTextField jTextFieldImageName;
    private javax.swing.JTextField jTextFieldImagePoolName;
    private javax.swing.JTextField jTextFieldKlasse;
    private javax.swing.JTextField jTextFieldPriority;
    private javax.swing.JTextField jTextFieldTileFile;
    private javax.swing.JTextField jTextFieldTileID;
    private javax.swing.JTextField jTextFieldTileName;
    private csa.tiletools.map.MapPanel mapPanel;
    // End of variables declaration//GEN-END:variables

    public void addTile(TileData tile)
    {
        String file = jTextFieldTileFile.getText().trim();
        String _class = jTextFieldKlasse.getText().trim();
        if (file.length() == 0) return;
        if (_class.length() == 0) return;
        tile.mClass = _class;

        if (mTileDataPool == null)
        {
            mTileDataPool = new TileDataPool("Tile"+File.separator+jTextFieldTileFile.getText().trim()+".xml", false);
        }
        else
        {
            if (!mTileDataPool.getFilename().equals("Tile"+File.separator+jTextFieldTileFile.getText().trim()+".xml"))
            {
                mTileDataPool = new TileDataPool("Tile"+File.separator+jTextFieldTileFile.getText().trim()+".xml", false);
            }
        }
        if (mTileDataPool == null) return;

        mTileDataPool.put(tile);
        readAllToCurrentTileSet();
    }

    public void loadTileCollection()
    {
        String file = jTextFieldTileFile.getText().trim();
        String _class = jTextFieldKlasse.getText().trim();
        if (file.length() == 0) return;

        mTileDataPool = new TileDataPool("Tile"+File.separator+file+".xml");
        if (mTileDataPool == null) return;

        resetConfigPool(true, _class, "");
    }
    String getTileClass()
    {
        String _class = jTextFieldKlasse.getText().trim();
        return _class;
    }

    TileDataPool getPool()
    {
        return mTileDataPool;
    }

    void setTileView()
    {
        jPanelTileView.removeAll();
        if (mCurrentTile == null) return;
        
        jCheckBoxForceTileSize.setEnabled(true);
        jButtonFileSelect2.setEnabled(true);
        jTextFieldGraphicFile.setEnabled(true);
        jComboBoxKlasseGraphic.setEnabled(true);
        jButtonAddAll.setEnabled(true);
            
        if (mCurrentTile.mIsCompositeTile)
        {
            jCheckBoxForceTileSize.setEnabled(false);
            jButtonFileSelect2.setEnabled(false);
            jTextFieldGraphicFile.setEnabled(false);
            jComboBoxKlasseGraphic.setEnabled(false);
            jButtonAddAll.setEnabled(false);
            
            ImageComponent oneTile = new ImageComponent();
            CompositeTile ctile =  getCompositeTile(mCurrentTile);

            BufferedImage bimg = ctile.getImage(160,160);
            oneTile.setImage(bimg);

            oneTile.setBounds(2,2, 160, 160);

            
            jTextFieldGraphicsHeightTile.setText(""+ctile.getMaxHeightUnscaled());
            jTextFieldGraphicsWidthTile.setText(""+ctile.getMaxWidthUnscaled());
            
            
            
            jPanelTileView.add(oneTile);
            oneTile.setVisible(true);
            jPanelTileView.repaint();
        }
        else 
        {
            ImageSequenceData tileImageData = getImageSequenceDataForTile(mCurrentTile);

            ImageComponent oneTile = new ImageComponent();
            oneTile.setSequence(new ImageSequence(tileImageData));

            if (mCurrentTile.mForceTileSize)
                oneTile.setBounds(2,2, mCurrentTile.getWidth(), mCurrentTile.getHeight());
            else
            {
                if ((tileImageData != null) && (tileImageData.getHeight().size()>0))
                {
                    oneTile.setBounds(2,2, tileImageData.getMaxWidth(), tileImageData.getMaxHeight());
                }
            }
            if (tileImageData != null)
            {
                oneTile.setDelay(tileImageData.getDelay());
                if (mCurrentTile.mForceTileSize)
                    oneTile.setScaled(true, mCurrentTile.getHeight(), mCurrentTile.getWidth());
            }
            jPanelTileView.add(oneTile);
            oneTile.setVisible(true);
            jPanelTileView.repaint();
        }
        resetAttributeTable();
        
        setISODisplay();
    }

    void readCurrentTileInfo()
    {
         if (mCurrentTile == null) return;
         mCurrentTile.mName = jTextFieldTileName.getText();
         mCurrentTile.mID = jTextFieldTileID.getText();
         mCurrentTile.mDescription = jTextAreaDescription.getText();

         mCurrentTile.mImageDataName = jTextFieldImageName.getText();
         mCurrentTile.mWidth = UtilityString.Int0(jTextFieldGraphicsWidthTile.getText());
         mCurrentTile.mHeight = UtilityString.Int0(jTextFieldGraphicsHeightTile.getText());

         mCurrentTile.mVariantPercent = UtilityString.Int0(jTextField5.getText());

         mCurrentTile.mForceTileSize =jCheckBoxForceTileSize.isSelected();
         mCurrentTile.mTileSetFileName = jTextFieldTileFile.getText().trim();

         mCurrentTile.mIsTransitionSource = jCheckBoxIsTerrainTransitionTile.isSelected();
         mCurrentTile.mTransitionPriority = UtilityString.Int0(jTextFieldPriority.getText());

         mCurrentTile.mVariantNames = new Vector<String>();
         for (int i=0; i<jPanelIMageTileVariations.getComponentCount(); i++)
         {
            String name = "";
            if (jPanelIMageTileVariations.getComponent(i) != null)
               name = jPanelIMageTileVariations.getComponent(i).getName();
            mCurrentTile.mVariantNames.addElement(name);
         }



         mCurrentTile.mTransitionChildrenNames = new Vector<String>();

         mCurrentTile.mTransitionType = 0; // none
         if (jCheckBoxUseArtifact.isSelected())
             mCurrentTile.mTransitionType = 1; // Artifact
         if (jCheckBoxUseTopDown.isSelected())
             mCurrentTile.mTransitionType = 2; // TopDown
         if (jCheckBoxUseArtifact1.isSelected())
             mCurrentTile.mTransitionType = 3; // Artifact ISO

         if (mCurrentTile.mTransitionType == 1) 
         {
            for (int i=0; i<32; i++)
            {
                String name = "";
                if (transitionPanels[i] != null)
                   name = transitionPanels[i].getName();
                mCurrentTile.mTransitionChildrenNames.addElement(name);
            }
         }
         else if (mCurrentTile.mTransitionType == 2)
         {
            for (int i=0; i<20; i++)
            {
                String name = "";
                if (transitionPanels2[i] != null)
                   name = transitionPanels2[i].getName();
                mCurrentTile.mTransitionChildrenNames.addElement(name);
            }
         }
         else if (mCurrentTile.mTransitionType == 3) 
         {
            for (int i=0; i<32; i++)
            {
                String name = "";
                if (transitionPanelsISO[i] != null)
                   name = transitionPanelsISO[i].getName();
                mCurrentTile.mTransitionChildrenNames.addElement(name);
            }
         }

         mCurrentTile.mISOHeight = csa.util.UtilityString.Int0(jTextField8.getText());
         mCurrentTile.mISOHeightOffset = csa.util.UtilityString.Int0(jTextField10.getText());
         mCurrentTile.mISOInherentOffset = csa.util.UtilityString.Int0(jTextField6.getText());
         mCurrentTile.mISOBaseline = csa.util.UtilityString.Int0(jTextField9.getText());
         mCurrentTile.mType = jComboBoxAttributeType2.getSelectedIndex();    
    }

    void setCurrentTileInfo()
    {
        //?? why did I clone here?
        // -> because I dont want to change the orgignal
        // I can go back by switching to another tile back and forth and
        // all changes will be lost for good
         TileData tileCopy = mCurrentTile;
         mCurrentTile= Tile.cloneTileData(tileCopy);

         mAttributeData = TileAttribute.getVector(mCurrentTile);

         if (mCurrentTile == null) return;
         jTextFieldTileName.setText(mCurrentTile.mName);
         jTextFieldTileID.setText(mCurrentTile.mID);
         jTextAreaDescription.setText(mCurrentTile.mDescription);
         jTextFieldImageName.setText(mCurrentTile.mImageDataName);
         jTextFieldImagePoolName.setText(mCurrentTile.mImageDataFile);
         jCheckBoxForceTileSize.setSelected(mCurrentTile.mForceTileSize);
         jTextFieldGraphicsHeightTile.setText(""+mCurrentTile.mHeight);
         jTextFieldGraphicsWidthTile.setText(""+mCurrentTile.mWidth);
         jCheckBoxIsTerrainTransitionTile.setSelected(mCurrentTile.mIsTransitionSource);
         jTextFieldPriority.setText(""+mCurrentTile.mTransitionPriority);
         jTextField5.setText(""+mCurrentTile.mVariantPercent);

         jCheckBoxUseArtifact.setSelected(false);
         jCheckBoxUseTopDown.setSelected(false);

         jComboBoxAttributeType2.setSelectedIndex(mCurrentTile.mType);
         jTextField8.setText(""+mCurrentTile.mISOHeight);
         jTextField10.setText(""+mCurrentTile.mISOHeightOffset);
         jTextField9.setText(""+mCurrentTile.mISOBaseline);
         jTextField6.setText(""+mCurrentTile.mISOInherentOffset);
         
         setVariants(mCurrentTile);

         if (mCurrentTile.mTransitionType == 1)
         {
             jCheckBoxUseArtifact.setSelected(true);
             jCheckBoxUseArtifact1.setSelected(false);
             jCheckBoxUseTopDown.setSelected(false);
            for (int i=1; i<32; i++)
            {
                String name = "";
                if (mCurrentTile.mTransitionChildrenNames.size()>i)
                   name = mCurrentTile.mTransitionChildrenNames.elementAt(i);
                JPanel panel = transitionPanels[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=0; i<20; i++)
            {
                String name = "";
                JPanel panel = transitionPanels2[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=1; i<32; i++)
            {
                String name = "";
                JPanel panel = transitionPanelsISO[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
         }
         else if (mCurrentTile.mTransitionType == 2)
         {
            jCheckBoxUseArtifact.setSelected(false);
            jCheckBoxUseArtifact1.setSelected(false);
            jCheckBoxUseTopDown.setSelected(true);
            for (int i=0; i<20; i++)
            {
                String name = "";
                if (mCurrentTile.mTransitionChildrenNames.size()>i)
                   name = mCurrentTile.mTransitionChildrenNames.elementAt(i);
                JPanel panel = transitionPanels2[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=1; i<32; i++)
            {
                String name = "";
                JPanel panel = transitionPanels[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
             for (int i=1; i<32; i++)
            {
                String name = "";
                JPanel panel = transitionPanelsISO[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
         }
         else if (mCurrentTile.mTransitionType == 3)
         {
             jCheckBoxUseArtifact.setSelected(false);
             jCheckBoxUseArtifact1.setSelected(true);
             jCheckBoxUseTopDown.setSelected(false);
            for (int i=1; i<32; i++)
            {
                String name = "";
                JPanel panel = transitionPanels[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=0; i<20; i++)
            {
                String name = "";
                JPanel panel = transitionPanels2[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=1; i<32; i++)
            {
                String name = "";
                if (mCurrentTile.mTransitionChildrenNames.size()>i)
                   name = mCurrentTile.mTransitionChildrenNames.elementAt(i);
                JPanel panel = transitionPanelsISO[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
         }
         else
         {
            for (int i=1; i<32; i++)
            {
                String name = "";
                JPanel panel = transitionPanels[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=0; i<20; i++)
            {
                String name = "";
                JPanel panel = transitionPanels2[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
            for (int i=1; i<32; i++)
            {
                String name = "";
                JPanel panel = transitionPanelsISO[i];
                if (panel != null)
                {
                   setTransitionTile(name, panel, false, i);
                }
            }
         }

         setTileView();
    }


    void setVariants(TileData tile)
    {
        jPanelIMageTileVariations.removeAll();
        currentSelectedVariantImagePanel = null;

        for (int i=0; i < tile.mVariantNames.size(); i++)
        {
            addVariationTile(tile.mVariantNames.elementAt(i), false);
        }
        jPanelIMageTileVariations.invalidate();
        jPanelIMageTileVariations.validate();
        jPanelIMageTileVariations.repaint();

    }

    private void addVariationTile(String tname, boolean setToData)
    {
        // Sets the transition tile
        // a) upon GUI init from data
        // b) from a drag
        //
        // to GUI
        // and to current tile (if neccessary)

        if (setToData)
        {
            if ((mCurrentTile== null) ||(mCurrentTile.mVariantNames.size() ==0))
            {
                mCurrentTile.mTransitionChildrenNames = new Vector<String>();
            }
            mCurrentTile.mTransitionChildrenNames.add(tname);
        }

        JPanel panel = new JPanel();
        panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        for (int t = 0; t < mAllTilesInClass.size(); t++)
        {
            TileData tileData = mAllTilesInClass.elementAt(t);
            if (!tileData.mName.equals(tname)) continue;

            // tile found in datapool
            ImageSequenceData iSData = getImageSequenceDataForTile(tileData);
            String name = tileData.mName;
            Vector <BaseImageData> data = BaseImageData.toBase(iSData);
            if (data.size()>0)
            {
                Vector<Image> images = new Vector<Image>();
                for (int i = 0; i < data.size(); i++)
                {
                    BaseImageData baseImageData = data.elementAt(i);
                    images.addElement(baseImageData.image);
                }

                panel.setName(""+name);
                panel.setPreferredSize(new java.awt.Dimension(40, 40));
                panel.setLayout(new BorderLayout());
                ImageComponent mip = new ImageComponent();

                panel.add(mip, BorderLayout.CENTER);
                mip.setSequence(new ImageSequence(iSData));
                mip.setScaled(true, 40, 40);
                mip.setVisible(true);

                mip.addMouseListener(new java.awt.event.MouseAdapter() {
                    @Override
                    public void mousePressed(java.awt.event.MouseEvent evt) {
                    }
                    public void mouseReleased(java.awt.event.MouseEvent evt) {
                        JComponent c = (JComponent) evt.getSource();
                        c = (JComponent) c.getParent();
                        JPanel newSelectedImagePanel = (JPanel) c;
                        if (newSelectedImagePanel == currentSelectedVariantImagePanel) return;
                        if (currentSelectedVariantImagePanel != null)
                        {
                            currentSelectedVariantImagePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
                        }
                        currentSelectedVariantImagePanel = newSelectedImagePanel;
                        currentSelectedVariantImagePanel.setBorder(javax.swing.BorderFactory.createLineBorder(Color.ORANGE));
                    }
                });




                panel.setBounds(15+jPanelIMageTileVariations.getComponentCount()*50, 20, 42, 42);
                jPanelIMageTileVariations.add(panel);
                jPanelIMageTileVariations.invalidate();
                jPanelIMageTileVariations.validate();
                jPanelIMageTileVariations.repaint();

            }
        }
        currentSelectedVariantImagePanel = null;
    }
    JPanel currentSelectedVariantImagePanel = null;



    private void setTransitionTile(String tname, JPanel panel, boolean setToData, int number)
    {
        // Sets the transition tile
        // a) upon GUI init from data
        // b) from a drag
        //
        // to GUI
        // and to current tile (if neccessary)

        panel.removeAll();
        panel.setName("");
        if (setToData)
        {
            if (jCheckBoxUseArtifact.isSelected())
            {
                if ((mCurrentTile== null) ||(mCurrentTile.mTransitionChildrenNames.size() ==0))
                {
                    mCurrentTile.mTransitionChildrenNames = new Vector<String>();
                    for(int i=0;i<32; i++)
                    {
                        mCurrentTile.mTransitionChildrenNames.add("");
                    }
                }
                if (mCurrentTile.mTransitionChildrenNames.size() > number+1)
                {
                    mCurrentTile.mTransitionChildrenNames.add(number, tname);
                    mCurrentTile.mTransitionChildrenNames.remove(number+1);
                }
            }
            if (jCheckBoxUseArtifact1.isSelected())
            {
                if ((mCurrentTile== null) ||(mCurrentTile.mTransitionChildrenNames.size() ==0))
                {
                    mCurrentTile.mTransitionChildrenNames = new Vector<String>();
                    for(int i=0;i<32; i++)
                    {
                        mCurrentTile.mTransitionChildrenNames.add("");
                    }
                }
                if (mCurrentTile.mTransitionChildrenNames.size() > number+1)
                {
                    mCurrentTile.mTransitionChildrenNames.add(number, tname);
                    mCurrentTile.mTransitionChildrenNames.remove(number+1);
                }
            }
            if (jCheckBoxUseTopDown.isSelected())
            {
                if ((mCurrentTile== null) ||(mCurrentTile.mTransitionChildrenNames.size() ==0))
                {
                    mCurrentTile.mTransitionChildrenNames = new Vector<String>();
                    for(int i=0;i<20; i++)
                    {
                        mCurrentTile.mTransitionChildrenNames.add("");
                    }
                }
                if (mCurrentTile.mTransitionChildrenNames.size() > number+1)
                {
                    mCurrentTile.mTransitionChildrenNames.add(number, tname);
                    mCurrentTile.mTransitionChildrenNames.remove(number+1);
                }
            }

        }

        for (int t = 0; t < mAllTilesInClass.size(); t++)
        {
            TileData tileData = mAllTilesInClass.elementAt(t);
            if (!tileData.mName.equals(tname)) continue;

            ImageSequenceData iSData = getImageSequenceDataForTile(tileData);
            String name = tileData.mName;
            {
                Vector <BaseImageData> data = BaseImageData.toBase(iSData);
                if (data.size()>0)
                {
                    Vector<Image> images = new Vector<Image>();
                    for (int i = 0; i < data.size(); i++)
                    {
                        BaseImageData baseImageData = data.elementAt(i);
                        images.addElement(baseImageData.image);
                    }

                    panel.setName(""+name);
                    panel.setPreferredSize(new java.awt.Dimension(40, 40));
                    panel.setLayout(new BorderLayout());
                    ImageComponent mip = new ImageComponent();

                    panel.add(mip, BorderLayout.CENTER);
                    mip.setSequence(new ImageSequence(iSData));
                    mip.setScaled(true, 40, 40);
                    mip.setVisible(true);

                    mip.addMouseListener(new java.awt.event.MouseAdapter() {
                        @Override
                        public void mousePressed(java.awt.event.MouseEvent evt) {
                            JPanel aPanel = (JPanel) ((ImageComponent)(evt.getSource())).getParent();
                            aPanel.removeAll();
                            aPanel.setName("");

                            for (int i=1; i<32; i++)
                            {
                                if (transitionPanels[i] == aPanel)
                                {
                                    mCurrentTile.mTransitionChildrenNames.add(i, "");
                                    mCurrentTile.mTransitionChildrenNames.remove(i+1);
                                    TileDataPanel.this.repaint();
                                    break;
                                }
                            }
                            for (int i=1; i<32; i++)
                            {
                                if (transitionPanelsISO[i] == aPanel)
                                {
                                    mCurrentTile.mTransitionChildrenNames.add(i, "");
                                    mCurrentTile.mTransitionChildrenNames.remove(i+1);
                                    TileDataPanel.this.repaint();
                                    break;
                                }
                            }
                        }
                    });
                }
            }
            break;
        }



    }

    void setCurrentAttributeData()
    {
        jComboBoxAttributeName.setSelectedItem(mCurrentAttributeData.name);
        jComboBoxAttributeType.setSelectedItem(mCurrentAttributeData.type);
        jTextFieldAttributeValue.setText(mCurrentAttributeData.sVal());
    }
    void readCurrentAttributeData()
    {
        Object o = jComboBoxAttributeName.getSelectedItem();
        if (o == null) return;
        String aName = o.toString();

        if (jTextFieldAttributeValue.getText().length() == 0) return;

        mCurrentAttributeData = new TileAttribute();
        mCurrentAttributeData.name = aName;
        mCurrentAttributeData.type = (String ) jComboBoxAttributeType.getSelectedItem();
        mCurrentAttributeData.setSVal(jTextFieldAttributeValue.getText(), mCurrentAttributeData.type);

        mAttributeData.addElement(mCurrentAttributeData);

        TileAttribute.fillTile(mAttributeData, mCurrentTile);
        resetAttributeTable();
    }

    private void tableDoubleClicked()
    {
        if (mRow <0) return;
        mCurrentAttributeData = mAttributeData.elementAt(mRow);
        setCurrentAttributeData();
    }

    javax.swing.table.TableModel getTableModel()
    {
        AbstractTableModel model = new
         AbstractTableModel() {
            @Override public String getColumnName(int col)
            {
                if (col==0) return "Name";
                if (col==1) return "Type";
                if (col==2) return "Value";
                return "";
            }
            @Override
            public int getRowCount()
            {
                return mAttributeData.size();
            }
            @Override
            public int getColumnCount() { return 3;}
            @Override
            public Object getValueAt(int row, int col)
            {

                if (col==0) return mAttributeData.elementAt(row).name;
                if (col==1) return mAttributeData.elementAt(row).type;
                if (col==2) return mAttributeData.elementAt(row).sVal();
                return "";
            }
            @Override public boolean isCellEditable(int row, int col)
                { return false; }
            @Override public Class getColumnClass(int col)
            {
                return String.class;
            }
        };
        return model;
    }

    void resetAttributeTable()
    {
        CSATableModel t = CSATableModel.buildTableModel(getTableModel());
        csaPanel = new CSATablePanel(t);
        csaPanel.setXMLId("ImageAttributes");
        csaPanel.setTableStyleSwitchingEnabled(false);
        csaPanel.setTablePopupEnabled(true);
        csaPanel.setDoubleClickAction(new DoubleClickAction()
        {
            @Override
            public void doIt()
            {
                JTable table = (JTable) evt.getSource();
                mRow = table.convertRowIndexToModel(table.rowAtPoint(evt.getPoint()));
                mCol = table.convertColumnIndexToModel(table.columnAtPoint(evt.getPoint()));
                mCol = csaPanel.getModel().convertEnabledColToRealCol(mCol);
                tableDoubleClicked();
            }
        });

        jPanel6.removeAll();
        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(csaPanel)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(csaPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
        );
    }




    void resetTileList(String selectName)
    {
        removeAllTiles();
        mAllTilesInClass = new Vector <TileData>();

        String _class = getTileClass();
        TileDataPool pool = getPool();

        if (pool == null) return;

        Collection<TileData> colDk = pool.getMapForKlasse(_class).values();
        Iterator<TileData> iterDk = colDk.iterator();
        /** Sorting */  Vector<String> names = new Vector<String>();
        while (iterDk.hasNext())
        {
            TileData deck = iterDk.next();
            mAllTilesInClass.addElement(deck);
            names.addElement(deck.mName);

        }
        Collections.sort(names, new Comparator<String>() {@Override
                public int compare(String s1, String s2) { return s1.compareTo(s2); } });
        Collections.sort(mAllTilesInClass, new Comparator<TileData>() {@Override
            public int compare(TileData s1, TileData s2) { return s1.mName.compareTo(s2.mName); } });
        setAllTiles(selectName);
    }

    boolean getGraphicPool()
    {
        String name = "Graphics"+File.separator+jTextFieldGraphicFile.getText()+".xml";
        if (name.trim().length() == 0) return false;
        if (mImageSequenceDataPool!=null)
            if (mImageSequenceDataPool.getFilename().equals(name)) return true;

        mImageSequenceDataPool = new ImageSequenceDataPool(name);
        return true;
    }
    void setPoolOnly()
    {
        if (!getGraphicPool()) return;
        if (mImageSequenceDataPool == null) return;

        String selection = (String) jComboBoxKlasseGraphic.getSelectedItem();
        mClassSetting++;
        jComboBoxKlasseGraphic.removeAllItems();
        Collection<String> collectionKlasse = mImageSequenceDataPool.getKlassenHashMap().values();
        Iterator<String> iterC = collectionKlasse.iterator();
        /** Sorting */  Vector<String> cnames = new Vector<String>(); while (iterC.hasNext()) cnames.addElement(iterC.next()); Collections.sort(cnames, new Comparator<String>() {@Override
            public int compare(String s1, String s2) { return s1.compareTo(s2); } });
        for (int j = 0; j < cnames.size(); j++)
        {
            String string = cnames.elementAt(j);
            jComboBoxKlasseGraphic.addItem(string);
        }

        if (selection!=null) jComboBoxKlasseGraphic.setSelectedItem(selection);
        else
            jComboBoxKlasseGraphic.setSelectedIndex(-1);
        jComboBoxNameGraphic.removeAllItems();
        mClassSetting--;
    }

    void clearGraphicsData()
    {
        jTextFieldGraphicsHeight.setText("");
        jTextFieldGraphicsWidth.setText("");
        jTextFieldGraphicsIMageCount.setText("");
        jTextFieldGraphicsDelay.setText("");

        imageComponent1.setVisible(false);
    }

    void setGraphicsDataFromCurrent()
    {
        if (mData == null) return;
        if (mData.getHeight().isEmpty()) return;

        jTextFieldGraphicsHeight.setText(""+mData.getMaxHeight());
        jTextFieldGraphicsWidth.setText(""+mData.getMaxWidth());
        jTextFieldGraphicsIMageCount.setText(""+mData.size());
        jTextFieldGraphicsDelay.setText(""+mData.getDelay());

        boolean sizesDiffer=false;

        int h = mData.getHeight().elementAt(0);
        int w = mData.getWidth().elementAt(0);
        for (int i =1; i < mData.getHeight().size(); i++)
        {
            if (h != mData.getHeight().elementAt(i))
            {
                sizesDiffer = true;
                break;
            }
            if (w != mData.getWidth().elementAt(i))
            {
                sizesDiffer = true;
                break;
            }
        }


        Vector<Image> images = new Vector<Image>();

        Vector <BaseImageData> mBData = BaseImageData.toBase(mData);
        for (int i = 0; i < mBData.size(); i++)
        {
            BaseImageData baseImageData = mBData.elementAt(i);
            images.addElement(baseImageData.image);
        }

        //imageComponent1.setImages(images);
        imageComponent1.setSequence(new ImageSequence(mData));

        imageComponent1.setScaled(jCheckBoxScaled.isSelected(), 100,100);
        imageComponent1.setVisible(true);

        imageComponent1.setDelay(mData.getDelay());

    }

    private void resetGraphicsPool(boolean select, String klasseToSet, String nameToSet)
    {
        if (!getGraphicPool()) return;
        if (mImageSequenceDataPool == null) return;
        mClassSetting++;

        setPoolOnly();
        String klasse = "";
        if (select)
        {
            if (klasseToSet.length()==0)
            {
                if (jComboBoxKlasseGraphic.getItemCount()>0)
                {
                    jComboBoxKlasseGraphic.setSelectedIndex(0);
                    klasse = (String) jComboBoxKlasseGraphic.getSelectedItem();
                }
            }
            else
            {
                jComboBoxKlasseGraphic.setSelectedItem(klasseToSet);
                klasse = klasseToSet;
            }
        }

        if ((select) && (klasse.length()==0))
        {
            if (jComboBoxKlasseGraphic.getItemCount()>0)
            {
                jComboBoxKlasseGraphic.setSelectedIndex(0);
                klasse = jComboBoxKlasseGraphic.getSelectedItem().toString();
            }
        }
        if ((select) && (klasse.length()!=0))
        {
            jComboBoxNameGraphic.removeAllItems();
            Collection<ImageSequenceData> collectionName = mImageSequenceDataPool.getMapForKlasse(klasse).values();
            Iterator<ImageSequenceData> iterN = collectionName.iterator();
            /** Sorting */  Vector<String> nnames = new Vector<String>(); while (iterN.hasNext()) nnames.addElement(iterN.next().mName); Collections.sort(nnames, new Comparator<String>() {@Override
                public int compare(String s1, String s2) { return s1.compareTo(s2); } });
            for (int j = 0; j < nnames.size(); j++)
            {
                String string = nnames.elementAt(j);
                jComboBoxNameGraphic.addItem(string);
                if (select)
                {
                    if (nameToSet.length() == 0)
                    {
                        if (j== 0) jComboBoxNameGraphic.setSelectedIndex(0);
                    }
                    else
                    {
                        if (nameToSet.equals(string))
                            jComboBoxNameGraphic.setSelectedIndex(j);

                    }

                }
            }
        }
        else
        {
            jComboBoxNameGraphic.removeAllItems();
            Collection<ImageSequenceData> collectionName = mImageSequenceDataPool.getHashMap().values();
            Iterator<ImageSequenceData> iterN = collectionName.iterator();
            /** Sorting */  Vector<String> nnames = new Vector<String>(); while (iterN.hasNext()) nnames.addElement(iterN.next().mName); Collections.sort(nnames, new Comparator<String>() {@Override
                public int compare(String s1, String s2) { return s1.compareTo(s2); } });
            for (int j = 0; j < nnames.size(); j++)
            {
                String string = nnames.elementAt(j);
                jComboBoxNameGraphic.addItem(string);
                if (select)
                {
                    if (nameToSet.length() == 0)
                    {
                        if (j== 0) jComboBoxNameGraphic.setSelectedIndex(0);
                    }
                    else
                    {
                        if (nameToSet.equals(string))
                            jComboBoxNameGraphic.setSelectedIndex(j);

                    }

                }
            }
        }

        if (!select)  jComboBoxKlasseGraphic.setSelectedIndex(-1);
        if (!select)  jComboBoxNameGraphic.setSelectedIndex(-1);


        mClassSetting--;
    }
   int getI(JTextField t)
    {
        return getI(t.getText());
    }

    int getI(String t)
    {
        return  getI(t, 0);
    }
    int getI(String t, int _default)
    {
        int i=_default;
        try
        {
            i = Integer.parseInt(t);
        }
        catch (Throwable e){ }
        return i;
    }
    void setTileMapInfo(String filename, String className)
    {

    }

    void saveAsNew(String filename, String className)
    {
    }

    void save(String filename, String className)
    {
    }
    void removeAllTiles()
    {
        // TODO
    }

    boolean notDragged = true;
    void setAllTiles(String selectName)
    {
        jPanelIMageCollection1.removeAll();
        currentSelectedTileImagePanel = null;

        int selected = 0;
        for (int t = 0; t < mAllTilesInClass.size(); t++)
        {
            TileData tileData = mAllTilesInClass.elementAt(t);
            if (tileData.mName.equals(selectName))
            {
                selected = t;
                break;
            }
        }
        int x = 5;
        int y = 5;
    
        for (int t = 0; t < mAllTilesInClass.size(); t++)
        {
            TileData tileData = mAllTilesInClass.elementAt(t);
            // jPanelIMageCollection1

            ImageSequenceData iSData = getImageSequenceDataForTile(tileData);
            String name = tileData.mName;

            JPanel ipanel = new JPanel();
            if (t==selected)
            {
                currentSelectedTileImagePanel = ipanel;
                ipanel.setBorder(javax.swing.BorderFactory.createLineBorder(Color.ORANGE));
                mCurrentTile = tileData;
                mClassSetting++;
                setCurrentTileInfo();
                mClassSetting--;
            }
            else
                ipanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));


            ipanel.setName(""+name);
            ipanel.setPreferredSize(new java.awt.Dimension(52, 52));
            ipanel.setLayout(new BorderLayout());

            ImageComponent mip = new ImageComponent();
            ipanel.add(mip, BorderLayout.CENTER);


            mip.addMouseListener(new java.awt.event.MouseAdapter() {
                @Override
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    notDragged = true;
                }
                public void mouseReleased(java.awt.event.MouseEvent evt) {
                    if (notDragged)
                        jPanelMouseTileClickedImageVertical(evt);
                }
            });
                /////////////////
            class MyTransferHandler extends TransferHandler
            {
                JPanel me;
                public MyTransferHandler(JPanel c)
                {
                    me = c;
                }
                public int getSourceActions(JComponent c)
                {
                    return TransferHandler.MOVE;
                }
                public  Transferable createTransferable(JComponent c)
                {
                    return new StringSelection(me.getName());
                }
                public void exportDone(JComponent source, Transferable data, int action)
                {

                }
            }

            mip.setTransferHandler(new MyTransferHandler(ipanel));
            mip.addMouseMotionListener(new MouseMotionListener(){
                @Override
                public void mouseDragged(MouseEvent e)
                {
                    notDragged = false;
                    e.consume();
                    JComponent c =(JComponent) e.getSource();
                    TransferHandler handler = c.getTransferHandler();
                    handler.exportAsDrag(c,e,TransferHandler.MOVE);
                    System.out.println("Draging?");
                }
                @Override public void mouseMoved(MouseEvent e) { }
            });

            ipanel.setBounds(x, y, 52, 52);
            jPanelIMageCollection1.add(ipanel);
            if (iSData != null)
            {
                Vector <BaseImageData> data = BaseImageData.toBase(iSData);
                if (data.size()>0)
                {
                    Vector<Image> images = new Vector<Image>();
                    for (int i = 0; i < data.size(); i++)
                    {
                        BaseImageData baseImageData = data.elementAt(i);
                        images.addElement(baseImageData.image);
                    }
                    mip.setSequence(new ImageSequence(iSData));
                    mip.setDelay(iSData.getDelay());
                }
            }
            else
            {
                if (tileData.mIsCompositeTile)
                {
                    CompositeTile ctile =  getCompositeTile(tileData);
                    BufferedImage bimg = ctile.getImage(52,52);
                    //BufferedImage bimg = ctile.getImage(300,300);
                    mip.setImage(bimg);
                }
            }
            
            
            y += 52;
            y += 5;
            mip.setScaled(true, 52, 52);
            mip.setVisible(true);


        }

        jPanelIMageCollection1.setBounds(0,0,62,y);
        jPanelIMageCollection1.setPreferredSize(new Dimension(62,y));
        jPanelIMageCollection1.invalidate();
        jPanelIMageCollection1.validate();
        jPanelIMageCollection1.repaint();


        repaint();
        // TODO
    }
    JPanel currentSelectedTileImagePanel = null;

    private void jPanelMouseTileClickedImageVertical(java.awt.event.MouseEvent evt) {
        JComponent c = (JComponent) evt.getSource();
        c = (JComponent) c.getParent();
        JPanel newSelectedImagePanel = (JPanel) c;
        if (newSelectedImagePanel == currentSelectedTileImagePanel) return;

        if (currentSelectedTileImagePanel != null)
        {
            currentSelectedTileImagePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        }

        currentSelectedTileImagePanel = newSelectedImagePanel;

        currentSelectedTileImagePanel.setBorder(javax.swing.BorderFactory.createLineBorder(Color.ORANGE));
        String name  = currentSelectedTileImagePanel.getName();

        for (int t = 0; t < mAllTilesInClass.size(); t++)
        {
            TileData tileData = mAllTilesInClass.elementAt(t);
            if (tileData.mName.equals(name))
            {
                mCurrentTile = tileData;
                setCurrentTileInfo();
                break;
            }
        }
        setCurrentGraphicsData();
    }

    void removeAllGraphics(boolean clearClassesTo)
    {
        mClassSetting++;
        jPanelIMageCollection.removeAll();
        currentSelectedImagePanel = null;

        jTextFieldGraphicsHeight.setText("");
        jTextFieldGraphicsWidth.setText("");
        jTextFieldGraphicsIMageCount.setText("");
        jTextFieldGraphicsDelay.setText("");
        if (clearClassesTo)
        {
            jComboBoxNameGraphic.removeAllItems();
            jComboBoxNameGraphic.setSelectedIndex(-1);
            jComboBoxKlasseGraphic.removeAllItems();
            jComboBoxKlasseGraphic.setSelectedIndex(-1);
            jTextFieldGraphicFile.setText("");
            mImageSequenceDataPool = null;
        }
        mClassSetting--;
    }
    void setAllGraphics()
    {
        jPanelIMageCollection.removeAll();
        JPanel newSelection = null;

        if (!getGraphicPool()) return;
        if (mImageSequenceDataPool == null) return;
        String klasse = "";
        if (jComboBoxKlasseGraphic.getSelectedIndex() < 0) return;
        klasse = (String) jComboBoxKlasseGraphic.getSelectedItem();
        if (klasse.length()==0) return;

        Collection<ImageSequenceData> collectionName = mImageSequenceDataPool.getMapForKlasse(klasse).values();
        Iterator<ImageSequenceData> iterN = collectionName.iterator();
            /** Sorting */  Vector<String> nnames = new Vector<String>(); while (iterN.hasNext()) nnames.addElement(iterN.next().mName); Collections.sort(nnames, new Comparator<String>() {@Override
                public int compare(String s1, String s2) { return s1.compareTo(s2); } });


        int x = 5;
        int y = 5;
        for (int j = 0; j < nnames.size(); j++)
        {
            String name = nnames.elementAt(j);
            ImageSequenceData iSData = mImageSequenceDataPool.get(name);

            Vector <BaseImageData> data = BaseImageData.toBase(iSData);
            if (data.size()>0)
            {
                Vector<Image> images = new Vector<Image>();
                for (int i = 0; i < data.size(); i++)
                {
                    BaseImageData baseImageData = data.elementAt(i);
                    images.addElement(baseImageData.image);
                }

                JPanel ipanel = new JPanel();
                if (j==0)
                {
                    currentSelectedImagePanel = ipanel;
                    mData = mImageSequenceDataPool.get(name);
                    ipanel.setBorder(javax.swing.BorderFactory.createLineBorder(Color.ORANGE));
                }
                else
                    ipanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

                ipanel.setName(""+name);
                ipanel.setPreferredSize(new java.awt.Dimension(52, 52));
                ipanel.setLayout(new BorderLayout());
                ImageComponent mip = new ImageComponent();

                ipanel.add(mip, BorderLayout.CENTER);
                //mip.setImages(images);
                mip.setSequence(new ImageSequence(iSData));

                mip.addMouseListener(new java.awt.event.MouseAdapter() {
                    @Override
                    public void mousePressed(java.awt.event.MouseEvent evt) {
                        jPanelMouseClickedImageHorizontal(evt);

                    }
                });

                ipanel.setBounds(x, y, 52, 52);

                jPanelIMageCollection.add(ipanel);
//                if (jToggleButtonPlayAnimMain.isSelected())
//                {
                    mip.setDelay(iSData.getDelay());
//                }
//                else
//                {
//                    mip.setDelay(-1);
//                }

                mip.setScaled(true, 52, 52);
                mip.setVisible(true);
                x += 52;
                x += 5;

            }

        }
        setGraphicsDataFromCurrent();
//        jPanelIMageCollection.setBounds(0,0,62,y);
//        jPanelIMageCollection.setPreferredSize(new Dimension(62,y));
        jPanelIMageCollection.invalidate();
        jPanelIMageCollection.validate();
        jPanelIMageCollection.repaint();


        repaint();

    }
    JPanel currentSelectedImagePanel = null;

    private void jPanelMouseClickedImageHorizontal(java.awt.event.MouseEvent evt) {
        JComponent c = (JComponent) evt.getSource();
        c = (JComponent) c.getParent();
        JPanel newSelectedImagePanel = (JPanel) c;
        selectImage(newSelectedImagePanel);
    }

    private void selectImage(JPanel newSelectedImagePanel)
    {
        if (newSelectedImagePanel == currentSelectedImagePanel)
        {
            return;
        }

        if (currentSelectedImagePanel != null)
        {
            currentSelectedImagePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        }

        currentSelectedImagePanel = newSelectedImagePanel;

        currentSelectedImagePanel.setBorder(javax.swing.BorderFactory.createLineBorder(Color.ORANGE));
        String name  = currentSelectedImagePanel.getName();
        if (name.trim().length() == 0)
        {
            jComboBoxNameGraphic.setSelectedIndex(-1);
            jTextFieldGraphicsHeight.setText("");
            jTextFieldGraphicsWidth.setText("");
            jTextFieldGraphicsIMageCount.setText("");
            jTextFieldGraphicsDelay.setText("");
            mData = null;
        }
        else
        {
            mData = mImageSequenceDataPool.get(name);
            jComboBoxNameGraphic.setSelectedItem(name);
            setGraphicsDataFromCurrent();
        }
    }



    ImageSequenceData getImageSequenceDataForTile(TileData tileData)
    {
        if (tileData.mImageDataFile.trim().length()==0) return null;

        String imageFilename = "Graphics"+File.separator+tileData.mImageDataFile+".xml";
        ImageSequenceDataPool imagePool = new ImageSequenceDataPool(imageFilename);
        if (imagePool == null) return null;
        String nameToSet = tileData.getImageDataName();

        return imagePool.get(nameToSet);
    }

    private void setCurrentGraphicsData()
    {
        if (mCurrentTile.mIsCompositeTile) return;
        String filename = mCurrentTile.mImageDataFile;
        String imageSequenceName = mCurrentTile.mImageDataName;


        // select imagefile
        jTextFieldGraphicFile.setText(csa.util.UtilityString.replace(filename, ".xml", ""));
        jTextFieldGraphicFileActionPerformed(null);


        // select image class
        String imageClassName="";
        Collection<ImageSequenceData> collectionKlasse = mImageSequenceDataPool.getHashMap().values();
        Iterator<ImageSequenceData> iterC = collectionKlasse.iterator();

        while (iterC.hasNext())
        {
            ImageSequenceData d = iterC.next();
            if (d.getName().equals(imageSequenceName))
            {
                imageClassName = d.getCClass();
                break;
            }
        }
        if (imageClassName.length()==0) return;
        mClassSetting++;
        jComboBoxKlasseGraphic.setSelectedItem(imageClassName);
        mClassSetting--;
        
        // force selection
        int save = mClassSetting;
        mClassSetting = 0;
        jComboBoxKlasseGraphicActionPerformed(null);
        mClassSetting = save;

        // select image sequence
        for(int i=0; i< jPanelIMageCollection.getComponentCount(); i++)
        {
            String thisname = jPanelIMageCollection.getComponent(i).getName();
            if (imageSequenceName.equals(thisname))
            {
                selectImage((JPanel) jPanelIMageCollection.getComponent(i));
                break;
            }
        }
    }
    HashMap <String, CompositeTile> compositeTileCache = new HashMap <String, CompositeTile>();
    private void resetCompositeCache()
    {
        compositeTileCache.clear();
    }
    private CompositeTile getCompositeTile(TileData tileData)
    {
        String key = tileData.mCompositeFile+tileData.mName;
        CompositeTile ret = compositeTileCache.get(key);
        if (ret == null)
        {
            ret = new CompositeTile(tileData);
            compositeTileCache.put(key, ret);
        }
        
        return ret;
    }
    private void setISODisplay()
    {
        if ((jComboBoxAttributeType2.getSelectedIndex()!=1))
        {
            TMap map = new TMap();
            mapPanel.setMap(map);
            mapPanel.setGrid(null, false);

            return;
        }
        // build a grid
        // set a grid
        // display tile in the middle
        // possibly do a zoom
        int gridWidth = csa.util.UtilityString.Int0(jTextFieldGraphicsWidthTile.getText());
        int gridHeight = csa.util.UtilityString.Int0(jTextField8.getText());
        
        GridSettingsData grid = new GridSettingsData();      
        
	grid.setCClass("");
	grid.mName="";
	grid.geteveryX().addElement(gridWidth);
	//grid.mXOffset=new Vector<Integer>();
	grid.geteveryY().addElement(gridHeight);
	//grid.mYOffset=new Vector<Integer>();
        grid.setDrawTyp(MapPanel.FIGURE_ISO);
	grid.setSHowHotSpot(true);
	grid.setGridColor(-1);
	//grid.mXAlternating=false;
	//grid.mYAlternating=false;
                
        mapPanel.setGrid(grid, true);

        TMap map = new TMap();
        readCurrentTileInfo();
        Tile tile = new Tile(mCurrentTile);
        
        
        tile.setX(gridWidth/2);
        tile.setY(gridHeight/2);
        map.getCurrentLayer().addTile(mCurrentTile, gridWidth/2, gridHeight/2, true);
        
        mapPanel.setMap(map);
    }


}
