Advertisement
Guest User

LICK (Commented)

a guest
Jun 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 65.46 KB | None | 0 0
  1. package com.vernon.LICK;
  2.  
  3. import java.awt.AWTException;
  4. import java.awt.BorderLayout;
  5. import java.awt.Color;
  6. import java.awt.GridBagConstraints;
  7. import java.awt.GridBagLayout;
  8. import java.awt.Robot;
  9. import java.awt.datatransfer.Clipboard;
  10. import java.awt.datatransfer.StringSelection;
  11. import java.awt.event.ActionEvent;
  12. import java.awt.event.ActionListener;
  13. import java.awt.event.FocusEvent;
  14. import java.awt.event.FocusListener;
  15. import java.awt.event.KeyEvent;
  16. import java.awt.event.KeyListener;
  17. import java.io.File;
  18. import java.io.IOException;
  19. import java.io.PrintWriter;
  20.  
  21. import javax.swing.AbstractAction;
  22. import javax.swing.BorderFactory;
  23. //import javax.swing.ImageIcon;
  24. import javax.swing.JButton;
  25. import javax.swing.JFileChooser;
  26. import javax.swing.JFrame;
  27. import javax.swing.JPanel;
  28. import javax.swing.JScrollPane;
  29. import javax.swing.JTextArea;
  30. import javax.swing.SwingUtilities;
  31. import javax.swing.border.Border;
  32. import javax.swing.border.CompoundBorder;
  33. import javax.swing.border.TitledBorder;
  34. import javax.swing.filechooser.FileNameExtensionFilter;
  35.  
  36. @SuppressWarnings("serial")
  37. public class LoreItemInterface
  38.   extends JPanel
  39.   implements ActionListener, FocusListener, KeyListener
  40. {
  41.    
  42.     /*
  43.      * This defines the start of what defines the areas. It creates the text spaces.
  44.      */
  45.   JTextArea current = null;
  46.   final int maxfinal = 50;
  47.   int max = 50;
  48.   int maxDescriptionLineOne = 50;
  49.   int maxDescriptionLineTwo = 50;
  50.   int maxDescriptionLineThree = 50;
  51.   int maxDescriptionLineFour = 50;
  52.   int maxDescriptionLineFive = 50;
  53.   int maxTitle = 50;
  54.   JTextArea LoreTitle = new JTextArea(1, 50);
  55.   JTextArea LoreDescriptionLineOne = new JTextArea(1, 50);
  56.   JTextArea LoreDescriptionLineTwo = new JTextArea(1, 50);
  57.   JTextArea LoreDescriptionLineThree = new JTextArea(1, 50);
  58.   JTextArea LoreDescriptionLineFour = new JTextArea(1, 50);
  59.   JTextArea LoreDescriptionLineFive = new JTextArea(1, 50);
  60.  
  61.  
  62.   /*
  63.    * This sucker RUNS the thing
  64.    */
  65.   public static void main(String[] args)
  66.   {
  67.     new LoreItemInterface();
  68.   }
  69.  
  70.   public static void main1(String[] args)
  71.     throws Exception
  72.   {
  73.     SwingUtilities.invokeLater(new Runnable()
  74.     {
  75.       public void run() {}
  76.     });
  77.   }
  78.  
  79.  
  80.   /*
  81.    * This bad puppy defines all the pretty graphics. She's ugly as sin, isn't she?
  82.    */
  83.   public LoreItemInterface()
  84.   {
  85.     JFrame frame = new JFrame("Lore Item Interface");
  86.     frame.setDefaultCloseOperation(3);
  87.     GridBagLayout gridbag = new GridBagLayout();
  88.     GridBagConstraints c = new GridBagConstraints();
  89.     c.fill = 1;
  90.    
  91.     /*
  92.      * Normally this defines the icon, but I can't get it working in this new version! ¯\_(ツ)_/¯
  93.      */
  94. //    ImageIcon img = new ImageIcon(getClass().getResource("/icon.png"));
  95. //    frame.setIconImage(img.getImage());
  96.    
  97.     /*
  98.      * This creates the panel.
  99.      */
  100.     JPanel panOuter = new JPanel(new BorderLayout());
  101.     JPanel panInner = new JPanel(new BorderLayout());
  102.     JPanel panBottom = new JPanel();
  103.     panBottom.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
  104.     panBottom.setLayout(gridbag);
  105.     JPanel panInput = new JPanel(new BorderLayout());
  106.     panInput.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
  107.     JPanel panelTitle = new JPanel(new BorderLayout());
  108.     JPanel panelDescriptionBorder = new JPanel(new BorderLayout());
  109.     panelDescriptionBorder.setLayout(gridbag);
  110.     JPanel panelDescriptionLines = new JPanel(new BorderLayout());
  111.     panelDescriptionLines.setLayout(gridbag);
  112.    
  113.     /*
  114.      * Borders here! Get ya borders!
  115.      * This one is for the Lore Item Title line.
  116.      */
  117.     Border outsideBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  118.     TitledBorder insideBorder = BorderFactory.createTitledBorder("Lore Item Title");
  119.     CompoundBorder theTitle = BorderFactory.createCompoundBorder(outsideBorder, insideBorder);
  120.     panelTitle.setBorder(theTitle);
  121.    
  122.     /*
  123.      * This one here is for the Item Description lines, around all of them. We'll give them their own
  124.      * special one soon.
  125.      */
  126.     Border outsideBorder1 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  127.     TitledBorder insideBorder1 = BorderFactory.createTitledBorder("Lore Item Description");
  128.     CompoundBorder theDescriptionBorder = BorderFactory.createCompoundBorder(outsideBorder1, insideBorder1);
  129.     panelDescriptionBorder.setBorder(theDescriptionBorder);
  130.     /*
  131.      * This border is just for the buttons.
  132.      */
  133.     Border outsideBorder2 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  134.     TitledBorder insideBorder2 = BorderFactory.createTitledBorder("Buttons");
  135.     CompoundBorder theButtons = BorderFactory.createCompoundBorder(outsideBorder2, insideBorder2);
  136.     panBottom.setBorder(theButtons);
  137.    
  138.     /*
  139.      * Let's put these fuckers in line eh?
  140.      */
  141.     panInput.add(panBottom, "North");
  142.     panOuter.add(panInput, "West");
  143.     panInner.add(panelDescriptionBorder, "South");
  144.     panInner.add(panelTitle, "North");
  145.     panOuter.add(panInner, "East");
  146.    
  147.     /*
  148.      * Wow look, MORE FUCKING BORDERS! These are for the Item Descriptions specifically.
  149.      * Check the second line of each one to see which one it's assigned to.
  150.      */
  151.     Border outsideBorder3 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  152.     TitledBorder insideBorder3 = BorderFactory.createTitledBorder("Lore Item Description Line 1");
  153.     CompoundBorder theDescriptionLineOne = BorderFactory.createCompoundBorder(outsideBorder3, insideBorder3);
  154.     this.LoreDescriptionLineOne.setBorder(theDescriptionLineOne);
  155.    
  156.     Border outsideBorder4 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  157.     TitledBorder insideBorder4 = BorderFactory.createTitledBorder("Lore Item Description Line 2");
  158.     CompoundBorder theDescriptionLineTwo = BorderFactory.createCompoundBorder(outsideBorder4, insideBorder4);
  159.     this.LoreDescriptionLineTwo.setBorder(theDescriptionLineTwo);
  160.    
  161.     Border outsideBorder5 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  162.     TitledBorder insideBorder5 = BorderFactory.createTitledBorder("Lore Item Description Line 3");
  163.     CompoundBorder theDescriptionLineThree = BorderFactory.createCompoundBorder(outsideBorder5, insideBorder5);
  164.     this.LoreDescriptionLineThree.setBorder(theDescriptionLineThree);
  165.    
  166.     Border outsideBorder6 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  167.     TitledBorder insideBorder6 = BorderFactory.createTitledBorder("Lore Item Description Line 4");
  168.     CompoundBorder theDescriptionLineFour = BorderFactory.createCompoundBorder(outsideBorder6, insideBorder6);
  169.     this.LoreDescriptionLineFour.setBorder(theDescriptionLineFour);
  170.    
  171.     Border outsideBorder7 = BorderFactory.createEmptyBorder(5, 5, 5, 5);
  172.     TitledBorder insideBorder7 = BorderFactory.createTitledBorder("Lore Item Description Line 5");
  173.     CompoundBorder theDescriptionLineFive = BorderFactory.createCompoundBorder(outsideBorder7, insideBorder7);
  174.     this.LoreDescriptionLineFive.setBorder(theDescriptionLineFive);
  175.    
  176.    
  177.     /*
  178.      * Now let's apply some word wrapping and line wrapping huh?
  179.      */
  180.     this.LoreTitle.setLineWrap(true);
  181.     this.LoreDescriptionLineOne.setWrapStyleWord(true);
  182.     this.LoreDescriptionLineTwo.setWrapStyleWord(true);
  183.     this.LoreDescriptionLineThree.setWrapStyleWord(true);
  184.     this.LoreDescriptionLineFour.setWrapStyleWord(true);
  185.     this.LoreDescriptionLineFive.setWrapStyleWord(true);
  186.    
  187.     /*
  188.      * This checks where and if the program is in terms of lines!
  189.      */
  190.     FocusListener focusListener = new FocusListener()
  191.     {
  192.       public void focusLost(FocusEvent e) {}
  193.      
  194.       public void focusGained(FocusEvent e)
  195.       {
  196.         LoreItemInterface.this.requestFocusInWindow();
  197.         LoreItemInterface.this.current = ((JTextArea)e.getSource());
  198.         LoreItemInterface.this.current.addKeyListener(new KeyListener()
  199.         {
  200.           public void keyPressed(KeyEvent e1)
  201.           {
  202.             String currenttext = LoreItemInterface.this.current.getText();
  203.            
  204.             /*
  205.              * This entire block of code determines where things are. The code then goes on to
  206.              * add +2 to the character max length (50 characters) every time a certain button on
  207.              * the program is hit (which are to the left of the GUI), or whenever the symbol followed
  208.              * by a one of the special formatting codes is typed manually.
  209.              */
  210.             char c = e1.getKeyChar();
  211.             char symbol = '&';
  212.             String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  213.             String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  214.             String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  215.             String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  216.             String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  217.             String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  218.             //String cstring = Character.toString(c);
  219.             int len = currenttext.length();
  220.             if (currenttext.equalsIgnoreCase(LoreDTextOne))
  221.             {
  222.               if (len < LoreItemInterface.this.maxDescriptionLineOne)
  223.               {
  224.                 if (symbol == c)
  225.                 {
  226.                   LoreItemInterface.this.maxDescriptionLineOne += 2;
  227.                   return;
  228.                 }
  229.                 if (c == '\b')
  230.                 {
  231.                   String tester = LoreItemInterface.this.current.getText();
  232.                   LoreItemInterface.this.maxDescriptionLineOne = 50;
  233.                   for (int i = 0; i < tester.length(); i++) {
  234.                     if (symbol == tester.charAt(i))
  235.                     {
  236.                       LoreItemInterface.this.maxDescriptionLineOne += 2;
  237.                       return;
  238.                     }
  239.                   }
  240.                 }
  241.               }
  242.               else
  243.               {
  244.                 if ((c == '\b') ||
  245.                   (c == '') ||
  246.                   (c == '\n') ||
  247.                   (c == '\t') ||
  248.                   (e1.isActionKey())) {
  249.                   return;
  250.                 }
  251.                 if (symbol == c)
  252.                 {
  253.                   LoreItemInterface.this.maxDescriptionLineOne += 2;
  254.                   return;
  255.                 }
  256.                 enforceLimit();
  257.                 e1.consume();
  258.                
  259.                 return;
  260.               }
  261.               if (e1.getKeyCode() == 9)
  262.               {
  263.                 if (e1.getModifiers() > 0) {
  264.                   LoreItemInterface.this.LoreDescriptionLineOne.transferFocusBackward();
  265.                 } else {
  266.                   LoreItemInterface.this.LoreDescriptionLineOne.transferFocus();
  267.                 }
  268.                 e1.consume();
  269.               }
  270.             }
  271.             else if (currenttext.equalsIgnoreCase(LoreDTextTwo))
  272.             {
  273.               if (len < LoreItemInterface.this.maxDescriptionLineTwo)
  274.               {
  275.                 if (symbol == c)
  276.                 {
  277.                   LoreItemInterface.this.maxDescriptionLineTwo += 2;
  278.                   return;
  279.                 }
  280.                 if (c == '\b')
  281.                 {
  282.                   String tester = LoreItemInterface.this.current.getText();
  283.                   LoreItemInterface.this.maxDescriptionLineTwo = 50;
  284.                   for (int i = 0; i < tester.length(); i++) {
  285.                     if (symbol == tester.charAt(i))
  286.                     {
  287.                       LoreItemInterface.this.maxDescriptionLineTwo += 2;
  288.                       return;
  289.                     }
  290.                   }
  291.                 }
  292.               }
  293.               else
  294.               {
  295.                 if ((c == '\b') ||
  296.                   (c == '') ||
  297.                   (c == '\n') ||
  298.                   (c == '\t') ||
  299.                   (e1.isActionKey())) {
  300.                   return;
  301.                 }
  302.                 if (symbol == c)
  303.                 {
  304.                   LoreItemInterface.this.maxDescriptionLineTwo += 2;
  305.                   return;
  306.                 }
  307.                 enforceLimit();
  308.                 e1.consume();
  309.                
  310.                 return;
  311.               }
  312.               if (e1.getKeyCode() == 9)
  313.               {
  314.                 if (e1.getModifiers() > 0) {
  315.                   LoreItemInterface.this.LoreDescriptionLineTwo.transferFocusBackward();
  316.                 } else {
  317.                   LoreItemInterface.this.LoreDescriptionLineTwo.transferFocus();
  318.                 }
  319.                 e1.consume();
  320.               }
  321.             }
  322.             else if (currenttext.equalsIgnoreCase(LoreDTextThree))
  323.             {
  324.               if (len < LoreItemInterface.this.maxDescriptionLineThree)
  325.               {
  326.                 if (symbol == c)
  327.                 {
  328.                   LoreItemInterface.this.maxDescriptionLineThree += 2;
  329.                   return;
  330.                 }
  331.                 if (c == '\b')
  332.                 {
  333.                   String tester = LoreItemInterface.this.current.getText();
  334.                   LoreItemInterface.this.maxDescriptionLineThree = 50;
  335.                   for (int i = 0; i < tester.length(); i++) {
  336.                     if (symbol == tester.charAt(i))
  337.                     {
  338.                       LoreItemInterface.this.maxDescriptionLineThree += 2;
  339.                       return;
  340.                     }
  341.                   }
  342.                 }
  343.               }
  344.               else
  345.               {
  346.                 if ((c == '\b') ||
  347.                   (c == '') ||
  348.                   (c == '\n') ||
  349.                   (c == '\t') ||
  350.                   (e1.isActionKey())) {
  351.                   return;
  352.                 }
  353.                 if (symbol == c)
  354.                 {
  355.                   LoreItemInterface.this.maxDescriptionLineThree += 2;
  356.                   return;
  357.                 }
  358.                 enforceLimit();
  359.                 e1.consume();
  360.                
  361.                 return;
  362.               }
  363.               if (e1.getKeyCode() == 9)
  364.               {
  365.                 if (e1.getModifiers() > 0) {
  366.                   LoreItemInterface.this.LoreDescriptionLineThree.transferFocusBackward();
  367.                 } else {
  368.                   LoreItemInterface.this.LoreDescriptionLineThree.transferFocus();
  369.                 }
  370.                 e1.consume();
  371.               }
  372.             }
  373.             else if (currenttext.equalsIgnoreCase(LoreDTextFour))
  374.             {
  375.               if (len < LoreItemInterface.this.maxDescriptionLineFour)
  376.               {
  377.                 if (symbol == c)
  378.                 {
  379.                   LoreItemInterface.this.maxDescriptionLineFour += 2;
  380.                   return;
  381.                 }
  382.                 if (c == '\b')
  383.                 {
  384.                   String tester = LoreItemInterface.this.current.getText();
  385.                   LoreItemInterface.this.maxDescriptionLineFour = 50;
  386.                   for (int i = 0; i < tester.length(); i++) {
  387.                     if (symbol == tester.charAt(i))
  388.                     {
  389.                       LoreItemInterface.this.maxDescriptionLineFour += 2;
  390.                       return;
  391.                     }
  392.                   }
  393.                 }
  394.               }
  395.               else
  396.               {
  397.                 if ((c == '\b') ||
  398.                   (c == '') ||
  399.                   (c == '\n') ||
  400.                   (c == '\t') ||
  401.                   (e1.isActionKey())) {
  402.                   return;
  403.                 }
  404.                 if (symbol == c)
  405.                 {
  406.                   LoreItemInterface.this.maxDescriptionLineFour += 2;
  407.                   return;
  408.                 }
  409.                 enforceLimit();
  410.                 e1.consume();
  411.                
  412.                 return;
  413.               }
  414.               if (e1.getKeyCode() == 9)
  415.               {
  416.                 if (e1.getModifiers() > 0) {
  417.                   LoreItemInterface.this.LoreDescriptionLineFour.transferFocusBackward();
  418.                 } else {
  419.                   LoreItemInterface.this.LoreDescriptionLineFour.transferFocus();
  420.                 }
  421.                 e1.consume();
  422.               }
  423.             }
  424.             else if (currenttext.equalsIgnoreCase(LoreDTextFive))
  425.             {
  426.               if (len < LoreItemInterface.this.maxDescriptionLineFive)
  427.               {
  428.                 if (symbol == c)
  429.                 {
  430.                   LoreItemInterface.this.maxDescriptionLineFive += 2;
  431.                   return;
  432.                 }
  433.                 if (c == '\b')
  434.                 {
  435.                   String tester = LoreItemInterface.this.current.getText();
  436.                   LoreItemInterface.this.maxDescriptionLineFive = 50;
  437.                   for (int i = 0; i < tester.length(); i++) {
  438.                     if (symbol == tester.charAt(i))
  439.                     {
  440.                       LoreItemInterface.this.maxDescriptionLineFive += 2;
  441.                       return;
  442.                     }
  443.                   }
  444.                 }
  445.               }
  446.               else
  447.               {
  448.                 if ((c == '\b') ||
  449.                   (c == '') ||
  450.                   (c == '\n') ||
  451.                   (c == '\t') ||
  452.                   (e1.isActionKey())) {
  453.                   return;
  454.                 }
  455.                 if (symbol == c)
  456.                 {
  457.                   LoreItemInterface.this.maxDescriptionLineFive += 2;
  458.                   return;
  459.                 }
  460.                 enforceLimit();
  461.                 e1.consume();
  462.                
  463.                 return;
  464.               }
  465.               if (e1.getKeyCode() == 9)
  466.               {
  467.                 if (e1.getModifiers() > 0) {
  468.                   LoreItemInterface.this.LoreDescriptionLineFive.transferFocusBackward();
  469.                 } else {
  470.                   LoreItemInterface.this.LoreDescriptionLineFive.transferFocus();
  471.                 }
  472.                 e1.consume();
  473.               }
  474.             }
  475.             else if (currenttext.equalsIgnoreCase(LoreTText))
  476.             {
  477.               if (len < LoreItemInterface.this.maxTitle)
  478.               {
  479.                 if (symbol == c)
  480.                 {
  481.                   LoreItemInterface.this.maxTitle += 2;
  482.                   return;
  483.                 }
  484.                 if (c == '\b')
  485.                 {
  486.                   String tester = LoreItemInterface.this.current.getText();
  487.                   LoreItemInterface.this.maxTitle = 50;
  488.                   for (int i = 0; i < tester.length(); i++) {
  489.                     if (symbol == tester.charAt(i))
  490.                     {
  491.                       LoreItemInterface.this.maxTitle += 2;
  492.                       return;
  493.                     }
  494.                   }
  495.                 }
  496.               }
  497.               else
  498.               {
  499.                 if ((c == '\b') ||
  500.                   (c == '') ||
  501.                   (c == '\n') ||
  502.                   (c == '\t') ||
  503.                   (e1.isActionKey())) {
  504.                   return;
  505.                 }
  506.                 if (symbol == c)
  507.                 {
  508.                   LoreItemInterface.this.maxTitle += 2;
  509.                   return;
  510.                 }
  511.                 enforceLimit();
  512.                 e1.consume();
  513.                
  514.                 return;
  515.               }
  516.               if (e1.getKeyCode() == 9)
  517.               {
  518.                 if (e1.getModifiers() > 0) {
  519.                   LoreItemInterface.this.LoreTitle.transferFocusBackward();
  520.                 } else {
  521.                   LoreItemInterface.this.LoreTitle.transferFocus();
  522.                 }
  523.                 e1.consume();
  524.               }
  525.             }
  526.           }
  527.          
  528.           private void enforceLimit()
  529.           {
  530.             try
  531.             {
  532.               LoreItemInterface.this.current.setCaretPosition(LoreItemInterface.this.current.getText().length());
  533.              
  534.               Robot r = new Robot();
  535.               int bsp = 8;
  536.               r.keyPress(bsp);
  537.               r.keyRelease(bsp);
  538.             }
  539.             catch (AWTException ex)
  540.             {
  541.               ex.printStackTrace(System.err);
  542.             }
  543.           }
  544.          
  545.           public void keyTyped(KeyEvent e1) {}
  546.          
  547.           public void keyReleased(KeyEvent e1) {}
  548.         });
  549.       }
  550.     };
  551.    
  552.     /*
  553.      * And this adds in all the focus listeners so all that previous code /works/!
  554.      */
  555.     this.LoreTitle.addFocusListener(focusListener);
  556.     this.LoreDescriptionLineOne.addFocusListener(focusListener);
  557.     this.LoreDescriptionLineTwo.addFocusListener(focusListener);
  558.     this.LoreDescriptionLineThree.addFocusListener(focusListener);
  559.     this.LoreDescriptionLineFour.addFocusListener(focusListener);
  560.     this.LoreDescriptionLineFive.addFocusListener(focusListener);
  561.     /*String LoreDTextOne = this.LoreDescriptionLineOne.getText();
  562.     String LoreDTextTwo = this.LoreDescriptionLineTwo.getText();
  563.     String LoreDTextThree = this.LoreDescriptionLineThree.getText();
  564.     String LoreDTextFour = this.LoreDescriptionLineFour.getText();
  565.     String LoreDTextFive = this.LoreDescriptionLineFive.getText();
  566.     String LoreTText = this.LoreTitle.getText();*/
  567.    
  568.    
  569.     /*
  570.      * This activates the code for the comment before last, and calls which
  571.      * code is connected to what color and what button. It's also defining the button.
  572.      * It also adds the button to the GUI!
  573.      */
  574.     JButton gold = new JButton(new AbstractAction("Gold")
  575.     {
  576.       public void actionPerformed(ActionEvent e)
  577.       {
  578.         String Color = "&6";
  579.         String currenttext = LoreItemInterface.this.current.getText();
  580.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  581.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  582.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  583.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  584.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  585.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  586.         if (LoreItemInterface.this.current != null) {
  587.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  588.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  589.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  590.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  591.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  592.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  593.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  594.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  595.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  596.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  597.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  598.             LoreItemInterface.this.maxTitle += 2;
  599.           }
  600.         }
  601.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  602.       }
  603.     });
  604.     c.fill = 2;
  605.     c.gridx = 1;
  606.     c.gridy = 2;
  607.     panBottom.add(gold, c);
  608.     gold.setForeground(new Color(215, 175, 0));
  609.    
  610.     JButton darkblue = new JButton(new AbstractAction("Dark Blue")
  611.     {
  612.       public void actionPerformed(ActionEvent e)
  613.       {
  614.         String Color = "&1";
  615.         String currenttext = LoreItemInterface.this.current.getText();
  616.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  617.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  618.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  619.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  620.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  621.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  622.         if (LoreItemInterface.this.current != null) {
  623.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  624.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  625.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  626.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  627.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  628.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  629.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  630.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  631.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  632.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  633.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  634.             LoreItemInterface.this.maxTitle += 2;
  635.           }
  636.         }
  637.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  638.       }
  639.     });
  640.     c.fill = 2;
  641.     c.gridx = 0;
  642.     c.gridy = 0;
  643.     panBottom.add(darkblue, c);
  644.     darkblue.setForeground(new Color(0, 0, 150));
  645.    
  646.     JButton darkgreen = new JButton(new AbstractAction("Dark Green")
  647.     {
  648.       public void actionPerformed(ActionEvent e)
  649.       {
  650.         String Color = "&2";
  651.         String currenttext = LoreItemInterface.this.current.getText();
  652.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  653.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  654.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  655.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  656.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  657.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  658.         if (LoreItemInterface.this.current != null) {
  659.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  660.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  661.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  662.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  663.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  664.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  665.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  666.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  667.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  668.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  669.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  670.             LoreItemInterface.this.maxTitle += 2;
  671.           }
  672.         }
  673.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  674.       }
  675.     });
  676.     c.fill = 2;
  677.     c.gridx = 1;
  678.     c.gridy = 0;
  679.     panBottom.add(darkgreen, c);
  680.     darkgreen.setForeground(new Color(0, 150, 0));
  681.     JButton darkaqua = new JButton(new AbstractAction("Dark Aqua")
  682.     {
  683.       public void actionPerformed(ActionEvent e)
  684.       {
  685.         String Color = "&3";
  686.         String currenttext = LoreItemInterface.this.current.getText();
  687.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  688.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  689.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  690.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  691.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  692.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  693.         if (LoreItemInterface.this.current != null) {
  694.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  695.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  696.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  697.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  698.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  699.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  700.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  701.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  702.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  703.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  704.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  705.             LoreItemInterface.this.maxTitle += 2;
  706.           }
  707.         }
  708.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  709.       }
  710.     });
  711.     c.fill = 2;
  712.     c.gridx = 0;
  713.     c.gridy = 1;
  714.     panBottom.add(darkaqua, c);
  715.     darkaqua.setForeground(new Color(0, 150, 150));
  716.    
  717.     JButton darkred = new JButton(new AbstractAction("Dark Red")
  718.     {
  719.       public void actionPerformed(ActionEvent e)
  720.       {
  721.         String Color = "&4";
  722.         String currenttext = LoreItemInterface.this.current.getText();
  723.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  724.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  725.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  726.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  727.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  728.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  729.         if (LoreItemInterface.this.current != null) {
  730.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  731.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  732.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  733.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  734.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  735.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  736.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  737.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  738.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  739.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  740.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  741.             LoreItemInterface.this.maxTitle += 2;
  742.           }
  743.         }
  744.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  745.       }
  746.     });
  747.     c.fill = 2;
  748.     c.gridx = 1;
  749.     c.gridy = 1;
  750.     panBottom.add(darkred, c);
  751.     darkred.setForeground(new Color(150, 0, 0));
  752.    
  753.     JButton darkpurple = new JButton(new AbstractAction("Dark Purple")
  754.     {
  755.       public void actionPerformed(ActionEvent e)
  756.       {
  757.         String Color = "&5";
  758.         String currenttext = LoreItemInterface.this.current.getText();
  759.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  760.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  761.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  762.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  763.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  764.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  765.         if (LoreItemInterface.this.current != null) {
  766.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  767.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  768.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  769.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  770.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  771.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  772.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  773.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  774.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  775.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  776.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  777.             LoreItemInterface.this.maxTitle += 2;
  778.           }
  779.         }
  780.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  781.       }
  782.     });
  783.     c.fill = 2;
  784.     c.gridx = 0;
  785.     c.gridy = 2;
  786.     panBottom.add(darkpurple, c);
  787.     darkpurple.setForeground(new Color(128, 0, 128));
  788.    
  789.     JButton gray = new JButton(new AbstractAction("Gray")
  790.     {
  791.       public void actionPerformed(ActionEvent e)
  792.       {
  793.         String Color = "&7";
  794.         String currenttext = LoreItemInterface.this.current.getText();
  795.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  796.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  797.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  798.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  799.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  800.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  801.         if (LoreItemInterface.this.current != null) {
  802.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  803.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  804.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  805.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  806.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  807.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  808.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  809.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  810.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  811.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  812.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  813.             LoreItemInterface.this.maxTitle += 2;
  814.           }
  815.         }
  816.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  817.       }
  818.     });
  819.     c.fill = 2;
  820.     c.gridx = 0;
  821.     c.gridy = 3;
  822.     panBottom.add(gray, c);
  823.     gray.setForeground(Color.GRAY);
  824.    
  825.     JButton darkgray = new JButton(new AbstractAction("Dark Gray")
  826.     {
  827.       public void actionPerformed(ActionEvent e)
  828.       {
  829.         String Color = "&8";
  830.         String currenttext = LoreItemInterface.this.current.getText();
  831.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  832.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  833.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  834.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  835.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  836.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  837.         if (LoreItemInterface.this.current != null) {
  838.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  839.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  840.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  841.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  842.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  843.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  844.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  845.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  846.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  847.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  848.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  849.             LoreItemInterface.this.maxTitle += 2;
  850.           }
  851.         }
  852.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  853.       }
  854.     });
  855.     c.fill = 2;
  856.     c.gridx = 1;
  857.     c.gridy = 3;
  858.     panBottom.add(darkgray, c);
  859.     darkgray.setForeground(Color.DARK_GRAY);
  860.    
  861.     JButton blue = new JButton(new AbstractAction("Blue")
  862.     {
  863.       public void actionPerformed(ActionEvent e)
  864.       {
  865.         String Color = "&9";
  866.         String currenttext = LoreItemInterface.this.current.getText();
  867.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  868.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  869.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  870.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  871.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  872.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  873.         if (LoreItemInterface.this.current != null) {
  874.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  875.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  876.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  877.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  878.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  879.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  880.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  881.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  882.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  883.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  884.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  885.             LoreItemInterface.this.maxTitle += 2;
  886.           }
  887.         }
  888.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  889.       }
  890.     });
  891.     c.fill = 2;
  892.     c.gridx = 0;
  893.     c.gridy = 4;
  894.     panBottom.add(blue, c);
  895.     blue.setForeground(Color.blue);
  896.    
  897.     JButton black = new JButton(new AbstractAction("Black")
  898.     {
  899.       public void actionPerformed(ActionEvent e)
  900.       {
  901.         String Color = "&0";
  902.         String currenttext = LoreItemInterface.this.current.getText();
  903.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  904.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  905.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  906.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  907.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  908.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  909.         if (LoreItemInterface.this.current != null) {
  910.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  911.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  912.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  913.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  914.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  915.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  916.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  917.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  918.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  919.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  920.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  921.             LoreItemInterface.this.maxTitle += 2;
  922.           }
  923.         }
  924.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  925.       }
  926.     });
  927.     c.fill = 2;
  928.     c.gridx = 1;
  929.     c.gridy = 4;
  930.     panBottom.add(black, c);
  931.    
  932.     JButton green = new JButton(new AbstractAction("Green")
  933.     {
  934.       public void actionPerformed(ActionEvent e)
  935.       {
  936.         String Color = "&a";
  937.         String currenttext = LoreItemInterface.this.current.getText();
  938.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  939.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  940.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  941.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  942.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  943.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  944.         if (LoreItemInterface.this.current != null) {
  945.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  946.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  947.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  948.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  949.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  950.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  951.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  952.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  953.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  954.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  955.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  956.             LoreItemInterface.this.maxTitle += 2;
  957.           }
  958.         }
  959.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  960.       }
  961.     });
  962.     c.fill = 2;
  963.     c.gridx = 0;
  964.     c.gridy = 5;
  965.     panBottom.add(green, c);
  966.     green.setForeground(new Color(0, 200, 0));
  967.    
  968.     JButton aqua = new JButton(new AbstractAction("Aqua")
  969.     {
  970.       public void actionPerformed(ActionEvent e)
  971.       {
  972.         String Color = "&b";
  973.         String currenttext = LoreItemInterface.this.current.getText();
  974.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  975.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  976.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  977.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  978.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  979.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  980.         if (LoreItemInterface.this.current != null) {
  981.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  982.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  983.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  984.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  985.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  986.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  987.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  988.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  989.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  990.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  991.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  992.             LoreItemInterface.this.maxTitle += 2;
  993.           }
  994.         }
  995.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  996.       }
  997.     });
  998.     c.fill = 2;
  999.     c.gridx = 1;
  1000.     c.gridy = 5;
  1001.     panBottom.add(aqua, c);
  1002.     aqua.setForeground(new Color(0, 200, 200));
  1003.    
  1004.     JButton red = new JButton(new AbstractAction("Red")
  1005.     {
  1006.       public void actionPerformed(ActionEvent e)
  1007.       {
  1008.         String Color = "&c";
  1009.         String currenttext = LoreItemInterface.this.current.getText();
  1010.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1011.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1012.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1013.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1014.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1015.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1016.         if (LoreItemInterface.this.current != null) {
  1017.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1018.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1019.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1020.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1021.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1022.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1023.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1024.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1025.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1026.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1027.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1028.             LoreItemInterface.this.maxTitle += 2;
  1029.           }
  1030.         }
  1031.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1032.       }
  1033.     });
  1034.     c.fill = 2;
  1035.     c.gridx = 0;
  1036.     c.gridy = 6;
  1037.     panBottom.add(red, c);
  1038.     red.setForeground(Color.red);
  1039.    
  1040.     JButton lightpurple = new JButton(new AbstractAction("Light Purple")
  1041.     {
  1042.       public void actionPerformed(ActionEvent e)
  1043.       {
  1044.         String Color = "&d";
  1045.         String currenttext = LoreItemInterface.this.current.getText();
  1046.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1047.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1048.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1049.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1050.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1051.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1052.         if (LoreItemInterface.this.current != null) {
  1053.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1054.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1055.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1056.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1057.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1058.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1059.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1060.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1061.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1062.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1063.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1064.             LoreItemInterface.this.maxTitle += 2;
  1065.           }
  1066.         }
  1067.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1068.       }
  1069.     });
  1070.     c.fill = 2;
  1071.     c.gridx = 1;
  1072.     c.gridy = 6;
  1073.     panBottom.add(lightpurple, c);
  1074.     lightpurple.setForeground(new Color(255, 0, 255));
  1075.    
  1076.     JButton yellow = new JButton(new AbstractAction("Yellow")
  1077.     {
  1078.       public void actionPerformed(ActionEvent e)
  1079.       {
  1080.         String Color = "&e";
  1081.         String currenttext = LoreItemInterface.this.current.getText();
  1082.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1083.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1084.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1085.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1086.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1087.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1088.         if (LoreItemInterface.this.current != null) {
  1089.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1090.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1091.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1092.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1093.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1094.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1095.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1096.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1097.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1098.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1099.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1100.             LoreItemInterface.this.maxTitle += 2;
  1101.           }
  1102.         }
  1103.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1104.       }
  1105.     });
  1106.     c.fill = 2;
  1107.     c.gridx = 0;
  1108.     c.gridy = 7;
  1109.     panBottom.add(yellow, c);
  1110.     yellow.setForeground(new Color(225, 225, 0));
  1111.    
  1112.     JButton white = new JButton(new AbstractAction("White")
  1113.     {
  1114.       public void actionPerformed(ActionEvent e)
  1115.       {
  1116.         String Color = "&f";
  1117.         String currenttext = LoreItemInterface.this.current.getText();
  1118.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1119.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1120.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1121.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1122.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1123.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1124.         if (LoreItemInterface.this.current != null) {
  1125.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1126.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1127.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1128.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1129.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1130.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1131.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1132.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1133.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1134.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1135.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1136.             LoreItemInterface.this.maxTitle += 2;
  1137.           }
  1138.         }
  1139.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1140.       }
  1141.     });
  1142.     c.fill = 2;
  1143.     c.gridx = 1;
  1144.     c.gridy = 7;
  1145.     panBottom.add(white, c);
  1146.     white.setForeground(Color.white);
  1147.    
  1148.     JButton corrupted = new JButton(new AbstractAction("Corruption")
  1149.     {
  1150.       public void actionPerformed(ActionEvent e)
  1151.       {
  1152.         String Color = "&k";
  1153.         String currenttext = LoreItemInterface.this.current.getText();
  1154.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1155.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1156.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1157.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1158.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1159.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1160.         if (LoreItemInterface.this.current != null) {
  1161.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1162.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1163.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1164.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1165.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1166.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1167.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1168.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1169.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1170.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1171.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1172.             LoreItemInterface.this.maxTitle += 2;
  1173.           }
  1174.         }
  1175.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1176.       }
  1177.     });
  1178.     c.fill = 2;
  1179.     c.gridx = 0;
  1180.     c.gridy = 8;
  1181.     panBottom.add(corrupted, c);
  1182.    
  1183.     JButton bold = new JButton(new AbstractAction("Bold")
  1184.     {
  1185.       public void actionPerformed(ActionEvent e)
  1186.       {
  1187.         String Color = "&l";
  1188.         String currenttext = LoreItemInterface.this.current.getText();
  1189.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1190.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1191.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1192.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1193.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1194.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1195.         if (LoreItemInterface.this.current != null) {
  1196.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1197.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1198.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1199.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1200.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1201.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1202.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1203.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1204.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1205.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1206.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1207.             LoreItemInterface.this.maxTitle += 2;
  1208.           }
  1209.         }
  1210.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1211.       }
  1212.     });
  1213.     c.fill = 2;
  1214.     c.gridx = 1;
  1215.     c.gridy = 8;
  1216.     panBottom.add(bold, c);
  1217.    
  1218.     JButton underline = new JButton(new AbstractAction("Underline")
  1219.     {
  1220.       public void actionPerformed(ActionEvent e)
  1221.       {
  1222.         String Color = "&n";
  1223.         String currenttext = LoreItemInterface.this.current.getText();
  1224.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1225.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1226.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1227.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1228.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1229.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1230.         if (LoreItemInterface.this.current != null) {
  1231.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1232.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1233.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1234.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1235.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1236.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1237.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1238.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1239.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1240.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1241.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1242.             LoreItemInterface.this.maxTitle += 2;
  1243.           }
  1244.         }
  1245.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1246.       }
  1247.     });
  1248.     c.fill = 2;
  1249.     c.gridx = 0;
  1250.     c.gridy = 9;
  1251.     panBottom.add(underline, c);
  1252.    
  1253.     JButton italic = new JButton(new AbstractAction("Italic")
  1254.     {
  1255.       public void actionPerformed(ActionEvent e)
  1256.       {
  1257.         String Color = "&o";
  1258.         String currenttext = LoreItemInterface.this.current.getText();
  1259.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1260.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1261.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1262.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1263.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1264.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1265.         if (LoreItemInterface.this.current != null) {
  1266.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1267.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1268.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1269.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1270.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1271.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1272.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1273.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1274.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1275.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1276.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1277.             LoreItemInterface.this.maxTitle += 2;
  1278.           }
  1279.         }
  1280.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1281.       }
  1282.     });
  1283.     c.fill = 2;
  1284.     c.gridx = 1;
  1285.     c.gridy = 9;
  1286.     panBottom.add(italic, c);
  1287.    
  1288.     JButton strikethrough = new JButton(new AbstractAction("Strikethrough")
  1289.     {
  1290.       public void actionPerformed(ActionEvent e)
  1291.       {
  1292.         String Color = "&m";
  1293.         String currenttext = LoreItemInterface.this.current.getText();
  1294.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1295.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1296.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1297.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1298.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1299.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1300.         if (LoreItemInterface.this.current != null) {
  1301.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1302.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1303.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1304.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1305.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1306.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1307.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1308.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1309.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1310.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1311.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1312.             LoreItemInterface.this.maxTitle += 2;
  1313.           }
  1314.         }
  1315.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1316.       }
  1317.     });
  1318.     c.fill = 2;
  1319.     c.gridx = 0;
  1320.     c.gridy = 10;
  1321.     panBottom.add(strikethrough, c);
  1322.    
  1323.     JButton reset = new JButton(new AbstractAction("Reset")
  1324.     {
  1325.       public void actionPerformed(ActionEvent e)
  1326.       {
  1327.         String Color = "&r";
  1328.         String currenttext = LoreItemInterface.this.current.getText();
  1329.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1330.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1331.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1332.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1333.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1334.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1335.         if (LoreItemInterface.this.current != null) {
  1336.           if (currenttext.equalsIgnoreCase(LoreDTextOne)) {
  1337.             LoreItemInterface.this.maxDescriptionLineOne += 2;
  1338.           } else if (currenttext.equalsIgnoreCase(LoreDTextTwo)) {
  1339.             LoreItemInterface.this.maxDescriptionLineTwo += 2;
  1340.           } else if (currenttext.equalsIgnoreCase(LoreDTextThree)) {
  1341.             LoreItemInterface.this.maxDescriptionLineThree += 2;
  1342.           } else if (currenttext.equalsIgnoreCase(LoreDTextFour)) {
  1343.             LoreItemInterface.this.maxDescriptionLineFour += 2;
  1344.           } else if (currenttext.equalsIgnoreCase(LoreDTextFive)) {
  1345.             LoreItemInterface.this.maxDescriptionLineFive += 2;
  1346.           } else if (currenttext.equalsIgnoreCase(LoreTText)) {
  1347.             LoreItemInterface.this.maxTitle += 2;
  1348.           }
  1349.         }
  1350.         LoreItemInterface.this.current.insert(Color, LoreItemInterface.this.current.getCaretPosition());
  1351.       }
  1352.     });
  1353.     c.fill = 2;
  1354.     c.gridx = 1;
  1355.     c.gridy = 10;
  1356.     panBottom.add(reset, c);
  1357.    
  1358.     JButton copyDescription = new JButton(new AbstractAction("Copy Active Line to Clipboard.")
  1359.     {
  1360.       public void actionPerformed(ActionEvent e)
  1361.       {
  1362.         StringSelection selection = new StringSelection(LoreItemInterface.this.current.getText());
  1363.         Clipboard clipboard = LoreItemInterface.this.getToolkit().getSystemClipboard();
  1364.         clipboard.setContents(selection, selection);
  1365.       }
  1366.     });
  1367.     c.fill = 2;
  1368.     c.gridx = 0;
  1369.     c.gridy = 11;
  1370.     panBottom.add(copyDescription, c);
  1371.    
  1372.     JButton copyDescription2 = new JButton(new AbstractAction("Save work to send to a GM.")
  1373.     {
  1374.       public void actionPerformed(ActionEvent e)
  1375.       {
  1376.         String LoreDTextOne = LoreItemInterface.this.LoreDescriptionLineOne.getText();
  1377.         String LoreDTextTwo = LoreItemInterface.this.LoreDescriptionLineTwo.getText();
  1378.         String LoreDTextThree = LoreItemInterface.this.LoreDescriptionLineThree.getText();
  1379.         String LoreDTextFour = LoreItemInterface.this.LoreDescriptionLineFour.getText();
  1380.         String LoreDTextFive = LoreItemInterface.this.LoreDescriptionLineFive.getText();
  1381.         String LoreTText = LoreItemInterface.this.LoreTitle.getText();
  1382.         JFileChooser jf = new JFileChooser();
  1383.         FileNameExtensionFilter filter = new FileNameExtensionFilter(".txt", new String[] { "txt" });
  1384.         jf.addChoosableFileFilter(filter);
  1385.         String content = LoreTText + "\n" + "\n" + LoreDTextOne + "\n" + "\n" + LoreDTextTwo + "\n" + "\n" + LoreDTextThree + "\n" + "\n" + LoreDTextFour + "\n" + "\n" + LoreDTextFive;
  1386.         jf.setFileFilter(filter);
  1387.         int returnVal = jf.showSaveDialog(LoreItemInterface.this);
  1388.         if (returnVal == 0) {
  1389.           try
  1390.           {
  1391.             File file = jf.getSelectedFile();
  1392.             String filePath = file.getPath();
  1393.             if (!filePath.toLowerCase().endsWith(".txt"))
  1394.             {
  1395.               file = new File(filePath + ".txt");
  1396.               PrintWriter os = new PrintWriter(file);
  1397.               os.println(content);
  1398.               os.flush();
  1399.               os.close();
  1400.             }
  1401.             else
  1402.             {
  1403.               PrintWriter os = new PrintWriter(file);
  1404.               os.println(content);
  1405.               os.flush();
  1406.               os.close();
  1407.             }
  1408.           }
  1409.           catch (IOException e1)
  1410.           {
  1411.             e1.printStackTrace();
  1412.           }
  1413.         }
  1414.       }
  1415.     });
  1416.     c.fill = 2;
  1417.     c.gridx = 1;
  1418.     c.gridy = 11;
  1419.     panBottom.add(copyDescription2, c);
  1420.    
  1421.     /*
  1422.      * Now to activate the scroll panes for the description. This prevents it from just going off to
  1423.      * the left and right, and instead makes it wrap within its boundries and have a scroll bar if
  1424.      * needed.
  1425.      */
  1426.     JScrollPane srcPane = new JScrollPane(this.LoreDescriptionLineOne,
  1427.       20,
  1428.       30);
  1429.     c.fill = 2;
  1430.     c.gridx = 0;
  1431.     c.gridy = 0;
  1432.     panelDescriptionBorder.add(srcPane, c);
  1433.    
  1434.     JScrollPane srcPane2 = new JScrollPane(this.LoreDescriptionLineTwo,
  1435.       20,
  1436.       30);
  1437.     c.fill = 2;
  1438.     c.gridx = 0;
  1439.     c.gridy = 1;
  1440.     panelDescriptionBorder.add(srcPane2, c);
  1441.    
  1442.     JScrollPane srcPane3 = new JScrollPane(this.LoreDescriptionLineThree,
  1443.       20,
  1444.       30);
  1445.     c.fill = 2;
  1446.     c.gridx = 0;
  1447.     c.gridy = 2;
  1448.     panelDescriptionBorder.add(srcPane3, c);
  1449.    
  1450.     JScrollPane srcPane4 = new JScrollPane(this.LoreDescriptionLineFour,
  1451.       20,
  1452.       30);
  1453.     c.fill = 2;
  1454.     c.gridx = 0;
  1455.     c.gridy = 3;
  1456.     panelDescriptionBorder.add(srcPane4, c);
  1457.    
  1458.     JScrollPane srcPane5 = new JScrollPane(this.LoreDescriptionLineFive,
  1459.       20,
  1460.       30);
  1461.     c.fill = 2;
  1462.     c.gridx = 0;
  1463.     c.gridy = 4;
  1464.     panelDescriptionBorder.add(srcPane5, c);
  1465.    
  1466.     JScrollPane srcPane1 = new JScrollPane(this.LoreTitle,
  1467.       20,
  1468.       30);
  1469.    
  1470.     c.fill = 3;
  1471.     panelTitle.add(srcPane1, "North");
  1472.     c.fill = 3;
  1473.    
  1474.     frame.setContentPane(panOuter);
  1475.     frame.pack();
  1476.     frame.setVisible(true);
  1477.   }
  1478.  
  1479.  
  1480.   /*
  1481.    * I'll be honest. I don't fucking know.
  1482.    */
  1483.   public void actionPerformed(ActionEvent e) {}
  1484.  
  1485.   public void focusGained(FocusEvent arg0) {}
  1486.  
  1487.   public void focusLost(FocusEvent arg0) {}
  1488.  
  1489.   public void keyPressed(KeyEvent e) {}
  1490.  
  1491.   public void keyReleased(KeyEvent e) {}
  1492.  
  1493.   public void keyTyped(KeyEvent e) {}
  1494. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement