Examples of EmcTreeNode


Examples of clips.doctor.newEMC.init.EmcTreeNode

        }
    }

    private CheckupLocal getSelectedCheckup() {
        CheckupLocal checkup = null;
        EmcTreeNode node = getCurrentSelectedNode();
        if (node != null){
            if (node instanceof CheckupNode) {
                checkup = (CheckupLocal) node.getDelegate();
            } else {
                node = node.findParentByDelegateClass(CheckupLocal.class);
                if (node != null) {
                    checkup = (CheckupLocal) node.getDelegate();
                }
            }
        }
        return checkup;
    }
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

    /**
     * разрешает и запрещает кнопки
     */
    private void setEnabledComponents() {
        EmcTreeNode node = getCurrentSelectedNode();
        if (node != null){
            if (node instanceof SerrenNode){
                selectedServiceNode = (SerrenNode) node;
            }else{
                selectedServiceNode = (SerrenNode) node.findParentByDelegateClass(SerRenLocal.class);
            }
            if (node instanceof DiseaseNode){
                selectedDiseaseNode = (DiseaseNode) node;
            }else{
                selectedDiseaseNode = (DiseaseNode) node.findParentByDelegateClass(DiseaseLocal.class);
            }
        }

        boolean canBeClosed = isInnerPanelClear();
        btRemove.setEnabled(canBeClosed
                            && node != null
                            && !(node instanceof ClientNode)
                            && !(node instanceof EmcNode)
                            && (node.getDelegate() instanceof DelegateNode));
        btNewDisease.setEnabled(canBeClosed);
        btFollowUp.setEnabled(canBeClosed);
        btCertificate.setEnabled(canBeClosed);
        btSicklist.setEnabled(canBeClosed);
        btQuickInput.setEnabled(canBeClosed);
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

     */
    private EmcTreeNode getCurrentSelectedNode(){
        Object object = treeEMC.getLastSelectedPathComponent();
        if (object != null){
            if (object instanceof EmcTreeNode){
                EmcTreeNode node = (EmcTreeNode)object;
                return node;
            }else{
                throw new IllegalStateException("Element with unsupported class in EMC tree!");
            }
        }
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

    {//GEN-HEADEREND:event_btRemoveActionPerformed
        try {
            if (!isInnerPanelClear()) {
                MessageBox.showWarning(MessageBox.W_NOT_CLOSE_EDITING);
            }else{
                EmcTreeNode node = getCurrentSelectedNode();
                if (MessageBox.showConfirmYesNo(MessageBox.C_DEL_OBJECT) == MessageBox.ANSWER_YES){
                    if (node != null){
                        if (node.getDelegate() instanceof DelegateNode) {
                            DelegateNode child = (DelegateNode) node.getDelegate();
                            if (child instanceof SerRenLocal && ((SerRenLocal)child).getPacketServiceID() != 0) {
                                if (MessageBox.showConfirmYesNo(MessageBox.C_DEL_SERV_FROM_PACK) != MessageBox.ANSWER_YES) {
                                    return;
                                }
                                ((SerRenLocal)child).removeAndBreakPacket();
                            } else if (child instanceof DiseaseLocal && ((DiseaseLocal)child).isMedexam()) {
                                ((DiseaseLocal)child).getMedexamLocal().remove();
                            } else {
                                child.remove();
                            }
                            try{
                                if (isPathContains(lastSelectionPath, node)){
                                    lastSelectionPath = null;
                                }
                                currentSelectionPath = null;
                            }catch(Exception e){
                                throw new ClipsException("Ошибка при смене выделения", e);
                            }finally{//если уж прокатило удаление объекта из базы, то не стоит оставлять его в кеше,
                                    // даже если были проблемы с переводом выделения
                                node.getParent().getDelegate().removeChild(child);
                            }
                        }else{
                            MessageBox.showWarning(MessageBox.W_UNDELETED_TYPE);
                        }
                    }
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

                getAuditManager().needDSA(new AuditList(result.auditDetailsList));


                ClientNode root = (ClientNode) treeEMC.getModel().getRoot();
                DiseaseLocal newDisease = new DiseaseLocal(emcLocal, result.diseaseDetails, getAuditManager());
                EmcTreeNode findNode = root.findNode(newDisease);
                boolean needAddToEmc = false;
                if (findNode != null) {
                    selectedDisease = (DiseaseLocal) findNode.getDelegate();
                } else {
                    selectedDisease = newDisease;
                    needAddToEmc = true;
                }
                if (needAddToEmc) {
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

    }
}//GEN-LAST:event_miDICOMActionPerformed

private void treeEMCKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_treeEMCKeyPressed
    if (Main.DEVELOPED_ON){
        EmcTreeNode currentSelectedNode = getCurrentSelectedNode();
        if (evt.getKeyCode() == KeyEvent.VK_I && evt.isControlDown() && currentSelectedNode != null){
            MessageBox.showInfo("Выделение: " + currentSelectedNode.getDelegate().getClass().getSimpleName() + " [id: " + currentSelectedNode.getDelegate().getID() + "]");
        }
    }
}//GEN-LAST:event_treeEMCKeyPressed
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

    @Override
    @SuppressWarnings("unchecked")
    public void restore() {
        if (innerPage.getDelegate() != null && innerPage.getDelegate().isNewlyCreated()){
            try {
                EmcTreeNode node = getCurrentSelectedNode();
                if (node != null){
                    EmcTreeNode parent = node.getParent();
                    if (parent != null){
                        DelegateLine2 delegate = innerPage.getDelegate();
                        parent.getDelegate().removeChild((DelegateNodeInterface) delegate);
                        lastSelectionPath = null;
                    }
                }
            } catch (ClipsException ex) {
                ex.printStackTrace();
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

     * @param object
     * @throws ClipsException
     */
    public  void selectInEmc(DelegateNode object) throws ClipsException{
        ClientNode root = (ClientNode) treeEMC.getModel().getRoot();
        EmcTreeNode node = null;
        if (object instanceof CertificateLocal){
            for (int i = 0; i < root.getChildCount() && node == null; i++) {
                if (root.getChildAt(i) instanceof CertificateCollectorNode){
                    node = root.getChildAt(i).findNode((DelegateNode) object);
                }
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

        public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
        }

        @Override
        public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
            EmcTreeNode current = getCurrentSelectedNode();
//            System.out.println("PANEL EMC TREE, treeWillCollapse, path: " + event.getPath() + " current: " + current);
            EmcTreeNode collaps = (EmcTreeNode) event.getPath().getLastPathComponent();
            boolean canCollaps = true;
            if (current != null) {
                current = current.getParent();
                while (current != null && canCollaps) {
                    canCollaps = !current.equals(collaps);
View Full Code Here

Examples of clips.doctor.newEMC.init.EmcTreeNode

        public void valueChanged(TreeSelectionEvent e) {
            TreePath path = e.getNewLeadSelectionPath();
            if (path != null) {
                Object lastPathComponent = path.getLastPathComponent();
                if (lastPathComponent != null) {
                    EmcTreeNode node = (EmcTreeNode) lastPathComponent;
                    try {
                        resetPage(node.getPanel(PanelEMC.this));
                        if (node.getDelegate() instanceof Signable){
                            Signable s = (Signable) node.getDelegate();
                            addECPPanel(s);
                        }
                    } catch (ClipsException ex) {
                        MessageBox.showException(ex);
                    }
View Full Code Here
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.