/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package clips.doctor.newEMC.nodes.leaves;
import clips.doctor.newEMC.nodes.*;
import cli_fmw.delegate.DelegateLine2;
import cli_fmw.main.ClipsException;
import cli_fmw.main.PageContainer;
import clips.doctor.newEMC.init.generic.DelegateNode;
import clips.delegate.client.ClientLocal;
import clips.delegate.doctor.prescription.PrescriptionLocal;
import clips.doctor.newEMC.init.EmcTreeNode;
import clips.doctor.newEMC.init.generic.DelegateNodeInterface;
import clips.doctor.prescription.PanelPrescription;
import java.util.List;
import javax.swing.tree.TreeNode;
/**
*
* @author petr
*/
public class PrescriptionNode extends EmcTreeNode<PrescriptionLocal, PanelPrescription> {
public PrescriptionNode(EmcTreeNode parent, PrescriptionLocal delegate) {
super(parent, delegate);
}
@Override
protected PanelPrescription initPanel(PrescriptionLocal delegate, PageContainer pageContainer) throws ClipsException {
TreeNode node = this;
while (node.getParent() != null) {
node = node.getParent();
}
ClientNode root = (ClientNode) node;
return new PanelPrescription(pageContainer, delegate, root.getDelegate());
}
@Override
protected int getChildrenCount(PrescriptionLocal delegate) throws ClipsException {
return 0;
}
@Override
public List<DelegateNodeInterface> getChildren(PrescriptionLocal delegate) throws ClipsException {
return null;
}
@Override
protected String getStringValue(PrescriptionLocal delegate) {
return delegate.toString();
}
}