Package fr.soleil.model.scanserver

Examples of fr.soleil.model.scanserver.Axis


    }

    @Override
    public Object getCellEditorValue() {
        Object item = combo.getSelectedItem();
        Axis newValue = null;
        if (item != null && currentValue != null) {
            String axis = item.toString();
            newValue = currentValue.clone();
            if (newValue.getType() == Axis.IMAGE_TYPE) {
                if (axis.equals(Axis.Y1)) {
                    axis = Axis.Y1_SINGLE;
                }
                if (axis.equals(Axis.Y2)) {
                    axis = Axis.Y2_SINGLE;
                }
            }
            newValue.setAxis(axis);
        }
        return newValue;
    }
View Full Code Here


        comboBoxSpectrum.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String sItem = (String) comboBoxSpectrum.getSelectedItem();
                objectValue = new Axis();
                objectValue.setAxis(sItem);
                objectValue.setType(Axis.SPECTRUM_TYPE);
                fireAxisCellEditorChanged();
            }
        });

        comboBoxImage.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String actionCommand = arg0.getActionCommand();
                if (arg0.getModifiers() == InputEvent.BUTTON1_MASK
                        || !actionCommand.equals("comboBoxChanged")) {
                    String sItem = (String) comboBoxImage.getSelectedItem();
                    objectValue = new Axis();
                    if (sItem.equals(Axis.X)) {
                        objectValue.setAxis(Axis.X);
                    }
                    if (sItem.equals(Axis.Y1)) {
                        objectValue.setAxis(Axis.Y1_SINGLE);
View Full Code Here

        comboBoxSpectrum.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String sItem = (String) comboBoxSpectrum.getSelectedItem();
                objectValue = new Axis();
                objectValue.setAxis(sItem);
                objectValue.setType(Axis.SPECTRUM_TYPE);
                fireAxisCellEditorChanged();
            }
        });

        comboBoxImage.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String actionCommand = arg0.getActionCommand();
                if (arg0.getModifiers() == InputEvent.BUTTON1_MASK
                        || !actionCommand.equals("comboBoxChanged")) {
                    String sItem = (String) comboBoxImage.getSelectedItem();
                    objectValue = new Axis();
                    if (sItem.equals(Axis.Y1)) {
                        objectValue.setAxis(Axis.Y1_SINGLE);
                    }
                    if (sItem.equals(Axis.Y2)) {
                        objectValue.setAxis(Axis.Y2_SINGLE);
View Full Code Here

        @Override
        public void setValueAt(final Object value, final int row, final int column) {
            if (value instanceof Axis) {
                final Object attributeName = getValueAt(row, 0);
                final Axis axis = (Axis) value;
                if (attributeName != null) {
                    (new Thread() {
                        @Override
                        public void run() {
                            updateDataModelAxis(attributeName.toString(), axis.getAxis());
                        };
                    }).start();

                }
            }
View Full Code Here

        @Override
        public void setValueAt(final Object value, final int row, final int column) {
            if (value != null && value instanceof Axis) {
                Object attributeName = getValueAt(row, 0);
                Axis axis = (Axis) value;
                if (attributeName != null) {
                    userEvent = true;
                    if (updateDataModelAxis(attributeName.toString(), axis.getAxis())) {
                        updateTable();
                    }
                }
            }
        }
View Full Code Here

            // System.out.println("setValueAt=" + value + " row=" + row + " col=" + column);
            // System.out.println("setValueAt=" + value.getClass().getName());
            if (value != null && value instanceof Axis) {
                final Object attributeName = getValueAt(row, 0);
                // System.out.println("attributeName=" + attributeName);
                final Axis axis = (Axis) value;
                if (attributeName != null) {
                    userEvent = true;
                    (new Thread() {
                        public void run() {
                            if (updateDataModelAxis(attributeName.toString(), axis.getAxis())) {
                                // System.out.println("attributeName=" + attributeName +
                                // "setValueAt="
                                // + value + " row=" + row + " col=" + column);
                                // updateTable();
                                // table.repaint();
View Full Code Here

        comboBoxSpectrum.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String sItem = (String) comboBoxSpectrum.getSelectedItem();
                objectValue = new Axis();
                objectValue.setAxis(sItem);
                objectValue.setType(Axis.SPECTRUM_TYPE);
                fireAxisCellEditorChanged();
            }
        });

        comboBoxImage.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String actionCommand = arg0.getActionCommand();
                if (arg0.getModifiers() == InputEvent.BUTTON1_MASK
                        || !actionCommand.equals("comboBoxChanged")) {
                    String sItem = (String) comboBoxImage.getSelectedItem();
                    objectValue = new Axis();
                    if (sItem.equals(Axis.Y1)) {
                        objectValue.setAxis(Axis.Y1_SINGLE);
                    }
                    if (sItem.equals(Axis.Y2)) {
                        objectValue.setAxis(Axis.Y2_SINGLE);
View Full Code Here

        return super.getTableCellEditorComponent(table, value, isSelected, row, column);
    }

    @Override
    public Object getCellEditorValue() {
        Axis newValue = null;
        if (editorComponent instanceof JComboBox) {
            Object item = ((JComboBox) editorComponent).getSelectedItem();
            if (item != null && currentValue != null) {
                String axis = item.toString();
                newValue = currentValue.clone();
                newValue.setAxis(axis);
            }
        }
        return newValue;
    }
View Full Code Here

    }

    @Override
    public Object getCellEditorValue() {
        Object item = combo.getSelectedItem();
        Axis newValue = null;
        if (item != null && currentValue != null) {
            String axis = item.toString();
            newValue = currentValue.clone();
            newValue.setAxis(axis);
        }
        return newValue;
    }
View Full Code Here

        @Override
        public void setValueAt(final Object value, final int row, final int column) {
            if (value != null && value instanceof Axis) {
                Object attributeName = getValueAt(row, 0);
                Axis axis = (Axis) value;
                if (attributeName != null) {
                    userEvent = true;
                    if (updateDataModelAxis(attributeName.toString(), axis.getAxis())) {
                        updateTable();
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of fr.soleil.model.scanserver.Axis

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.