Package rra.swingGUI

Source Code of rra.swingGUI.SThread

package rra.swingGUI;

import java.awt.BorderLayout;
import java.awt.ComponentOrientation;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

import rra.reader.RRAMediator;
import rra.reader.RRAswgFileReader;
import rra.reader.RRAswgMediator;

public class RRAswgMainScreen extends JFrame {
  private static final long serialVersionUID = 1L;
 
  private RRAswgMediator mediator=null;
  private RRAswgFileReader reader=null;
  private JFrame getFrame() {
    return this;
  }
  private RRAswgMediator getMediator() {
    return this.mediator;
  }
 
  private JPanel jContentPane = null;
  private JMenuBar jJMenuBar = null;
  private JMenu jMenu = null;
  private JMenuItem jMenuItem = null;
  private JMenuItem jMenuItem1 = null;
  private JLabel StatusLabel = null;
  private JScrollPane jScrollPane = null;
  private JList cList = null;
  private JSplitPane SplitPane = null;
  private JTabbedPane CombatTabs = null;
  private JPanel jPanel = null;
  private JPanel jPanel1 = null;
  private JPanel jPanel2 = null;
  private JPanel jPanel3 = null;
  private JScrollPane jScrollPane1 = null;
  private JTable dpso = null;
  private JPanel dpsoPanel = null;
  private JScrollPane jScrollPane2 = null;
  private JPanel hpsPanel = null;
  private JTable hps = null;
  private JScrollPane jScrollPane3 = null;
  private JPanel dpstPanel = null;
  private JTable dpst = null;
  private JSplitPane jSplitPane = null;
  private JScrollPane jScrollPane4 = null;
  private JList cParticipants = null;
  private JTabbedPane jTabbedPane = null;
  private JScrollPane jScrollPane5 = null;
  private JScrollPane jScrollPane6 = null;
  private JTable dpsStats = null;
  private JTable dpsTargets = null;
  private JScrollPane jScrollPane7 = null;
  private JTable dtpsStats = null;
  private JScrollPane jScrollPane8 = null;
  private JTable dtpsTargets = null;
  private JSplitPane jSplitPane1 = null;
  private JScrollPane jScrollPane9 = null;
  private JTable hps1Abilities = null;
  private JScrollPane jScrollPane10 = null;
  private JTable hps2Abilities = null;
  private JScrollPane jScrollPane11 = null;
  private JTable hps2Targets = null;
  private JScrollPane jScrollPane12 = null;
  private JTable interrupts = null;
  private JScrollPane jScrollPane13 = null;
  private JTable deaths = null;
  private Properties p=null//  @jve:decl-index=0:

  private JMenu jMenu1 = null;

  private JMenuItem jMenuItem2 = null;

  private JPanel jPanel4 = null;

  private JPanel jPanel5 = null;

  private JLabel jLabel = null;

  private JTextField combatName = null;

  private JLabel jLabel1 = null;

  private JTextField combatStart = null;

  private JLabel jLabel2 = null;

  private JTextField combatEnd = null;

  private JLabel jLabel3 = null;

  private JTextField combatDuration = null;

  private JPanel jPanel6 = null;

  private JTabbedPane jTabbedPane1 = null;

  private JScrollPane jScrollPane14 = null;

  private JTable allDPSO = null;

  private JScrollPane jScrollPane15 = null;

  private JTable allHPS = null;

  private JScrollPane jScrollPane16 = null;

  private JTable allDPST = null;

  private JMenu jMenu2 = null;

  private JMenuItem jMenuItem3 = null;

  private JMenuItem jMenuItem4 = null;

  private JScrollPane jScrollPane17 = null;

  private JTable dtpsTypes = null;

