Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryDangerItem


private void btAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAddActionPerformed
    try {
        DangerDetails dd = new DangerDetails();
        dd.title = "введите название";
        DirectoryDangerItem item = new DirectoryDangerItem(dd);
        if (treeDangers.getLastSelectedPathComponent() instanceof DirectoryDangerItem) {
            DirectoryDangerItem parent = (DirectoryDangerItem)
                    treeDangers.getLastSelectedPathComponent();
            dd.parentItem = parent.getID();
            parent.getItems().append(item);
            treeDangers.updateUI();
        }
        else {
            dd.parentItem = 0;
            DirectoryDanger directory = (DirectoryDanger)
View Full Code Here


        try {
            if (treeDangers.getLastSelectedPathComponent() == treeDangers.getModel().getRoot()
                    || treeDangers.getLastSelectedPathComponent() == null) {
            return;
            }
            DirectoryDangerItem item = (DirectoryDangerItem) treeDangers.getLastSelectedPathComponent();
            if (item.getItems().size() > 0) {
                int answer = MessageBox.showConfirmYesNo(MessageBox.C_DELETE_CHIELD_OBJECTS);
                if (answer == MessageBox.ANSWER_NO) {
                    return;
                }
            } else {
View Full Code Here

    DirectoryDanger dangers = (DirectoryDanger) DirectoryLocator.getDirectory(DirectoryDanger.class, false);
    ClipsException hasException = null;
   
    SelectorEditableExceptional<DirectoryDangerItem> iie = dangerItem.getItems();       
    for (int i = iie.size() - 1; i > -1; i--) {
        DirectoryDangerItem item = iie.get(i);
        try {
            deleteDanger(item);
        } catch (ClipsException ex) {
            hasException = ex;
        }
    }
    DirectoryDangerItem parent = dangerItem.getParent();

    if (parent == null) {
        iie = dangers.getItems();
    }
    else {
        iie = parent.getItems();
    }
    if (hasException == null) {
        iie.remove(dangerItem);
    } else {
        throw hasException;
View Full Code Here

        }

        @Override
        public void valueForPathChanged(TreePath path, Object newValue) {
            try {
                DirectoryDangerItem item = (DirectoryDangerItem) path.getLastPathComponent();
                item.setTitle(newValue.toString());
                //resetTree(item);
                setScreenFields();
                treeDangers.updateUI();
            } catch (ClipsException ex) {
                MessageBox.showException(ex);
View Full Code Here

        return 2;
    }

    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        DirectoryDangerItem ddi = dangerItems.get(rowIndex);
        switch (columnIndex){
            case CL_SELECT: return dangerMap.get(ddi);
            case CL_DANGER: return ddi;
            default: return null;
        }
View Full Code Here

        addListeners();//и слушатели
        panelDangerMap = new HashMap<Integer, PanelDanger>();
        panelDangerMapTrash = new HashMap<Integer, PanelDanger>();
        Iterator<DirectoryDangerItem> it = bigXmlMap.keySet().iterator();
        while (it.hasNext()) {
            DirectoryDangerItem ddi = it.next();
            boolean block = !profcheckup.isNewlyCreated();
            PanelDanger panelDanger = new PanelDanger(ddi,
                                                    bigXmlMap.get(ddi),
                                                    block,
                                                    contractLocal);
            panelDangerMap.put(ddi.getID(), panelDanger);           
//            pnlDangers.add(panelDanger);
//            pnlDangers.revalidate();
        }
        Iterator<PanelDanger> iterator = panelDangerMap.values().iterator();
        fillDangers(iterator);
View Full Code Here

            ddd.setVisible(true);
            if (ddd.getDlgResult() == ModalDialog.DLG_OK) {
                Selector s = ddd.getSelectedItems();
                for (int i = 0; i < s.size(); i++) {
                    DangerJobDetails djd = new DangerJobDetails();
                    DirectoryDangerItem ddi = (DirectoryDangerItem)s.get(i);
                    djd.dangerId = ddi.getID();
                    djd.jobId = jobLocal.getID();
                    DangerExamChunk chunk = new DangerExamChunk(djd);
                    System.out.println("create DANGER CHUNK, job: " + chunk.getDetails().jobId);
                    jobLocal.dangerFactors().append(chunk);
                   
View Full Code Here

TOP

Related Classes of clips.delegate.directory.complex.DirectoryDangerItem

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.