/*
 *  Internal frame for multicast elements inspection
 *
 *  2004 - 2011 Frantisek Zboril jr.
 *  Faculty of Information Technology
 *  zborilf@fit.vutbr.cz
 *  http://www.fit.vutbr.cz/~zborilf
 *
 * (C) Brno University of Technology
 * Freeware licence VUT v Brně
 * https://wis.fit.vutbr.cz/FIT/db/dir.php/dr/VZ2007/externiInformace/softwareNaWebu/Priloha2_rozh23.pdf

 */

package jTGUI;

import jTMass.TMass;
import jTMass.core.jTMassEnvironment.TMulticast;

public class TMulticastInternalFrame extends javax.swing.JInternalFrame {


     public TMulticast PMulticast;
     public TMass PTMass;
     TConnectionsPanel PConnectionsPanel;

    public void updateConnections(){
        PConnectionsPanel.setConnections();
    }

    public TMulticastInternalFrame(TMulticast multicast, TMass tmass) {
        initComponents();
        this.setTitle(multicast.getElementName());
        PMulticast=multicast;
        PTMass=tmass;
        PConnectionsPanel=new TConnectionsPanel(multicast,tmass);
        PMulticastTabbedPane.add(PConnectionsPanel,0);
        PMulticastTabbedPane.setTitleAt(0, "Connections");
    }

    //===== CONSTRUCTOR =====

    public TMulticastInternalFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PMulticastTabbedPane = new javax.swing.JTabbedPane();

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);
        setPreferredSize(new java.awt.Dimension(450, 340));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(PMulticastTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 434, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(PMulticastTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane PMulticastTabbedPane;
    // End of variables declaration//GEN-END:variables

}
