    public void runAutomated(AutomatedInstallData idata, IXMLElement panelRoot)
    {
        final class PInfo
        {
            private boolean _selected;
            private int _index;
            private String _name = "";
            PInfo(boolean selected, String index, String name)
            {
                _selected = selected;
                try
                {
                    _index = Integer.valueOf(index).intValue();
                }
                catch (NumberFormatException e)
                {
                    _index = -100;
                }
                if (name != null)
                {
                    _name = name;
                }
            }
            public boolean isSelected()
            {
                return _selected;
            }
            public boolean equals(int index)
            {
                return _index == index && _name.equals("");
            }
            public boolean equals(String name)
            {
                return _name.equals(name);
            }
            @Override
            public String toString()
            {
                String retVal = "";
                if (!_name.equals(""))
                {
                    retVal = "Name: " + _name + " and ";
                }
                retVal += "Index: " + String.valueOf(_index);
                return retVal;
            }
        }
        List<PInfo> autoinstallPackInfoList = new ArrayList<PInfo>();
        Vector<IXMLElement> packList = panelRoot.getChildrenNamed("pack");
        System.out.println("Read pack list from xml definition.");
        int numberOfPacks = packList.size();
        for (int packIndex = 0; packIndex < numberOfPacks; packIndex++)
        {
            IXMLElement pack = packList.get(packIndex);
            String index = pack.getAttribute("index");
            String name = pack.getAttribute("name");
            final String selectedString = pack.getAttribute("selected");
            boolean selected = selectedString.equalsIgnoreCase("true")
                    || selectedString.equalsIgnoreCase("on");
            final PInfo packInfo = new PInfo(selected, index, name);
            autoinstallPackInfoList.add(packInfo);
            System.out.println("Try to " + (selected ? "add to" : "remove from") + " selection ["
                    + packInfo.toString() + "]");
        }
        System.out.println("Modify pack selection.");
        for (Pack pack : idata.availablePacks)
        {
            final int indexOfAvailablePack = idata.availablePacks.indexOf(pack);
            for (PInfo packInfo : autoinstallPackInfoList)
            {
                if ((packInfo.equals(pack.name)) || (packInfo.equals(indexOfAvailablePack)))
                {
                    if (pack.required)
                    {
                        if (!packInfo.isSelected())
                        {
                            System.out.println("Pack [" + packInfo.toString()
                                    + "] must be installed because it is required!");
                        }
                    }
                    else
                    {
                        if (packInfo.isSelected())
                        {
                            if ((idata.selectedPacks.indexOf(pack) < 0)
                                    && (pack.id != null)
                                    && (!idata.getRules().canInstallPack(pack.id,
                                            idata.getVariables())))
                            {
                                idata.selectedPacks.add(pack);
                                System.out.println("Pack [" + packInfo.toString()
                                        + "] added to selection.");
                            }
                        }
                        else
                        {
                            idata.selectedPacks.remove(pack);
                            System.out.println("Pack [" + packInfo.toString()
                                    + "] removed from selection.");
                        }
                    }
                    break;
                }
            }
        }
        for (int childIndex = panelRoot.getChildrenCount(); childIndex > 0; childIndex--)
        {
            panelRoot.removeChild(panelRoot.getChildAtIndex(childIndex));
        }
        makeXMLData(idata, panelRoot);
    }

    public void runAutomated(AutomatedInstallData idata, IXMLElement panelRoot)
    {
        final class PInfo
        {
            private boolean _selected;
            private int _index;
            private String _name = "";
            PInfo(boolean selected, String index, String name)
            {
                _selected = selected;
                try
                {
                    _index = Integer.valueOf(index).intValue();
                }
                catch (NumberFormatException e)
                {
                    _index = -100;
                }
                if (name != null)
                {
                    _name = name;
                }
            }
            public boolean isSelected()
            {
                return _selected;
            }
            public boolean equals(int index)
            {
                return _index == index && _name.equals("");
            }
            public boolean equals(String name)
            {
                return _name.equals(name);
            }
            @Override
            public String toString()
            {
                String retVal = "";
                if (!_name.equals(""))
                {
                    retVal = "Name: " + _name + " and ";
                }
                retVal += "Index: " + String.valueOf(_index);
                return retVal;
            }
        }
        List<PInfo> autoinstallPackInfoList = new ArrayList<PInfo>();
        Vector<IXMLElement> packList = panelRoot.getChildrenNamed("pack");
        System.out.println("Read pack list from xml definition.");
        int numberOfPacks = packList.size();
        for (int packIndex = 0; packIndex < numberOfPacks; packIndex++)
        {
            IXMLElement pack = packList.get(packIndex);
            String index = pack.getAttribute("index");
            String name = pack.getAttribute("name");
            final String selectedString = pack.getAttribute("selected");
            boolean selected = selectedString.equalsIgnoreCase("true")
                    || selectedString.equalsIgnoreCase("on");
            final PInfo packInfo = new PInfo(selected, index, name);
            autoinstallPackInfoList.add(packInfo);
            System.out.println("Try to " + (selected ? "add to" : "remove from") + " selection ["
                    + packInfo.toString() + "]");
        }
        System.out.println("Modify pack selection.");
        for (Pack pack : idata.availablePacks)
        {
            final int indexOfAvailablePack = idata.availablePacks.indexOf(pack);
            for (PInfo packInfo : autoinstallPackInfoList)
            {
                if ((packInfo.equals(pack.name)) || (packInfo.equals(indexOfAvailablePack)))
                {
                    if (pack.required)
                    {
                        if (!packInfo.isSelected())
                        {
                            System.out.println("Pack [" + packInfo.toString()
                                    + "] must be installed because it is required!");
                        }
                    }
                    else
                    {
                        if (packInfo.isSelected())
                        {
                            if ((idata.selectedPacks.indexOf(pack) < 0)
                                    && (pack.id != null)
                                    && (!idata.getRules().canInstallPack(pack.id,
                                            idata.getVariables())))
                            {
                                idata.selectedPacks.add(pack);
                                System.out.println("Pack [" + packInfo.toString()
                                        + "] added to selection.");
                            }
                        }
                        else
                        {
                            idata.selectedPacks.remove(pack);
                            System.out.println("Pack [" + packInfo.toString()
                                    + "] removed from selection.");
                        }
                    }
                    break;
                }
            }
        }
        for (int counter = panelRoot.getChildrenCount(); counter > 0; counter--)
        {
            panelRoot.removeChild(panelRoot.getChildAtIndex(0));
        }
        makeXMLData(idata, panelRoot);
    }
