Package fr.soleil.salsa.client.util

Examples of fr.soleil.salsa.client.util.EnergyTrajectoryLine


            @Override
            public Object getValueAt(int row, int col) {
                // System.out.println("getValueAt=" + row + col);
                Object value = null;
                EnergyTrajectoryLine line = getEnergyTrajectoryLine(row, false);
                if (line != null) {
                    switch (col) {
                        case 0: // start energy
                            value = line.getRange().toString();
                            break;
                        case 1: // start energy
                            value = line.getBeginPosition();
                            break;
                        case 2: // end energy
                            value = line.getEndPosition();
                            break;
                        case 3: // energy step
                            value = line.getDelta();
                            break;
                        case 4: // step number
                            value = line.getStepNumber();
                            break;
                        case 5: // integration time
                            value = line.getIntegrationTime();
                            break;
                        case 6: // delta constant
                            value = line.getDeltaConstant();
                            break;
                    }
                }
                return value;
            }
View Full Code Here


    }

    @Override
    public void setBeginPosition(int trajectoryPosition, int rangePosition, String beginPosition,
            boolean saved) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition);
        if (line != null) {
            if (!saved) {
                try {
                    double value = Double.valueOf(beginPosition);
                    line.setBeginPosition(value);
                }
                catch (Exception e) {
                }
            }
            else {
                line.getBeginPosition().setDbValue(beginPosition);
            }
        }
        refresh();

    }
View Full Code Here

    }

    @Override
    public void setEndPosition(int trajectoryPosition, int rangePosition, String endPosition,
            boolean saved) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition);
        if (line != null) {
            if (!saved) {
                try {
                    double value = Double.valueOf(endPosition);
                    line.setEndPosition(value);
                }
                catch (Exception e) {
                }
            }
            else {
                line.getEndPosition().setDbValue(endPosition);
            }
        }
        refresh();

    }
View Full Code Here

    }

    @Override
    public void setDelta(int trajectoryPosition, int rangePosition, String delta, boolean saved) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition);
        if (line != null) {
            if (!saved) {
                try {
                    double value = Double.valueOf(delta);
                    line.setDelta(value);
                }
                catch (Exception e) {
                }
            }
            else {
                line.getDelta().setDbValue(delta);
            }
        }
        refresh();

    }
View Full Code Here

    /**
     * Gets the energy trajectory lines. The view is a table, each line is a trajectory.
     */
    private EnergyTrajectoryLine getEnergyTrajectoryLine(int position, boolean saved) {
        EnergyTrajectoryLine line = energyTrajectoryLines.get(position);
        if (line == null && !saved) {
            line = new EnergyTrajectoryLine();
            line.setRange(position);
            energyTrajectoryLines.put(position, line);
        }
        return line;
    }
View Full Code Here

            boolean saved) {
    }

    @Override
    public void setDeltaconstant(int trajectoryPosition, int rangePosition, Boolean deltaConstant) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition);
        if (line != null) {
            line.setDeltaConstant(deltaConstant);
        }
        refresh();
    }
View Full Code Here

        getDeleteButton().setEnabled(enabled);
    }

    @Override
    public void setIntegrationTime(int rangePosition, String integrationTime, boolean saved) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition, saved);
        if (line != null) {
            if (!saved) {
                try {
                    double value = Double.valueOf(integrationTime);
                    line.setIntegrationTime(value);
                }
                catch (Exception e) {
                }
            }
            else {
                line.getIntegrationTime().setDbValue(integrationTime);
            }
        }
        refresh();
    }
View Full Code Here

        refresh();
    }

    @Override
    public void setStepNumber(int rangePosition, String stepNumber, boolean saved) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition, saved);
        if (line != null) {
            if (!saved) {
                try {
                    int value = Integer.valueOf(stepNumber);
                    line.setStepNumber(value);
                }
                catch (Exception e) {
                }
            }
            else {
                line.getStepNumber().setDbValue(stepNumber);
            }
        }
        refresh();

    }
View Full Code Here

    @Override
    public void setBeginPosition(int trajectoryPosition, int rangePosition, String beginPosition,
            boolean saved) {

        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition, saved);
        if (line != null) {
            if (!saved) {
                try {
                    if (line != null) {
                        double value = Double.valueOf(beginPosition);
                        line.setBeginPosition(value);
                    }
                }
                catch (Exception e) {
                }
            }
            else {
                line.getBeginPosition().setDbValue(beginPosition);
            }
        }
        refresh();

    }
View Full Code Here

    }

    @Override
    public void setEndPosition(int trajectoryPosition, int rangePosition, String endPosition,
            boolean saved) {
        EnergyTrajectoryLine line = getEnergyTrajectoryLine(rangePosition, saved);
        if (line != null) {
            if (!saved) {
                try {
                    if (line != null) {
                        double value = Double.valueOf(endPosition);
                        line.setEndPosition(value);
                    }
                }
                catch (Exception e) {
                }
            }
            else {
                line.getEndPosition().setDbValue(endPosition);
            }
        }
        refresh();

    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.client.util.EnergyTrajectoryLine

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.