Package clips.delegate.kek

Examples of clips.delegate.kek.CommitteeResolutionData


        this.comResList = comResList;
    }

    @Override
    public void modifyErrorTableCellRendererComponent(JTable table, Object value, int row, int col) throws ClipsException {
        CommitteeResolutionData comRes = comResList.get(row);

        if (comRes.isRendered()) {
            render().setBackground(Color.LIGHT_GRAY);
        }
    }
View Full Code Here


    }
   
    @Override
    public Object getValueAt(int row, int col) {
        try {
            CommitteeResolutionData resData = comResList.get(row);
            switch (col) {
                case COL_RES_ID: {
                    return resData.getId();
                }
                case COL_TYPE: {
                    return resData.getType();
                }
                case COL_MKB: {
                    return resData.getMkb();
                }
                case COL_DESC: {
                    return resData.getDescription();
                }
                case COL_COLLAB: {
                    return resData.getCollaborator() != null ? resData.getCollaborator() : "";
                }
                case COL_COMDIR_ID: {
                    CommitteeDirectionData data = null;
                    SelectorEditable<CommitteeDirectionData> list = committee.getDirectionList();
                    for (int i = 0; i < list.size(); i++) {
                        data = list.get(i);
                        if (committee.getResolutionByDirection(data) != null
                                && data.getId() == resData.getKey()) {
                            break;
                        }
                    }
                    return data != null ? data.getId() : "";
                }
View Full Code Here

            if (committee.getMemberList().size() == 0) {
                MessageBox.showWarning(MessageBox.W_COMMITTEE_NOT_MADE);
            }
            else {
                CommitteeDirectionData dirData = committee.getDirectionList().get(row);
                CommitteeResolutionData comResData = committee.getResolutionByDirection(dirData);
                if (comResData != null) {
                    jTabbedPane1.setSelectedComponent(panelResolution);
                    for (int i = 0; i < comResList.size(); i++) {
                        if (comResList.get(i).equals(comResData)) {
                            tabResolutionList.setRowSelectionInterval(i, i);
                            break;
                        }
                    }
                }
                else {
                    comResData = new CommitteeResolutionData(dirData);
                    ComResDlg dlg = new ComResDlg(MainWindow.mainWindow, comResData, getAuditManager());
                    dlg.setVisible(true);
                    if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                        comResData.setCollaborator(UserInfo.get().getCollaborator());
                        committee.getResolutionList(false).append(comResData);
                        DirectionLocal direction = dirData.getDirection(getAuditManager());
                        direction.addContentStateListener(emptyListener);
                        direction.setOrdered(true);
                        directions.add(direction);
View Full Code Here

private void btSetComResRenderedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSetComResRenderedActionPerformed
    try {
        int row = tabResolutionList.getSelectedRowSorted();
        if (row > -1) {
            CommitteeResolutionData comRes = comResList.get(row);
            comRes.setRendered(true);
        }
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
    }
}//GEN-LAST:event_btSetComResRenderedActionPerformed
View Full Code Here

        }
        if (committee.getMemberList().size() == 0) {           
            MessageBox.showWarning(MessageBox.W_COMMITTEE_NOT_MADE);
        }
        else {
            CommitteeResolutionData comRes = committee.getResolutionList(false).get(row);
           
            if(comRes.getId() == 0) {
                throw new ClipsException("Перед данным действием необходимо сохранить список решений КЭК");
            }
            InabilityData inability = committee.getInabilityByResolution(comRes);
            if (inability != null) {
                jTabbedPane1.setSelectedComponent(panelInability);
                for (int i = 0; i < inabilityList.size(); i++) {
                    if (inabilityList.get(i).equals(inability)) {
                        tabInabilidityList.setRowSelectionInterval(i, i);
                        break;
                    }
                }
            } else {
                if (comRes.isRendered()) {
                    return;
                }
                inability = new InabilityData(comRes);
                DlgInabilityEdit dlg = new DlgInabilityEdit(MainWindow.mainWindow, inability, getAuditManager());
                dlg.setVisible(true);
                if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                    comRes.setRendered(true);
                    committee.getInabilityList(false).append(inability);
                }
            }
        }
    } catch (ClipsException ex) {           
View Full Code Here

            MessageBox.showWarning(MessageBox.W_NOT_CLOSE_EDITING);
            return;
        }
        int row = tabResolutionList.getSelectedRowSorted();
        if (row > -1) {
            CommitteeResolutionData comRes = comResList.get(row);
            CommitteeDirectionData comDir = null;
            int id = committee.getResolutionList(false).get(row).getKey();
            for (int i = 0; i < comDirList.size(); i++) {
                if (comDirList.get(i).getId() == id) {
                    comDir = comDirList.get(i);
View Full Code Here

private void btComResViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btComResViewActionPerformed
    try {
        int row  = tabResolutionList.getSelectedRowSorted();
        if (row > -1) {
            CommitteeResolutionData data = comResList.get(row);
            CommitteeResolutionData comResData = (CommitteeResolutionData) data.clone();
            ComResDlg dlg = new ComResDlg(MainWindow.mainWindow, comResData, getAuditManager());
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                data.setCollaborator(comResData.getCollaborator());
                data.setDescription(comResData.getDescription());
                data.setMkb(comResData.getMkb());
                data.setRendered(comResData.isRendered());
                data.setType(comResData.getType());
            }
        }
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
    }
View Full Code Here

private void btInabilityDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btInabilityDelActionPerformed
    try {
        int row = tabInabilidityList.getSelectedRowSorted();
        if (row > -1) {
            InabilityData inabilityData = inabilityList.get(row);
            CommitteeResolutionData comRes = null;
            int id = committee.getInabilityList(false).get(row).getKey();
            for (int i = 0; i < comResList.size(); i++) {
                if (comResList.get(i).getId() == id) {
                    comRes = comResList.get(i);
                    break;
                }
            }
            comRes.setRendered(false);
            committee.getInabilityList(false).remove(inabilityData);
            reloadTableInabilities();
        }
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
View Full Code Here

                }
                case COL_DESC: {
                    return inability.getDesc();
                }
                case COL_RES_ID: {
                    CommitteeResolutionData data = null;
                    Selector<CommitteeResolutionData> list = committee.getResolutionList(false);
                    for (int i = 0; i < list.size(); i++) {
                        data = list.get(i);
                        if (committee.getInabilityByResolution(data) != null
                                && data.getId() == inability.getKey()) {
                            break;
                        }
                    }
                    return data != null ? data.getId() : "";
                }
            }
        } catch (ClipsException ex) {
            return new ErrorValue(ex);
        }
View Full Code Here

TOP

Related Classes of clips.delegate.kek.CommitteeResolutionData

Copyright © 2018 www.massapicom. 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.