Package fr.soleil.salsa.entity.impl

Examples of fr.soleil.salsa.entity.impl.Stage


    }
   
    protected void SetHooks(IScanAddOns sao, DeviceProxy scanServerProxy) throws DevFailed {
        Stage[] stages = Stage.values();
        for(int i=0 ;i<stages.length; i++) {
            Stage stage = stages[i];
            String attributeName = getStageAttributeName(stage);
            String [] commandsTab = new String[0];
            DeviceAttribute da = new DeviceAttribute(attributeName);
            da.insert(commandsTab);
            scanServerProxy.write_attribute(da);
        }
       
        if(sao != null
                && sao.getHooks() != null) {
            List<IHook> hooks = sao.getHooks();
            for(IHook h : hooks) {
                Stage stage = h.getStage();
                String attributeName = getStageAttributeName(stage);
                if(attributeName != null) {
                    List<String > commands = new ArrayList<String>();
                    if(h.getCommandsList() == null) {continue;}
                    for(IHookCommand c : h.getCommandsList()) {
View Full Code Here


        if (config != null && view != null) {
            IScanAddOns scanAddOns = config.getScanAddOn();
            if (scanAddOns != null) {
                List<IHook> hookList = scanAddOns.getHooks();
                if (hookList != null) {
                    Stage stage = null;
                    // System.out.println("IHookList=" + hookList.size());
                    for (IHook hook : hookList) {
                        stage = hook.getStage();
                        // System.out.println("stage=" + stage);
                        List<IHookCommand> commandList = hook.getCommandsList();
View Full Code Here

        stageCombo.setEditable(false);

        addButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Stage stage = (Stage) stageCombo.getSelectedItem();
                if (controller != null) {
                    controller.addHookCommand(stage);
                }
            }
        });
View Full Code Here

        }

        if (sao != null && sao.getHooks() != null) {
            List<IHook> hooks = sao.getHooks();
            for (IHook h : hooks) {
                Stage stage = h.getStage();
                String attributeName = getStageAttributeName(stage);
                if (attributeName != null) {
                    List<String> commands = new ArrayList<String>();
                    if (h.getCommandsList() == null) {
                        continue;
View Full Code Here

     */
    private Stage getFirstStageUnreserved() {
        List<Stage> stageReserved = getStageReserved();
        Stage[] stages = Stage.values();
        for (int i = 0; i < stages.length; i++) {
            Stage s = stages[i];
            if (!stageReserved.contains(s)) {
                return s;
            }
        }
        return null;
View Full Code Here

    }

    @Override
    public void notifyNewHookAction() {
        IHook h = new HookModel();
        Stage s = getFirstStageUnreserved();
        h.setStage(s);
        hooks.add(h);
        if (config != null) {
            config.setModified(true);
        }
View Full Code Here

    }

    @Override
    public void notifyStageAction(int id, String value) {
        IHook h = hooks.get(id);
        Stage s = Stage.valueOf(Stage.class, value);
        h.setStage(s);
        if (config != null) {
            config.setModified(true);
        }
    }
View Full Code Here

                view.setSelectedHook(i, isSelected);

                // view.clearCommand(i);
                int iStage = 0;
                for (int j = 0; j < stages.length; j++) {
                    Stage s = stages[j];

                    if ((!stageReserved.contains(s)) || s == h.getStage()) {
                        view.addStage(i, s.name(), s.getValue());
                        if (s == h.getStage()) {
                            view.setSelectedStage(i, iStage);
                        }
                        iStage++;
                    }
View Full Code Here

        stageCombo.setEditable(false);

        stageCombo.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Stage stage = (Stage) stageCombo.getSelectedItem();
                Integer intStage = stageId.get(stage);
                mainPanel.setSelectedIndex(intStage);
            }
        });

        addButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Stage stage = (Stage) stageCombo.getSelectedItem();
                if (controller != null) {
                    controller.addHookCommand(stage);
                }
            }
        });

        deleteButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Collection<HookTableView> collection = hookMap.values();
                for (HookTableView table : collection) {
                    table.deleteSelectedRows();
                    if (table.isEmpty()) {
                        Stage stage = table.getHookId();
                        int stageIndex = stageId.get(stage);
                        mainPanel.setEnabledAt(stageIndex, false);
                    }
                }
            }
View Full Code Here

        if (config != null && view != null) {
            IScanAddOns scanAddOns = config.getScanAddOn();
            if (scanAddOns != null) {
                List<IHook> hookList = scanAddOns.getHooks();
                if (hookList != null) {
                    Stage stage = null;
                    // System.out.println("IHookList=" + hookList.size());
                    for (IHook hook : hookList) {
                        stage = hook.getStage();
                        // System.out.println("stage=" + stage);
                        List<IHookCommand> commandList = hook.getCommandsList();
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.impl.Stage

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.