Package clips.doctor.newEMC.nodes

Source Code of clips.doctor.newEMC.nodes.SerrenNode

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package clips.doctor.newEMC.nodes;

import cli_fmw.delegate.DelegateLine2;
import cli_fmw.main.ClipsException;
import cli_fmw.main.PageContainer;
import cli_fmw.utils.Log;
import clips.doctor.newEMC.init.generic.DelegateNode;
import clips.delegate.doctor.diagnosis.DiagnosisLocal;
import clips.delegate.service.SerRenLocal;
import clips.doctor.PanelServiceInfo;
import clips.doctor.newEMC.init.EmcTreeNode;
import clips.doctor.newEMC.init.generic.DelegateNodeInterface;
import java.util.ArrayList;
import java.util.List;

/**
*
* @author petr
*/
public class SerrenNode extends EmcTreeNode<SerRenLocal, PanelServiceInfo> {

    public SerrenNode(EmcTreeNode parent, SerRenLocal delegate) {
        super(parent, delegate);
    }

    @Override
    protected PanelServiceInfo initPanel(SerRenLocal delegate, PageContainer pageContainer) throws ClipsException {
        return new PanelServiceInfo(pageContainer, delegate);
    }

    @Override
    protected int getChildrenCount(SerRenLocal delegate) throws ClipsException {
        return delegate.getChildren().size();
    }

    @Override
    public List<DelegateNodeInterface> getChildren(SerRenLocal delegate) throws ClipsException {
        List<DelegateNodeInterface> list = new ArrayList<DelegateNodeInterface>();
        for (DelegateNode delegateLine2 : delegate.getChildren()) {
            list.add(delegateLine2);
        }
        return list;
    }

    @Override
    protected String getStringValue(SerRenLocal delegate) {
        String toString = delegate.toStringSimple();
        try{
            toString = delegate.toString();
        }catch(Exception e){
            Log.printlnAnsPos(e.getMessage());
        }
        return toString;
    }

}
TOP

Related Classes of clips.doctor.newEMC.nodes.SerrenNode

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.