

package modifyIcs;


import icsTables.ICSServiceTableModel;

import java.awt.GridBagConstraints;

import org.w3c.dom.Document;

/**
 * This class represents the Jpanel for the service tab
 * @author MC
 */
public class ServiceICSManagementView extends ICSViewPanel{

    private static final long serialVersionUID = 1L; 
    /** Creates a new instance of ServiceICSManagementView */
    public ServiceICSManagementView() {
    	schemaSource = "..\\xsd\\ServiceICS.xsd";
    	icsTable = new ICSServiceTableModel();
        initComponants(); 
        doc = null;
    }
  
    /**
     * addGenerationPanel
     *
     */
    public void addGenerationPanel()
    {
        GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        
        try{
            jPanelICSTable.createTableService(doc);
            add(jPanelGen, gridBagConstraints);
        }
        catch(Exception e)
        {
        	e.printStackTrace();
            //System.err.println("Error while building the table! the XML file may be corrupted....");
            //ErrorMessage("Error while building the table!");
        }
    }

	public void loadFile(Document docIn) {
		 icsDocs.setDocService(docIn);
		
	}    
    
}
