package com.editor.object;

import com.alex.loaders.objects.ObjectDefinitions;
import com.editor.Main;
import com.editor.object.ObjectSelection;

import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ObjectEditor extends JFrame {
   private ObjectDefinitions defs;
   private ObjectSelection os;
   private JTextField ModelOffset1;
   private JTextField ModelRot2;
   private JMenuItem addModelMenuBtn;
   private JTextField array1;
   private JTextField array2;
   private JTextField array3;
   private JTextField array4;
   private JTextField array5;
   private JTextField array6;
   private JTextField csk1;
   private JTextField csk2;
   private JTextField csk3;
   private JTextField csk4;
   private JTextField csk5;
   private JTextField csk6;
   private JTextField csk7;
   private JTextField csv1;
   private JTextField csv2;
   private JTextField csv3;
   private JTextField csv4;
   private JTextField csv5;
   private JTextField csv6;
   private JTextField csv7;
   private JLabel currentViewLabel;
   private JTextField equipSlot;
   private JTextField equipType;
   private JMenuItem exitMenuBtn;
   private JMenuItem exportMenuBtn;
   private JTextField femaleEquip1;
   private JTextField femaleEquip2;
   private JTextField femaleEquip3;
   private JTextField groundOptions;
   private JTextField int1;
   private JTextField int10;
   private JTextField int11;
   private JTextField int12;
   private JTextField int13;
   private JTextField int14;
   private JTextField int15;
   private JTextField int16;
   private JTextField int17;
   private JTextField int18;
   private JTextField int19;
   private JTextField int2;
   private JTextField int20;
   private JTextField int21;
   private JTextField int22;
   private JTextField int23;
   private JTextField int3;
   private JTextField int4;
   private JTextField int5;
   private JTextField int6;
   private JTextField int7;
   private JTextField int8;
   private JTextField int9;
   private JTextField invModel;
   private JTextField invModelZoom;
   private JTextField invOptions;
   private JTextField objectName;
   private JLabel jLabel1;
   private JLabel jLabel10;
   private JLabel jLabel11;
   private JLabel jLabel12;
   private JLabel jLabel13;
   private JLabel jLabel14;
   private JLabel jLabel15;
   private JLabel jLabel16;
   private JLabel jLabel17;
   private JLabel jLabel18;
   private JLabel jLabel19;
   private JLabel jLabel2;
   private JLabel jLabel20;
   private JLabel jLabel21;
   private JLabel jLabel22;
   private JLabel jLabel23;
   private JLabel jLabel24;
   private JLabel jLabel25;
   private JLabel jLabel26;
   private JLabel jLabel27;
   private JLabel jLabel28;
   private JLabel jLabel29;
   private JLabel jLabel3;
   private JLabel jLabel30;
   private JLabel jLabel31;
   private JLabel jLabel32;
   private JLabel jLabel33;
   private JLabel jLabel34;
   private JLabel jLabel35;
   private JLabel jLabel36;
   private JLabel jLabel37;
   private JLabel jLabel38;
   private JLabel jLabel39;
   private JLabel jLabel4;
   private JLabel jLabel40;
   private JLabel jLabel41;
   private JLabel jLabel42;
   private JLabel jLabel43;
   private JLabel jLabel44;
   private JLabel jLabel45;
   private JLabel jLabel46;
   private JLabel jLabel47;
   private JLabel jLabel48;
   private JLabel jLabel49;
   private JLabel jLabel5;
   private JLabel jLabel50;
   private JLabel jLabel51;
   private JLabel jLabel52;
   private JLabel jLabel53;
   private JLabel jLabel54;
   private JLabel jLabel55;
   private JLabel jLabel56;
   private JLabel jLabel57;
   private JLabel jLabel58;
   private JLabel jLabel59;
   private JLabel jLabel6;
   private JLabel jLabel60;
   private JLabel jLabel61;
   private JLabel jLabel7;
   private JLabel jLabel8;
   private JLabel jLabel9;
   private JMenu jMenu1;
   private JMenuBar jMenuBar1;
   private JPanel jPanel1;
   private JPanel jPanel2;
   private JPanel jPanel3;
   private JPanel jPanel5;
   private JPanel jPanel6;
   private JPanel jPanel7;
   private JScrollPane jScrollPane1;
   private JTabbedPane jTabbedPane1;
   private JTextField lend;
   private JTextField maleEquip1;
   private JTextField maleEquip2;
   private JTextField maleEquip3;
   private JCheckBox membersOnly;
   private JTextField modelColors;
   private JTextField modelOffset2;
   private JTextField modelRot1;
   private JTextField note;
   private JMenuItem reloadMenuBtn;
   private JMenuItem saveMenuBtn;
   private JTextField stackAmts;
   private JTextField stackIDs;
   private JTextField stackable;
   public JTextField switchLend;
   public JTextField switchNote;
   public JTextField sizeY;
   public JTextField textureColors;
   public JCheckBox unnoted;
   public JTextField sizeX;


   public ObjectEditor(ObjectSelection os, ObjectDefinitions defs) {
      this.defs = defs;
      this.os = os;
      this.initComponents();
      this.setResizable(false);
      this.setTitle("Object Editor");
      this.setDefaultCloseOperation(1);
      this.setLocationRelativeTo((Component)null);
      this.setVisible(true);
   }
   
   private void initComponents() {
        this.jTabbedPane1 = new JTabbedPane();
      this.jPanel1 = new JPanel();
      this.jLabel1 = new JLabel();
      this.objectName = new JTextField();
      this.jLabel2 = new JLabel();
      this.sizeX = new JTextField();
      this.sizeY = new JTextField();
      this.jLabel3 = new JLabel();
      this.membersOnly = new JCheckBox();
      this.jLabel20 = new JLabel();
      this.equipSlot = new JTextField();
      this.jLabel21 = new JLabel();
      this.equipType = new JTextField();
      this.jLabel22 = new JLabel();
      this.stackIDs = new JTextField();
      this.jLabel23 = new JLabel();
      this.stackAmts = new JTextField();
      this.jLabel24 = new JLabel();
      this.stackable = new JTextField();
      this.jLabel58 = new JLabel();
      this.switchNote = new JTextField();
      this.jLabel59 = new JLabel();
      this.note = new JTextField();
      this.unnoted = new JCheckBox();
      this.jLabel60 = new JLabel();
      this.jLabel61 = new JLabel();
      this.switchLend = new JTextField();
      this.lend = new JTextField();
      this.jPanel2 = new JPanel();
      this.jLabel4 = new JLabel();
      this.invModelZoom = new JTextField();
      this.jLabel5 = new JLabel();
      this.modelRot1 = new JTextField();
      this.jLabel6 = new JLabel();
      this.ModelRot2 = new JTextField();
      this.jLabel7 = new JLabel();
      this.ModelOffset1 = new JTextField();
      this.jLabel8 = new JLabel();
      this.modelOffset2 = new JTextField();
      this.jLabel9 = new JLabel();
      this.invModel = new JTextField();
      this.jLabel10 = new JLabel();
      this.maleEquip1 = new JTextField();
      this.jLabel11 = new JLabel();
      this.femaleEquip1 = new JTextField();
      this.jLabel12 = new JLabel();
      this.maleEquip2 = new JTextField();
      this.jLabel13 = new JLabel();
      this.femaleEquip2 = new JTextField();
      this.jLabel14 = new JLabel();
      this.maleEquip3 = new JTextField();
      this.jLabel15 = new JLabel();
      this.femaleEquip3 = new JTextField();
      this.jPanel3 = new JPanel();
      this.jLabel16 = new JLabel();
      this.invOptions = new JTextField();
      this.jLabel17 = new JLabel();
      this.groundOptions = new JTextField();
      this.jLabel18 = new JLabel();
      this.modelColors = new JTextField();
      this.jLabel19 = new JLabel();
      this.textureColors = new JTextField();
      this.jPanel5 = new JPanel();
      this.jLabel25 = new JLabel();
      this.array1 = new JTextField();
      this.jLabel27 = new JLabel();
      this.jLabel28 = new JLabel();
      this.jLabel29 = new JLabel();
      this.jLabel30 = new JLabel();
      this.jLabel31 = new JLabel();
      this.array2 = new JTextField();
      this.array3 = new JTextField();
      this.array4 = new JTextField();
      this.array5 = new JTextField();
      this.array6 = new JTextField();
      this.jLabel32 = new JLabel();
      this.int1 = new JTextField();
      this.int2 = new JTextField();
      this.jLabel33 = new JLabel();
      this.jLabel34 = new JLabel();
      this.int3 = new JTextField();
      this.jLabel35 = new JLabel();
      this.int4 = new JTextField();
      this.jLabel36 = new JLabel();
      this.int5 = new JTextField();
      this.jLabel37 = new JLabel();
      this.int6 = new JTextField();
      this.jLabel38 = new JLabel();
      this.int7 = new JTextField();
      this.jLabel39 = new JLabel();
      this.int8 = new JTextField();
      this.jLabel40 = new JLabel();
      this.int9 = new JTextField();
      this.jLabel41 = new JLabel();
      this.int10 = new JTextField();
      this.jLabel42 = new JLabel();
      this.int11 = new JTextField();
      this.jLabel43 = new JLabel();
      this.int12 = new JTextField();
      this.jLabel44 = new JLabel();
      this.int13 = new JTextField();
      this.jLabel45 = new JLabel();
      this.int14 = new JTextField();
      this.jPanel6 = new JPanel();
      this.jLabel46 = new JLabel();
      this.int15 = new JTextField();
      this.jLabel47 = new JLabel();
      this.int16 = new JTextField();
      this.jLabel48 = new JLabel();
      this.int17 = new JTextField();
      this.jLabel49 = new JLabel();
      this.int18 = new JTextField();
      this.jLabel50 = new JLabel();
      this.int19 = new JTextField();
      this.jLabel51 = new JLabel();
      this.int20 = new JTextField();
      this.jLabel52 = new JLabel();
      this.int21 = new JTextField();
      this.jLabel53 = new JLabel();
      this.int22 = new JTextField();
      this.jLabel54 = new JLabel();
      this.int23 = new JTextField();
      this.jPanel7 = new JPanel();
      this.jScrollPane1 = new JScrollPane();
      this.jLabel26 = new JLabel();
      this.jLabel55 = new JLabel();
      this.jLabel56 = new JLabel();
      this.jLabel57 = new JLabel();
      this.csk1 = new JTextField();
      this.csk2 = new JTextField();
      this.csk3 = new JTextField();
      this.csk4 = new JTextField();
      this.csk5 = new JTextField();
      this.csk6 = new JTextField();
      this.csk7 = new JTextField();
      this.csv1 = new JTextField();
      this.csv2 = new JTextField();
      this.csv3 = new JTextField();
      this.csv4 = new JTextField();
      this.csv5 = new JTextField();
      this.csv6 = new JTextField();
      this.csv7 = new JTextField();
      this.currentViewLabel = new JLabel();
      this.jMenuBar1 = new JMenuBar();
      this.jMenu1 = new JMenu();
      this.reloadMenuBtn = new JMenuItem();
      this.saveMenuBtn = new JMenuItem();
      this.addModelMenuBtn = new JMenuItem();
      this.exportMenuBtn = new JMenuItem();
      this.exitMenuBtn = new JMenuItem();
      this.setDefaultCloseOperation(3);
      this.jLabel1.setText("Name");
      this.objectName.setText("" + this.defs.name);
      this.jLabel2.setText("Size X");
      this.sizeX.setText("" + this.defs.sizeX);
      this.sizeY.setText("" + this.defs.sizeY);
      this.jLabel3.setText("Size Y");
      this.membersOnly.setSelected(true);
      this.membersOnly.setText("Projectile Clipped");
      this.jLabel20.setText("Animation");
      this.equipSlot.setText("");
      this.jLabel21.setText("Equip Type");
      this.equipType.setText("");
      this.jLabel22.setText("ConfigFileID");
      this.stackIDs.setText("");
      this.jLabel23.setText("ConfigID");
      this.stackAmts.setText("");
      this.jLabel24.setText("Clip Type");
      this.stackable.setText("");
      this.jLabel58.setText("Switch Note Item ID");
      this.switchNote.setText("");
      this.jLabel59.setText("Noted Item ID");
      this.note.setText("");
      this.unnoted.setSelected(true);
      this.unnoted.setText("Unnoted");
      this.jLabel60.setText("Switch Lend Item ID");
      this.jLabel61.setText("Lent Item ID");
      this.switchLend.setText("");
      this.lend.setText("");
      GroupLayout jPanel1Layout = new GroupLayout(this.jPanel1);
      this.jPanel1.setLayout(jPanel1Layout);
      jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.unnoted).addComponent(this.membersOnly).addGroup(jPanel1Layout.createSequentialGroup().addComponent(this.jLabel20).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(this.equipSlot, -2, 100, -2)).addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addComponent(this.jLabel1).addGap(18, 18, 18).addComponent(this.objectName, -2, 100, -2)).addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel2).addComponent(this.jLabel3)).addGap(18, 18, 18).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.sizeY, -2, 100, -2).addComponent(this.sizeX, -2, 100, -2))).addGroup(jPanel1Layout.createSequentialGroup().addComponent(this.jLabel24).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.stackable, -2, 100, -2))).addGap(126, 126, 126).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.stackAmts, -2, 300, -2).addComponent(this.stackIDs, -2, 300, -2).addComponent(this.jLabel22).addComponent(this.jLabel23))).addGroup(jPanel1Layout.createSequentialGroup().addComponent(this.jLabel21).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.equipType, -2, 100, -2)).addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel58).addComponent(this.jLabel59)).addPreferredGap(ComponentPlacement.UNRELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING, false).addComponent(this.switchNote, -1, 100, 32767).addComponent(this.note)).addGap(18, 18, 18).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel60).addComponent(this.jLabel61)).addPreferredGap(ComponentPlacement.UNRELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING, false).addComponent(this.switchLend, -1, 100, 32767).addComponent(this.lend)))).addContainerGap(36, 32767)));
      jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel1).addComponent(this.objectName, -2, -1, -2).addComponent(this.jLabel22)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.sizeX, -2, -1, -2).addComponent(this.jLabel2)).addComponent(this.stackIDs, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.sizeY, -2, -1, -2).addComponent(this.jLabel3).addComponent(this.jLabel23)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.LEADING).addComponent(this.stackAmts, -2, -1, -2).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel24).addComponent(this.stackable, -2, -1, -2))).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.membersOnly).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel20).addComponent(this.equipSlot, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel21).addComponent(this.equipType, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel58).addComponent(this.switchNote, -2, -1, -2).addComponent(this.jLabel60).addComponent(this.switchLend, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel1Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel59).addComponent(this.note, -2, -1, -2).addComponent(this.jLabel61).addComponent(this.lend, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.unnoted).addContainerGap(13, 32767)));
      this.jTabbedPane1.addTab("General", this.jPanel1);
      this.jLabel4.setText("Inventory Model Zoom");
      this.invModelZoom.setText("");
      this.jLabel5.setText("Model Rotation 1");
      this.modelRot1.setText("");
      this.jLabel6.setText("Model Rotation 2");
      this.ModelRot2.setText("");
      this.jLabel7.setText("Model Offset 1");
      this.ModelOffset1.setText("");
      this.jLabel8.setText("Model Offset 2");
      this.modelOffset2.setText("");
      this.jLabel9.setText("Inventory Model");
      this.invModel.setText("");
      this.jLabel10.setText("Male Equip 1");
      this.maleEquip1.setText("");
      this.jLabel11.setText("Female Equip 1");
      this.femaleEquip1.setText("");
      this.jLabel12.setText("Male Equip 2");
      this.maleEquip2.setText("");
      this.jLabel13.setText("Female Equip 2");
      this.femaleEquip2.setText("");
      this.jLabel14.setText("Male Equip 3");
      this.maleEquip3.setText("");
      this.jLabel15.setText("Female Equip 3");
      this.femaleEquip3.setText("");
      GroupLayout jPanel2Layout = new GroupLayout(this.jPanel2);
      this.jPanel2.setLayout(jPanel2Layout);
      jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING, false).addGroup(jPanel2Layout.createSequentialGroup().addComponent(this.jLabel7).addPreferredGap(ComponentPlacement.RELATED, -1, 32767).addComponent(this.ModelOffset1, -2, 100, -2)).addGroup(jPanel2Layout.createSequentialGroup().addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel4).addComponent(this.jLabel5).addComponent(this.jLabel6)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.ModelRot2, -2, 100, -2).addComponent(this.modelRot1, -2, 100, -2).addComponent(this.invModelZoom, -2, 100, -2))).addGroup(Alignment.TRAILING, jPanel2Layout.createSequentialGroup().addComponent(this.jLabel8).addPreferredGap(ComponentPlacement.RELATED, -1, 32767).addComponent(this.modelOffset2, -2, 100, -2))).addGap(114, 114, 114).addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel2Layout.createSequentialGroup().addComponent(this.jLabel15).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(this.femaleEquip3, -2, 100, -2)).addGroup(jPanel2Layout.createSequentialGroup().addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel9).addComponent(this.jLabel10)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.maleEquip1, -2, 100, -2).addComponent(this.invModel, -2, 100, -2))).addGroup(jPanel2Layout.createSequentialGroup().addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel11).addComponent(this.jLabel12)).addPreferredGap(ComponentPlacement.UNRELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.maleEquip2, -2, 100, -2).addComponent(this.femaleEquip1, -2, 100, -2))).addGroup(jPanel2Layout.createParallelGroup(Alignment.TRAILING, false).addGroup(jPanel2Layout.createSequentialGroup().addComponent(this.jLabel14).addPreferredGap(ComponentPlacement.RELATED, -1, 32767).addComponent(this.maleEquip3, -2, 100, -2)).addGroup(jPanel2Layout.createSequentialGroup().addComponent(this.jLabel13).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(this.femaleEquip2, -2, 100, -2)))).addContainerGap(103, 32767)));
      jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel4).addComponent(this.invModelZoom, -2, -1, -2).addComponent(this.jLabel9).addComponent(this.invModel, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel5).addComponent(this.modelRot1, -2, -1, -2).addComponent(this.jLabel10).addComponent(this.maleEquip1, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel6).addComponent(this.ModelRot2, -2, -1, -2).addComponent(this.jLabel11).addComponent(this.femaleEquip1, -2, -1, -2)).addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel2Layout.createSequentialGroup().addGap(9, 9, 9).addGroup(jPanel2Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel7).addComponent(this.ModelOffset1, -2, -1, -2).addComponent(this.jLabel12)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.TRAILING).addComponent(this.jLabel8).addComponent(this.modelOffset2, -2, -1, -2).addGroup(Alignment.LEADING, jPanel2Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel13).addComponent(this.femaleEquip2, -2, -1, -2)))).addGroup(jPanel2Layout.createSequentialGroup().addPreferredGap(ComponentPlacement.RELATED).addComponent(this.maleEquip2, -2, -1, -2))).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.BASELINE).addComponent(this.jLabel14).addComponent(this.maleEquip3, -2, -1, -2)).addPreferredGap(ComponentPlacement.RELATED).addGroup(jPanel2Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel15).addComponent(this.femaleEquip3, -2, -1, -2)).addContainerGap(82, 32767)));
      this.jTabbedPane1.addTab("Model", this.jPanel2);
      this.jLabel16.setText("Inventory Options");
      this.invOptions.setText("riggg");
      this.jLabel17.setText("Ground Options");
      this.groundOptions.setText("44");
      this.jLabel18.setText("Model Colors");
      this.modelColors.setText("1");
      this.jLabel19.setText("Texture Colors");
      this.textureColors.setText("2");
      GroupLayout jPanel3Layout = new GroupLayout(this.jPanel3);
      this.jPanel3.setLayout(jPanel3Layout);
      jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addComponent(this.jLabel16).addComponent(this.invOptions, -2, 300, -2).addComponent(this.jLabel17).addComponent(this.groundOptions, -2, 300, -2).addComponent(this.jLabel18).addComponent(this.modelColors, -2, 300, -2).addComponent(this.jLabel19).addComponent(this.textureColors, -2, 300, -2)).addContainerGap(312, 32767)));
      jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(this.jLabel16).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.invOptions, -2, -1, -2).addGap(18, 18, 18).addComponent(this.jLabel17).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.groundOptions, -2, -1, -2).addGap(18, 18, 18).addComponent(this.jLabel18).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.modelColors, -2, -1, -2).addGap(18, 18, 18).addComponent(this.jLabel19).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.textureColors, -2, -1, -2).addContainerGap(47, 32767)));
      this.jTabbedPane1.addTab("Options", this.jPanel3);
      this.currentViewLabel.setText("Currently Viewing Definitions of Object: " + this.defs.id + " - " + defs.name);
      this.jMenu1.setText("File");
      this.reloadMenuBtn.setText("Reload");
      this.reloadMenuBtn.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
            ObjectEditor.this.reloadMenuBtnActionPerformed(evt);
         }
      });
      this.jMenu1.add(this.reloadMenuBtn);
      this.saveMenuBtn.setText("Save");
      this.saveMenuBtn.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
            ObjectEditor.this.saveMenuBtnActionPerformed(evt);
         }
      });
      this.jMenu1.add(this.saveMenuBtn);
      this.exitMenuBtn.setText("Exit");
      this.exitMenuBtn.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
            ObjectEditor.this.exitMenuBtnActionPerformed(evt);
         }
      });
      this.jMenu1.add(this.exitMenuBtn);
      this.jMenuBar1.add(this.jMenu1);
      this.setJMenuBar(this.jMenuBar1);
      GroupLayout layout = new GroupLayout(this.getContentPane());
      this.getContentPane().setLayout(layout);
      layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(this.jTabbedPane1).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(this.currentViewLabel).addContainerGap(-1, 32767)));
      layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 11, 32767).addComponent(this.currentViewLabel).addPreferredGap(ComponentPlacement.RELATED).addComponent(this.jTabbedPane1, -2, 300, -2)));
      this.pack();
   }
   
   private void save() {
      try {
         this.defs.setName(this.objectName.getText().toString());
	  } catch (Exception var201) {
         Main.log("ObjectEditor", "Cannot save. Please check for mistypes.");
      }
   }
   
   private void saveMenuBtnActionPerformed(ActionEvent evt) {
      this.save();
   }
   
   private void reloadMenuBtnActionPerformed(ActionEvent evt) {
      this.objectName.setText(this.defs.getName());
      this.sizeX.setText("" + this.defs.sizeX);
   }
   
   private void exitMenuBtnActionPerformed(ActionEvent evt) {
      this.dispose();
   }
 }