  /**
   * This is the default constructor
   */
  public RRAswgMainScreen() {
    super();
    initialize();
    readProps();
    this.mediator=new RRAswgMediator(this.StatusLabel,this.cList,this.dpso,this.dpsoPanel,this.hps,this.hpsPanel,
        this.dpst,this.dpstPanel,this.cParticipants,this.dpsStats,this.dpsTargets,this.dtpsStats,
        this.dtpsTargets,this.hps1Abilities,this.hps2Targets,this.hps2Abilities,this.interrupts,
        this.deaths,this.combatName,this.combatStart,this.combatEnd,this.combatDuration,
        this.allDPSO,this.allHPS,this.allDPST,this.dtpsTypes);
  }


  /**
   * This method initializes this
   *
   * @return void
   */
  private void initialize() {
    this.setSize(1000, 800);
    this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/rra/swingGUI/rra1.png")));
    this.setComponentOrientation(ComponentOrientation.UNKNOWN);
    this.setJMenuBar(getJJMenuBar());
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setContentPane(getJContentPane());
    this.setTitle("RIFT Raid Analysis");
    this.setLocationRelativeTo(getRootPane());
  }
 
  private void readProps() {
    if(p==null) p=new Properties();
    try {
      FileInputStream fis=new FileInputStream("./rra.ini");
      p.load(fis);
      fis.close();
    } catch (Exception e) {
      e.printStackTrace();
      p.setProperty(RRAswgSettings.Settings_CloseFileAfterRead, "false");
      p.setProperty(RRAswgSettings.Settings_PruneHealingTrail, "true");
      p.setProperty(RRAswgSettings.Settings_RememberFolder, "true");
      p.setProperty(RRAswgSettings.Settings_DisposeSmallCombats, "true");
      p.setProperty(RRAswgSettings.Settings_DisposeSmallCombatTicks, "5");
      p.setProperty(RRAswgSettings.Settings_CurrentFolder, "");
      writeProps();
      return;
    }
  }
  private void writeProps() {
    if(p==null) {
      p=new Properties();
      p.setProperty(RRAswgSettings.Settings_CloseFileAfterRead, "false");
      p.setProperty(RRAswgSettings.Settings_PruneHealingTrail, "true");
      p.setProperty(RRAswgSettings.Settings_RememberFolder, "true");
      p.setProperty(RRAswgSettings.Settings_DisposeSmallCombats, "true");
      p.setProperty(RRAswgSettings.Settings_DisposeSmallCombatTicks, "5");
      p.setProperty(RRAswgSettings.Settings_CurrentFolder, "");
    }
    try {
      FileOutputStream fos=new FileOutputStream("./rra.ini");
      p.store(fos, "bz");
      fos.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  private Properties getProperties() {
    return this.p;
  }

  /**
   * This method initializes jContentPane
   *
   * @return javax.swing.JPanel
   */
  private JPanel getJContentPane() {
    if (jContentPane == null) {
      StatusLabel = new JLabel();
      StatusLabel.setText("Idle");
      StatusLabel.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
      StatusLabel.setHorizontalTextPosition(SwingConstants.RIGHT);
      StatusLabel.setHorizontalAlignment(SwingConstants.RIGHT);
      StatusLabel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
      jContentPane = new JPanel();
      jContentPane.setLayout(new BorderLayout());
      jContentPane.add(getJTabbedPane1(), BorderLayout.CENTER);
    }
    return jContentPane;
  }

  /**
   * This method initializes jJMenuBar 
   *  
   * @return javax.swing.JMenuBar 
   */
  private JMenuBar getJJMenuBar() {
    if (jJMenuBar == null) {
      jJMenuBar = new JMenuBar();
      jJMenuBar.add(getJMenu());
      jJMenuBar.add(getJMenu1());
      jJMenuBar.add(getJMenu2());
    }
    return jJMenuBar;
  }

  /**
   * This method initializes jMenu 
   *  
   * @return javax.swing.JMenu 
   */
  private JMenu getJMenu() {
    if (jMenu == null) {
      jMenu = new JMenu();
      jMenu.setText("Files");
      jMenu.add(getJMenuItem());
      jMenu.add(getJMenuItem1());
    }
    return jMenu;
  }

  /**
   * This method initializes jMenuItem 
   *  
   * @return javax.swing.JMenuItem 
   */
  private JMenuItem getJMenuItem() {
    if (jMenuItem == null) {
      jMenuItem = new JMenuItem();
      jMenuItem.setText("Open combat log");
      jMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          JFileChooser jfc=new JFileChooser();
          Boolean bx=new Boolean(getProperties().getProperty(RRAswgSettings.Settings_RememberFolder));
          if(bx.booleanValue() && getProperties().getProperty(RRAswgSettings.Settings_CurrentFolder)!=null)
            jfc.setCurrentDirectory(new File(getProperties().getProperty(RRAswgSettings.Settings_CurrentFolder)));
          int rv=jfc.showOpenDialog(getFrame());
          if(rv==JFileChooser.APPROVE_OPTION) {
            getProperties().setProperty(RRAswgSettings.Settings_CurrentFolder, jfc.getCurrentDirectory().getAbsolutePath());
            writeProps();
            class SThread extends Thread {
              private JFileChooser jfc=null;
              public SThread(JFileChooser jfc) {
                this.jfc=jfc;
              }
              @Override
              public void run() {
                File file = jfc.getSelectedFile();
                try {
                  if(reader!=null) reader.tryToStopIt();
                  reader=new RRAswgFileReader(file,getMediator());
                  Boolean b0=new Boolean(getProperties().getProperty(RRAswgSettings.Settings_PruneHealingTrail));
                  Boolean b1=new Boolean(getProperties().getProperty(RRAswgSettings.Settings_CloseFileAfterRead));
                  Boolean b2=new Boolean(getProperties().getProperty(RRAswgSettings.Settings_DisposeSmallCombats));
                  Integer i1=new Integer(0);
                  if(getProperties().getProperty(RRAswgSettings.Settings_DisposeSmallCombatTicks)!=null)
                    i1=new Integer(getProperties().getProperty(RRAswgSettings.Settings_DisposeSmallCombatTicks));
                  reader.run(b1.booleanValue(),b2.booleanValue(),i1.intValue(),b0.booleanValue());
                } catch (Exception e1) {
                  e1.printStackTrace();
                  JOptionPane.showMessageDialog(getFrame(), "Critical error in reading selected file:"+e1.getMessage());
                }
                super.run();
              }
            };
            SThread t=new SThread(jfc);           
            t.start();
          }
        }
      });
    }
    return jMenuItem;
  }

  /**
   * This method initializes jMenuItem1 
   *  
   * @return javax.swing.JMenuItem 
   */
  private JMenuItem getJMenuItem1() {
    if (jMenuItem1 == null) {
      jMenuItem1 = new JMenuItem();
      jMenuItem1.setText("Exit");
      jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          getFrame().dispose();
        }
      });
    }
    return jMenuItem1;
  }
  /**
   * This method initializes jScrollPane 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane() {
    if (jScrollPane == null) {
      jScrollPane = new JScrollPane();
      jScrollPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
      jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
      jScrollPane.setPreferredSize(new Dimension(200, 0));
      jScrollPane.setViewportView(getJList());
      jScrollPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
    }
    return jScrollPane;
  }
  /**
   * This method initializes jList 
   *  
   * @return javax.swing.JList 
   */
  private JList getJList() {
    if (cList == null) {
      cList = new JList(new DefaultListModel());
      cList.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
      cList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      cList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent e) {
          if (e.getValueIsAdjusting()) return;
          if(cList.getSelectedValue()!=null) {
            List<String> l=new ArrayList<String>();
            l.add((String)cList.getSelectedValue());
            getMediator().processEvent(RRAMediator.EventCombatChanged, l);
          } else
            getMediator().processEvent(RRAMediator.EventCombatDeselected, null);
        }
      });
    }
    return cList;
  }
  /**
   * This method initializes SplitPane 
   *  
   * @return javax.swing.JSplitPane 
   */
  private JSplitPane getSplitPane() {
    if (SplitPane == null) {
      SplitPane = new JSplitPane();
      SplitPane.setLeftComponent(getJScrollPane());
      SplitPane.setRightComponent(getCombatTabs());
    }
    return SplitPane;
  }
  /**
   * This method initializes CombatTabs 
   *  
   * @return javax.swing.JTabbedPane 
   */
  private JTabbedPane getCombatTabs() {
    if (CombatTabs == null) {
      CombatTabs = new JTabbedPane();
      CombatTabs.addTab("General", null, getJPanel4(), null);
      CombatTabs.addTab("DPS Overview", null, getJPanel(), "");
      CombatTabs.addTab("HPS Overview", null, getJPanel1(), "");
      CombatTabs.addTab("DTPS Overview", null, getJPanel2(), null);
      CombatTabs.addTab("Individual stats", null, getJPanel3(), null);
    }
    return CombatTabs;
  }
  /**
   * This method initializes jPanel 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel() {
    if (jPanel == null) {
      jPanel = new JPanel();
      jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.Y_AXIS));
      jPanel.add(getJScrollPane1(), null);
      jPanel.add(getDpsoPanel(), null);
    }
    return jPanel;
  }
  /**
   * This method initializes jPanel1 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel1() {
    if (jPanel1 == null) {
      jPanel1 = new JPanel();
      jPanel1.setLayout(new BoxLayout(getJPanel1(), BoxLayout.Y_AXIS));
      jPanel1.add(getJScrollPane2(), null);
      jPanel1.add(getHpsPanel(), null);
    }
    return jPanel1;
  }
  /**
   * This method initializes jPanel2 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel2() {
    if (jPanel2 == null) {
      jPanel2 = new JPanel();
      jPanel2.setLayout(new BoxLayout(getJPanel2(), BoxLayout.Y_AXIS));
      jPanel2.add(getJScrollPane3(), null);
      jPanel2.add(getDpstPanel(), null);
    }
    return jPanel2;
  }
  /**
   * This method initializes jPanel3 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel3() {
    if (jPanel3 == null) {
      jPanel3 = new JPanel();
      jPanel3.setLayout(new BoxLayout(getJPanel3(), BoxLayout.Y_AXIS));
      jPanel3.add(getJSplitPane(), null);
    }
    return jPanel3;
  }
  /**
   * This method initializes jScrollPane1 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane1() {
    if (jScrollPane1 == null) {
      jScrollPane1 = new JScrollPane();
      jScrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
      jScrollPane1.setViewportView(getDpso());
    }
    return jScrollPane1;
  }
  /**
   * This method initializes dpso 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDpso() {
    if (dpso == null) {
      dpso = new JTable();
    }
    return dpso;
  }
  /**
   * This method initializes dpsoPanel 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getDpsoPanel() {
    if (dpsoPanel == null) {
      dpsoPanel = new JPanel();
      dpsoPanel.setLayout(new BorderLayout());
      dpsoPanel.setPreferredSize(new Dimension(0, 350));
    }
    return dpsoPanel;
  }
  /**
   * This method initializes jScrollPane2 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane2() {
    if (jScrollPane2 == null) {
      jScrollPane2 = new JScrollPane();
      jScrollPane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
      jScrollPane2.setViewportView(getHps());
    }
    return jScrollPane2;
  }
  /**
   * This method initializes hpsPanel 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getHpsPanel() {
    if (hpsPanel == null) {
      hpsPanel = new JPanel();
      hpsPanel.setLayout(new BorderLayout());
      hpsPanel.setPreferredSize(new Dimension(0, 350));
    }
    return hpsPanel;
  }
  /**
   * This method initializes hps 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getHps() {
    if (hps == null) {
      hps = new JTable();
    }
    return hps;
  }
  /**
   * This method initializes jScrollPane3 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane3() {
    if (jScrollPane3 == null) {
      jScrollPane3 = new JScrollPane();
      jScrollPane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
      jScrollPane3.setViewportView(getDpst());
    }
    return jScrollPane3;
  }
  /**
   * This method initializes dpstPanel 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getDpstPanel() {
    if (dpstPanel == null) {
      dpstPanel = new JPanel();
      dpstPanel.setLayout(new BorderLayout());
      dpstPanel.setPreferredSize(new Dimension(0, 350));
    }
    return dpstPanel;
  }
  /**
   * This method initializes dpst 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDpst() {
    if (dpst == null) {
      dpst = new JTable();
    }
    return dpst;
  }
  /**
   * This method initializes jSplitPane 
   *  
   * @return javax.swing.JSplitPane 
   */
  private JSplitPane getJSplitPane() {
    if (jSplitPane == null) {
      jSplitPane = new JSplitPane();
      jSplitPane.setDividerLocation(150);
      jSplitPane.setDividerSize(2);
      jSplitPane.setRightComponent(getJTabbedPane());
      jSplitPane.setLeftComponent(getJScrollPane4());
    }
    return jSplitPane;
  }
  /**
   * This method initializes jScrollPane4 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane4() {
    if (jScrollPane4 == null) {
      jScrollPane4 = new JScrollPane();
      jScrollPane4.setPreferredSize(new Dimension(3, 150));
      jScrollPane4.setViewportView(getJList2());
      jScrollPane4.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    }
    return jScrollPane4;
  }
  /**
   * This method initializes jList 
   *  
   * @return javax.swing.JList 
   */
  private JList getJList2() {
    if (cParticipants == null) {
      cParticipants = new JList();
      cParticipants.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      cParticipants.setModel(new DefaultListModel());
      cParticipants.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent e) {
              if (e.getValueIsAdjusting()) return;
              List<String> l=new ArrayList<String>();
              l.add((String)cList.getSelectedValue());
              l.add((String)cParticipants.getSelectedValue());
              getMediator().processEvent(RRAMediator.EventCombatParticipantChanged, l);
            }
          });
    }
    return cParticipants;
  }
  /**
   * This method initializes jTabbedPane 
   *  
   * @return javax.swing.JTabbedPane 
   */
  private JTabbedPane getJTabbedPane() {
    if (jTabbedPane == null) {
      jTabbedPane = new JTabbedPane();
      jTabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
      jTabbedPane.addTab("DPS abilities", null, getJScrollPane5(), null);
      jTabbedPane.addTab("DPS targets", null, getJScrollPane6(), null);
      jTabbedPane.addTab("DTPS abilities", null, getJScrollPane7(), null);
      jTabbedPane.addTab("DTPS sources", null, getJScrollPane8(), null);
      jTabbedPane.addTab("HPS abilities", null, getJScrollPane9(), null);
      jTabbedPane.addTab("HPS targets", null, getJSplitPane1(), null);
      jTabbedPane.addTab("Interrupts", null, getJScrollPane12(), null);
      jTabbedPane.addTab("Deaths", null, getJScrollPane13(), null);
      jTabbedPane.addTab("DTPS types", null, getJScrollPane17(), null);
    }
    return jTabbedPane;
  }
  /**
   * This method initializes jScrollPane5 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane5() {
    if (jScrollPane5 == null) {
      jScrollPane5 = new JScrollPane();
      jScrollPane5.setViewportView(getDpsStats());
    }
    return jScrollPane5;
  }
  /**
   * This method initializes jScrollPane6 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane6() {
    if (jScrollPane6 == null) {
      jScrollPane6 = new JScrollPane();
      jScrollPane6.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      jScrollPane6.setViewportView(getDpsTargets());
    }
    return jScrollPane6;
  }
  /**
   * This method initializes dpsStats 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDpsStats() {
    if (dpsStats == null) {
      dpsStats = new JTable();
      dpsStats.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
    return dpsStats;
  }
  /**
   * This method initializes dpsTargets 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDpsTargets() {
    if (dpsTargets == null) {
      dpsTargets = new JTable();
      dpsTargets.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
    return dpsTargets;
  }
  /**
   * This method initializes jScrollPane7 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane7() {
    if (jScrollPane7 == null) {
      jScrollPane7 = new JScrollPane();
      jScrollPane7.setViewportView(getDtpsStats());
    }
    return jScrollPane7;
  }
  /**
   * This method initializes dtpsStats 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDtpsStats() {
    if (dtpsStats == null) {
      dtpsStats = new JTable();
      dtpsStats.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
    return dtpsStats;
  }
  /**
   * This method initializes jScrollPane8 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane8() {
    if (jScrollPane8 == null) {
      jScrollPane8 = new JScrollPane();
      jScrollPane8.setViewportView(getDtpsTargets());
    }
    return jScrollPane8;
  }
  /**
   * This method initializes dtpsTargets 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDtpsTargets() {
    if (dtpsTargets == null) {
      dtpsTargets = new JTable();
      dtpsTargets.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
    return dtpsTargets;
  }
  /**
   * This method initializes jSplitPane1 
   *  
   * @return javax.swing.JSplitPane 
   */
  private JSplitPane getJSplitPane1() {
    if (jSplitPane1 == null) {
      jSplitPane1 = new JSplitPane();
      jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);
      jSplitPane1.setDividerSize(2);
      jSplitPane1.setBottomComponent(getJScrollPane10());
      jSplitPane1.setTopComponent(getJScrollPane11());
      jSplitPane1.setDividerLocation(300);
    }
    return jSplitPane1;
  }
  /**
   * This method initializes jScrollPane9 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane9() {
    if (jScrollPane9 == null) {
      jScrollPane9 = new JScrollPane();
      jScrollPane9.setViewportView(getHps1Abilities());
    }
    return jScrollPane9;
  }
  /**
   * This method initializes hps1Abilities 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getHps1Abilities() {
    if (hps1Abilities == null) {
      hps1Abilities = new JTable();
    }
    return hps1Abilities;
  }
  /**
   * This method initializes jScrollPane10 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane10() {
    if (jScrollPane10 == null) {
      jScrollPane10 = new JScrollPane();
      jScrollPane10.setViewportView(getHps2Abilities());
    }
    return jScrollPane10;
  }
  /**
   * This method initializes hps2Abilities 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getHps2Abilities() {
    if (hps2Abilities == null) {
      hps2Abilities = new JTable();
    }
    return hps2Abilities;
  }
  /**
   * This method initializes jScrollPane11 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane11() {
    if (jScrollPane11 == null) {
      jScrollPane11 = new JScrollPane();
      jScrollPane11.setViewportView(getHps2Targets());
    }
    return jScrollPane11;
  }
  /**
   * This method initializes hps2Targets 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getHps2Targets() {
    if (hps2Targets == null) {
      hps2Targets = new JTable();
      hps2Targets.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
          if (e.getValueIsAdjusting()) return;
          ListSelectionModel rowSM = (ListSelectionModel)e.getSource();
          int selectedIndex = rowSM.getMinSelectionIndex();

          if(selectedIndex>=0) {
            List<String> l=new ArrayList<String>();
            l.add((String)cList.getSelectedValue());
            l.add((String)cParticipants.getSelectedValue());
            l.add((String)hps2Targets.getModel().getValueAt(selectedIndex, 0));
            getMediator().processEvent(RRAMediator.EventHealingTargetChanged, l);
          }
        }
      });
    }
    return hps2Targets;
  }
  /**
   * This method initializes jScrollPane12 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane12() {
    if (jScrollPane12 == null) {
      jScrollPane12 = new JScrollPane();
      jScrollPane12.setViewportView(getInterrupts());
    }
    return jScrollPane12;
  }
  /**
   * This method initializes interrupts 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getInterrupts() {
    if (interrupts == null) {
      interrupts = new JTable();
    }
    return interrupts;
  }
  /**
   * This method initializes jScrollPane13 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane13() {
    if (jScrollPane13 == null) {
      jScrollPane13 = new JScrollPane();
      jScrollPane13.setViewportView(getDeaths());
    }
    return jScrollPane13;
  }
  /**
   * This method initializes deaths 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDeaths() {
    if (deaths == null) {
      deaths = new JTable();
    }
    return deaths;
  }
  /**
   * This method initializes jMenu1 
   *  
   * @return javax.swing.JMenu 
   */
  private JMenu getJMenu1() {
    if (jMenu1 == null) {
      jMenu1 = new JMenu();
      jMenu1.setText("Options");
      jMenu1.add(getJMenuItem2());
    }
    return jMenu1;
  }
  /**
   * This method initializes jMenuItem2 
   *  
   * @return javax.swing.JMenuItem 
   */
  private JMenuItem getJMenuItem2() {
    if (jMenuItem2 == null) {
      jMenuItem2 = new JMenuItem();
      jMenuItem2.setText("Settings");
      jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          if(RRAswgSettings.openDialog(getFrame(), p)) {
            writeProps();
          }
        }
      });
    }
    return jMenuItem2;
  }
  /**
   * This method initializes jPanel4 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel4() {
    if (jPanel4 == null) {
      BorderLayout borderLayout = new BorderLayout();
      borderLayout.setHgap(20);
      borderLayout.setVgap(20);
      jPanel4 = new JPanel();
      jPanel4.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
      jPanel4.setLayout(borderLayout);
      jPanel4.add(getJPanel5(), BorderLayout.NORTH);
    }
    return jPanel4;
  }
  /**
   * This method initializes jPanel5 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel5() {
    if (jPanel5 == null) {
      jLabel3 = new JLabel();
      jLabel3.setText("Duration in seconds");
      jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
      jPanel5 = new JPanel(new GridLayout(4,2,5,5));
      jLabel = new JLabel();
      jLabel.setText("Combat name");
      jLabel.setHorizontalAlignment(SwingConstants.RIGHT);
      jLabel1 = new JLabel();
      jLabel1.setText("Start time");
      jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
      jLabel2 = new JLabel();
      jLabel2.setText("End time");
      jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
      jPanel5.add(jLabel, null);
      jPanel5.add(getCombatName(), null);
      jPanel5.add(jLabel1, null);
      jPanel5.add(getCombatStart(), null);
      jPanel5.add(jLabel2, null);
      jPanel5.add(getCombatEnd(), null);
      jPanel5.add(jLabel3, null);
      jPanel5.add(getCombatDuration(), null);
    }
    return jPanel5;
  }
  /**
   * This method initializes combatName 
   *  
   * @return javax.swing.JTextField 
   */
  private JTextField getCombatName() {
    if (combatName == null) {
      combatName = new JTextField();
      combatName.setText("");
      combatName.setEditable(false);
    }
    return combatName;
  }
  /**
   * This method initializes combatStart 
   *  
   * @return javax.swing.JTextField 
   */
  private JTextField getCombatStart() {
    if (combatStart == null) {
      combatStart = new JTextField();
      combatStart.setEditable(false);
    }
    return combatStart;
  }
  /**
   * This method initializes combatEnd 
   *  
   * @return javax.swing.JTextField 
   */
  private JTextField getCombatEnd() {
    if (combatEnd == null) {
      combatEnd = new JTextField();
      combatEnd.setEditable(false);
    }
    return combatEnd;
  }
  /**
   * This method initializes combatDuration 
   *  
   * @return javax.swing.JTextField 
   */
  private JTextField getCombatDuration() {
    if (combatDuration == null) {
      combatDuration = new JTextField();
      combatDuration.setEditable(false);
    }
    return combatDuration;
  }
  /**
   * This method initializes jPanel6 
   *  
   * @return javax.swing.JPanel 
   */
  private JPanel getJPanel6() {
    if (jPanel6 == null) {
      jPanel6 = new JPanel();
      jPanel6.setLayout(new BorderLayout());
      jPanel6.add(StatusLabel, BorderLayout.SOUTH);
      jPanel6.add(getSplitPane(), BorderLayout.CENTER);
    }
    return jPanel6;
  }
  /**
   * This method initializes jTabbedPane1 
   *  
   * @return javax.swing.JTabbedPane 
   */
  private JTabbedPane getJTabbedPane1() {
    if (jTabbedPane1 == null) {
      jTabbedPane1 = new JTabbedPane();
      jTabbedPane1.addTab("Combats", null, getJPanel6(), null);
      jTabbedPane1.addTab("All DPS", null, getJScrollPane14(), null);
      jTabbedPane1.addTab("All Healers", null, getJScrollPane15(), null);
      jTabbedPane1.addTab("All Damage Taken", null, getJScrollPane16(), null);
    }
    return jTabbedPane1;
  }
  /**
   * This method initializes jScrollPane14 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane14() {
    if (jScrollPane14 == null) {
      jScrollPane14 = new JScrollPane();
      jScrollPane14.setViewportView(getAllDPSO());
    }
    return jScrollPane14;
  }
  /**
   * This method initializes allDPSO 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getAllDPSO() {
    if (allDPSO == null) {
      allDPSO = new JTable();
    }
    return allDPSO;
  }
  /**
   * This method initializes jScrollPane15 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane15() {
    if (jScrollPane15 == null) {
      jScrollPane15 = new JScrollPane();
      jScrollPane15.setViewportView(getAllHPS());
    }
    return jScrollPane15;
  }
  /**
   * This method initializes allHPS 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getAllHPS() {
    if (allHPS == null) {
      allHPS = new JTable();
    }
    return allHPS;
  }
  /**
   * This method initializes jScrollPane16 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane16() {
    if (jScrollPane16 == null) {
      jScrollPane16 = new JScrollPane();
      jScrollPane16.setViewportView(getAllDPST());
    }
    return jScrollPane16;
  }
  /**
   * This method initializes allDPST 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getAllDPST() {
    if (allDPST == null) {
      allDPST = new JTable();
    }
    return allDPST;
  }
  /**
   * This method initializes jMenu2 
   *  
   * @return javax.swing.JMenu 
   */
  private JMenu getJMenu2() {
    if (jMenu2 == null) {
      jMenu2 = new JMenu();
      jMenu2.setText("Help");
      jMenu2.add(getJMenuItem3());
      jMenu2.add(getJMenuItem4());
    }
    return jMenu2;
  }
  /**
   * This method initializes jMenuItem3 
   *  
   * @return javax.swing.JMenuItem 
   */
  private JMenuItem getJMenuItem3() {
    if (jMenuItem3 == null) {
      jMenuItem3 = new JMenuItem();
      jMenuItem3.setText("Usage help");
      jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          RRAswgHelp help=new RRAswgHelp(getFrame());
          help.setLocationRelativeTo(getFrame());
          help.setVisible(true);
        }
      });
    }
    return jMenuItem3;
  }
  /**
   * This method initializes jMenuItem4 
   *  
   * @return javax.swing.JMenuItem 
   */
  private JMenuItem getJMenuItem4() {
    if (jMenuItem4 == null) {
      jMenuItem4 = new JMenuItem();
      jMenuItem4.setText("Changelog");
      jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          RRAswgChangelog cl=new RRAswgChangelog(getFrame());
          cl.setLocationRelativeTo(getFrame());
          cl.setVisible(true);
        }
      });
    }
    return jMenuItem4;
  }
  /**
   * This method initializes jScrollPane17 
   *  
   * @return javax.swing.JScrollPane 
   */
  private JScrollPane getJScrollPane17() {
    if (jScrollPane17 == null) {
      jScrollPane17 = new JScrollPane();
      jScrollPane17.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      jScrollPane17.setViewportView(getDtpsTypes());
    }
    return jScrollPane17;
  }
  /**
   * This method initializes dtpsTypes 
   *  
   * @return javax.swing.JTable 
   */
  private JTable getDtpsTypes() {
    if (dtpsTypes == null) {
      dtpsTypes = new JTable();
      dtpsTypes.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
    return dtpsTypes;
  }

}
TOP

Related Classes of rra.swingGUI.SThread

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.